actors and sounds (#1112)

* all sorts of things

* various

* more

* various

* sound space names

* more

* alternating sounds done

* check

* partial jr troopa cleanup

* jr troopas

* fixes

* extract actor levels

* actor levels done

* chan

* the master

* standard names

* named actor vars

* ACTION_RESULT enum

* fix evt names

* fix struct names

* ember

* lava bubble

* goomba bros + flipped enum

* fix other enum

* goomba king battle

* tutorial enemies

* separate lee

* half lee

* lee done

* lee + duplighost

* more actors

* stray comment

* shy guy dedupe

---------

Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
HailSanta 2023-08-21 14:07:08 -04:00 committed by GitHub
parent 2782eb0252
commit 9774b26d93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1168 changed files with 21134 additions and 21862 deletions

View File

@ -13,6 +13,7 @@
#include "messages.h"
#include "battle/formation_names.h"
#include "battle/stage_names.h"
#include "battle/actor_levels.h"
#ifdef PERMUTER
extern int TEXEL0, TEXEL1, PRIMITIVE, PRIMITIVE_ALPHA;

View File

@ -882,10 +882,10 @@ typedef struct BattleStatus {
/* 0x081 */ s8 actionSuccess;
/* 0x082 */ char unk_82;
/* 0x083 */ s8 actionCommandMode;
/* 0x084 */ s8 actionResult; // actionResultAmount?
/* 0x085 */ s8 unk_85;
/* 0x086 */ s8 unk_86; // actionResult?
/* 0x087 */ s8 blockResult; /* 0 = fail, 1 = success, -1 = mashed */
/* 0x084 */ s8 actionQuality; // actionCommandVar1 ?
/* 0x085 */ s8 unk_85; // actionCommandVar2 ?
/* 0x086 */ s8 actionResult; // see enum ActionResult
/* 0x087 */ s8 blockResult; // see enum BlockResult
/* 0x088 */ s8 itemUsesLeft; /* set to 2 for double dip, 3 for triple dip */
/* 0x089 */ s8 hpDrainCount;
/* 0x08A */ s8 nextMerleeSpellType;
@ -1581,7 +1581,7 @@ typedef struct ActorPart {
/* 0x64 */ f32 yaw;
/* 0x68 */ s16 palAnimPosOffset[2]; // used by some palette animations to slightly adjust the screen position
/* 0x6C */ Vec2s targetOffset;
/* 0x70 */ s16 unk_70;
/* 0x70 */ s16 targetPriorityOffset;
/* 0x72 */ Vec2bu size;
/* 0x74 */ s8 verticalStretch;
/* 0x75 */ Vec2b projectileTargetOffset;
@ -1691,9 +1691,9 @@ typedef struct DecorationTable {
/* 0x76C */ PAL_PTR unk_76C[16];
/* 0x78C */ char unk_7AC[0x2C];
/* 0x7D8 */ s8 unk_7D8;
/* 0x7D9 */ s8 unk_7D9;
/* 0x7DA */ char unk_7DA;
/* 0x7DB */ s8 unk_7DB;
/* 0x7D9 */ s8 blurBufferPos;
/* 0x7DA */ s8 blurDrawCount;
/* 0x7DB */ s8 blurEnableCount;
/* 0x7DC */ s16 yaw[16];
/* 0x7FC */ s16 posX[16];
/* 0x81C */ s16 posY[16];
@ -1703,7 +1703,7 @@ typedef struct DecorationTable {
/* 0x87C */ u8 rotX[16];
/* 0x88C */ u8 rotY[16];
/* 0x89C */ u8 rotZ[16];
/* 0x8AC */ s8 effectType; /* 0 = blur, 14 = none? */
/* 0x8AC */ s8 blurDisableDelay; // infinite when zero
/* 0x8AD */ char unk_8AD[3];
/* substruct for decorations? */
/* 0x8B0 */ struct EffectInstance* effect[MAX_ACTOR_DECORATIONS];

View File

@ -17,7 +17,7 @@ f32 shim_clamp_angle(f32 theta);
f32 shim_sin_deg(f32 x);
f32 shim_cos_deg(f32 x);
f32 shim_atan2(f32 startX, f32 startZ, f32 endX, f32 endZ);
s32 shim_npc_raycast_down_sides(s32, f32*, f32*, f32*, f32*);
b32 shim_npc_raycast_down_sides(s32, f32*, f32*, f32*, f32*);
s32 shim_load_effect(s32 effectIndex);
float shim_sqrtf(float value);
void shim_mdl_draw_hidden_panel_surface(Gfx**, u16 treeIndex);

View File

@ -179,20 +179,27 @@ typedef struct SnowflakeFXData {
/* 0x28 */ s32 unk_28;
} SnowflakeFXData; // size = 0x2C
enum StarFXTypes {
FX_STAR_BACKGROUND = 0,
FX_STAR_FOREGROUND = 1,
FX_STAR_LARGE_BOUNCING = 2,
FX_STAR_SMALL_BOUNCING = 3,
};
typedef struct StarFXData {
/* 0x000 */ s32 unk_00;
/* 0x000 */ b32 canBounce;
/* 0x004 */ Vec3f pos;
/* 0x010 */ Vec3f vel;
/* 0x01C */ f32 unk_1C;
/* 0x020 */ f32 unk_20;
/* 0x024 */ f32 angle;
/* 0x028 */ s32 unk_28;
/* 0x02C */ f32 unk_2C;
/* 0x030 */ s32 unk_30;
/* 0x034 */ f32 unk_34;
/* 0x01C */ f32 bounceTime;
/* 0x020 */ f32 trailAngle;
/* 0x024 */ f32 starAngle;
/* 0x028 */ f32 unk_28;
/* 0x02C */ f32 starAngleVel;
/* 0x030 */ s32 timeLeft;
/* 0x034 */ f32 projVel;
/* 0x038 */ s32 type;
/* 0x03C */ s32 unk_3C;
/* 0x040 */ Mtx unk_40[8];
/* 0x03C */ s32 trailMatrixPos;
/* 0x040 */ Mtx trailMatrices[8];
/* 0x240 */ f32 scale;
/* 0x244 */ s32 primR;
/* 0x248 */ s32 primG;
@ -355,19 +362,23 @@ typedef struct SmokeRingFXData {
/* 0x40 */ s32 unk_40;
} SmokeRingFXData; // size = 0x44
enum DamageStarsFXTypes {
FX_DAMAGE_STARS_0 = 0,
FX_DAMAGE_STARS_1 = 1,
FX_DAMAGE_STARS_2 = 2,
FX_DAMAGE_STARS_3 = 3,
FX_DAMAGE_STARS_4 = 4,
};
typedef struct DamageStarsFXData {
/* 0x00 */ s32 unk_00;
/* 0x14 */ f32 unk_04;
/* 0x18 */ f32 unk_08;
/* 0x1C */ f32 unk_0C;
/* 0x10 */ f32 unk_10;
/* 0x14 */ f32 unk_14;
/* 0x18 */ f32 unk_18;
/* 0x1C */ f32 unk_1C;
/* 0x20 */ f32 unk_20;
/* 0x24 */ s32 unk_24;
/* 0x28 */ s32 unk_28;
/* 0x2C */ s32 unk_2C;
/* 0x00 */ s32 type;
/* 0x14 */ Vec3f pos;
/* 0x10 */ Vec3f vel;
/* 0x1C */ f32 rollAngle;
/* 0x20 */ f32 rollAngleVel;
/* 0x24 */ s32 alpha;
/* 0x28 */ s32 timeLeft;
/* 0x2C */ s32 lifetime;
} DamageStarsFXData; // size = 0x30
typedef struct ExplosionFXData {
@ -1916,16 +1927,15 @@ typedef struct Effect6BFXData {
} Effect6BFXData; // size = 0x44
typedef struct TattleWindowFXData {
/* 0x00 */ s32 unk_00;
/* 0x00 */ s32 type;
/* 0x04 */ Vec3f pos;
/* 0x10 */ s32 unk_10;
/* 0x10 */ s32 timeLeft;
/* 0x14 */ s32 unk_14;
/* 0x18 */ f32 unk_18;
/* 0x1C */ f32 scale;
/* 0x20 */ Vec3f rot;
/* 0x2C */ Vec2f offset;
/* 0x34 */ u8 unk_34;
/* 0x35 */ u8 unk_35;
/* 0x34 */ Vec2bu closeAmt;
} TattleWindowFXData; // size = 0x38
typedef struct ShinyFlareFXData {
@ -2594,11 +2604,11 @@ typedef struct EffectInstance {
// composite struct for watt effects -- NOT the same as StaticStatusFXData
typedef struct WattEffectData {
/* 0x00 */ s32 flags;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 angle;
/* 0x0C */ s32 unk_0C;
/* 0x10 */ s32 unk_10;
/* 0x00 */ s32 initialized;
/* 0x04 */ s32 isBouncing;
/* 0x08 */ s32 bouncePhase;
/* 0x0C */ s32 isActive;
/* 0x10 */ s32 currentEffectIndex;
/* 0x14 */ EffectInstance* effect1;
/* 0x18 */ EffectInstance* effect2;
/* 0x1C */ s32 debuff;

File diff suppressed because it is too large Load Diff

View File

@ -131,7 +131,7 @@ void appendGfx_player_actor(void*);
void appendGfx_player_actor_blur(Actor*);
void appendGfx_player_actor_reflection(void*);
void func_80254610(Actor*);
void force_disable_actor_blur(Actor*);
void player_handle_floor_collider_type(s32 colliderID);
f32 player_fall_distance(void);
@ -403,7 +403,7 @@ s32 is_point_within_region(s32 shape, f32 pointX, f32 pointY, f32 centerX, f32 c
PlayerData* get_player_data(void);
b32 npc_raycast_down_around(s32, f32*, f32*, f32*, f32*, f32, f32);
s32 npc_raycast_down_sides(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32* hitDepth);
b32 npc_raycast_down_sides(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32* hitDepth);
s32 npc_raycast_up(s32, f32*, f32*, f32*, f32*);
s32 npc_raycast_up_corners(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32* hitDepth, f32 yaw, f32 radius);
s32 player_raycast_up_corners(PlayerStatus*, f32*, f32*, f32*, f32*, f32);
@ -990,9 +990,9 @@ void clear_script_flags(Evt* script, s32 flags);
void disable_player_blur(void);
void enable_player_blur(void);
void func_80254950(void);
void func_802549A0(void);
void func_802549C0(void);
void reset_player_blur(void);
void force_disable_player_blur(void);
void force_disable_player_blur_immediately(void);
void func_8023E104(void);
void func_8023E11C(void);

View File

@ -141,7 +141,7 @@ ApiStatus SetPartEventBits(Evt* script, s32 isInitialCall);
ApiStatus GetPartEventFlags(Evt* script, s32 isInitialCall);
ApiStatus HPBarToHome(Evt* script, s32 isInitialCall);
ApiStatus HPBarToCurrent(Evt* script, s32 isInitialCall);
ApiStatus func_8026D940(Evt* script, s32 isInitialCall);
ApiStatus SetHPBarOffset(Evt* script, s32 isInitialCall);
ApiStatus SetActorStatusOffsets(Evt* script, s32 isInitialCall);
ApiStatus SummonEnemy(Evt* script, s32 isInitialCall);
ApiStatus GetOwnerID(Evt* script, s32 isInitialCall);
@ -213,7 +213,7 @@ ApiStatus ResumeTakeTurn(Evt* script, s32 isInitialCall);
ApiStatus BindIdle(Evt* script, s32 isInitialCall);
ApiStatus EnableIdleScript(Evt* script, s32 isInitialCall);
ApiStatus BindHandleEvent(Evt* script, s32 isInitialCall);
ApiStatus BindNextTurn(Evt* script, s32 isInitialCall);
ApiStatus BindHandlePhase(Evt* script, s32 isInitialCall);
ApiStatus JumpToGoal(Evt* script, s32 isInitialCall);
ApiStatus IdleJumpToGoal(Evt* script, s32 isInitialCall);
ApiStatus JumpWithBounce(Evt* script, s32 isInitialCall);
@ -286,7 +286,7 @@ ApiStatus CamPresetUpdate_K(Evt* script, s32 isInitialCall);
ApiStatus CamPresetUpdate_L(Evt* script, s32 isInitialCall);
ApiStatus SetBattleCamPos(Evt* script, s32 isInitialCall);
ApiStatus SetBattleCamParam(Evt* script, s32 isInitialCall);
ApiStatus func_8026DF88(Evt* script, s32 isInitialCall);
ApiStatus GetPartAnimNotify(Evt* script, s32 isInitialCall);
ApiStatus InitAnimatedModels(Evt* script, s32 isInitialCall);
ApiStatus func_8024CE9C(Evt* script, s32 isInitialCall);
ApiStatus func_802CAE50(Evt* script, s32 isInitialCall);

View File

@ -720,8 +720,8 @@ void btl_state_update_begin_player_turn(void) {
if (btl_cam_is_moving_done()) {
gBattleStatus.flags1 &= ~BS_FLAGS1_PARTNER_ACTING;
reset_actor_turn_info();
battleStatus->unk_86 = 127;
battleStatus->blockResult = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
battleStatus->blockResult = BLOCK_RESULT_NONE;
battleStatus->selectedMoveID = 0;
gBattleStatus.flags1 |= BS_FLAGS1_SHOW_PLAYER_DECORATIONS;
gBattleStatus.flags2 &= ~BS_FLAGS2_1000000;
@ -1066,8 +1066,8 @@ void btl_state_update_switch_to_player(void) {
gBattleStatus.flags1 &= ~BS_FLAGS1_PARTNER_ACTING;
reset_actor_turn_info();
gBattleStatus.selectedMoveID = MOVE_NONE;
gBattleStatus.unk_86 = 127;
gBattleStatus.blockResult = 127;
gBattleStatus.actionResult = ACTION_RESULT_NONE;
gBattleStatus.blockResult = BLOCK_RESULT_NONE;
gBattleStatus.flags1 |= BS_FLAGS1_SHOW_PLAYER_DECORATIONS;
player->flags |= ACTOR_FLAG_8000000;
if (partner != NULL) {
@ -1121,8 +1121,8 @@ void btl_state_update_begin_partner_turn(void) {
D_8029F258 = 0;
reset_actor_turn_info();
partner = battleStatus->partnerActor;
battleStatus->unk_86 = 127;
battleStatus->blockResult = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
battleStatus->blockResult = BLOCK_RESULT_NONE;
D_8029F254 = 0;
gBattleStatus.flags1 |= BS_FLAGS1_PARTNER_ACTING;
gBattleStatus.flags2 |= BS_FLAGS1_PLAYER_IN_BACK;
@ -1213,8 +1213,8 @@ void btl_state_update_switch_to_partner(void) {
reset_actor_turn_info();
gBattleStatus.flags1 |= BS_FLAGS1_PARTNER_ACTING;
gBattleStatus.selectedMoveID = MOVE_NONE;
gBattleStatus.unk_86 = 127;
gBattleStatus.blockResult = 127;
gBattleStatus.actionResult = ACTION_RESULT_NONE;
gBattleStatus.blockResult = BLOCK_RESULT_NONE;
gBattleStatus.flags1 |= BS_FLAGS1_SHOW_PLAYER_DECORATIONS;
player->flags |= (ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000);
partner->flags |= ACTOR_FLAG_8000000;
@ -2597,8 +2597,8 @@ void btl_state_update_player_move(void) {
if (gBattleSubState == BTL_SUBSTATE_PLAYER_MOVE_INIT) {
battleStatus->stateFreezeCount = 0;
battleStatus->unk_86 = 127;
battleStatus->blockResult = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
battleStatus->blockResult = BLOCK_RESULT_NONE;
battleStatus->lastAttackDamage = 0;
battleStatus->curDamageSource = DMG_SRC_DEFAULT;
gBattleStatus.flags1 &= ~BS_FLAGS1_AUTO_SUCCEED_ACTION;
@ -3155,8 +3155,8 @@ void btl_state_update_partner_move(void) {
break;
}
battleStatus->stateFreezeCount = 0;
battleStatus->unk_86 = 127;
battleStatus->blockResult = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
battleStatus->blockResult = BLOCK_RESULT_NONE;
battleStatus->curDamageSource = DMG_SRC_DEFAULT;
gBattleStatus.flags1 &= ~BS_FLAGS1_AUTO_SUCCEED_ACTION;
gBattleStatus.flags1 &= ~BS_FLAGS1_MENU_OPEN;
@ -3582,8 +3582,8 @@ void btl_state_update_enemy_move(void) {
battleStatus->stateFreezeCount = 0;
battleStatus->lastAttackDamage = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 127;
battleStatus->blockResult = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
battleStatus->blockResult = BLOCK_RESULT_NONE;
battleStatus->curDamageSource = DMG_SRC_DEFAULT;
reset_actor_turn_info();
gBattleStatus.flags1 |= BS_FLAGS1_100;

View File

@ -238,7 +238,7 @@ void initialize_battle(void) {
void func_8023E3FC(void) {
}
void update_actor_shadows(void) {
void update_nonplayer_actor_shadows(void) {
if (gBattleStatus.flags1 & BS_FLAGS1_ACTORS_VISIBLE) {
update_enemy_shadows();
update_hero_shadows();
@ -410,7 +410,7 @@ void btl_update(void) {
update_action_ratings();
update_health_bars();
btl_popup_messages_update();
update_actor_shadows();
update_nonplayer_actor_shadows();
if (battleStatus->darknessMode != BTL_DARKNESS_STATE_LOCKED) {
u8 paramType;

File diff suppressed because it is too large Load Diff

View File

@ -32,14 +32,14 @@ HitResult calc_item_check_hit(void) {
}
if (actor->stoneStatus == STATUS_KEY_STONE) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return HIT_RESULT_IMMUNE;
}
if ((battleStatus->curAttackElement & DAMAGE_TYPE_JUMP)
&& (actorPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP))
{
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return HIT_RESULT_LANDED_ON_SPIKE;
}
@ -123,7 +123,7 @@ HitResult calc_item_damage_enemy(void) {
}
if (target->stoneStatus == STATUS_KEY_STONE) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 1);
show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 0);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
@ -164,7 +164,7 @@ HitResult calc_item_damage_enemy(void) {
if (!(battleStatus->curAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
dispatchEvent = EVENT_ZERO_DAMAGE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
battleStatus->lastAttackDamage = 0;
} else {
dispatchEvent = EVENT_ZERO_DAMAGE;
@ -195,7 +195,7 @@ HitResult calc_item_damage_enemy(void) {
if (targetPart->flags & ACTOR_PART_FLAG_2000) {
dispatch_event_actor(target, dispatchEvent);
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return HIT_RESULT_NO_DAMAGE;
}
@ -391,7 +391,7 @@ HitResult calc_item_damage_enemy(void) {
hitResult = HIT_RESULT_HIT;
sp1C = TRUE;
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE | BS_FLAGS1_10 | BS_FLAGS1_SHOW_PLAYER_DECORATIONS | BS_FLAGS1_ACTORS_VISIBLE;
sfx_play_sound_at_position(SOUND_0231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_0231, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
wasStatusInflicted = TRUE;
gBattleStatus.flags1 |= BS_FLAGS1_40;
} else {
@ -407,7 +407,7 @@ HitResult calc_item_damage_enemy(void) {
|| ((gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) && !(gBattleStatus.flags1 & BS_FLAGS1_80))
) {
if (battleStatus->lastAttackDamage > 0) {
sfx_play_sound_at_position(SOUND_0231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_0231, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->lastAttackDamage > 0 || (battleStatus->curAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS) && sp1C) {
@ -451,18 +451,18 @@ HitResult calc_item_damage_enemy(void) {
if (battleStatus->lastAttackDamage > 0 && !partImmuneToElement) {
func_80267018(target, 1);
if (isFireDamage) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isShockDamage) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isIceDamage) {
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
}
if ((battleStatus->lastAttackDamage <= 0 && !wasStatusInflicted) || (targetPart->flags & ACTOR_FLAG_2000)) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->curAttackStatus & STATUS_FLAG_SLEEP) && wasStatusInflicted) {
@ -470,35 +470,35 @@ HitResult calc_item_damage_enemy(void) {
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->curAttackStatus & STATUS_FLAG_DIZZY) && wasStatusInflicted) {
script = start_script(&EVS_PlayDizzyHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->curAttackStatus & STATUS_FLAG_PARALYZE) && wasStatusInflicted) {
script = start_script(&EVS_PlayParalyzeHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->curAttackStatus & STATUS_FLAG_POISON) && wasStatusInflicted) {
script = start_script(&EVS_PlayPoisonHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->curAttackStatus & STATUS_FLAG_STOP) && wasStatusInflicted) {
script = start_script(&EVS_PlayStopHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->curAttackStatus & STATUS_FLAG_FROZEN) && wasStatusInflicted) {
script = start_script(&EVS_PlayFreezeHitFX, EVT_PRIORITY_A, 0);
@ -506,7 +506,7 @@ HitResult calc_item_damage_enemy(void) {
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
script->varTablePtr[3] = target;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->curAttackStatus & STATUS_FLAG_SHRINK) && wasStatusInflicted) {
script = start_script(&EVS_PlayShrinkHitFX, EVT_PRIORITY_A, 0);
@ -514,10 +514,10 @@ HitResult calc_item_damage_enemy(void) {
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
script->varTablePtr[3] = target;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->curAttackElement & DAMAGE_TYPE_SMASH) && (target->actorType == ACTOR_TYPE_GOOMNUT_TREE)) {
sfx_play_sound_at_position(SOUND_SMASH_GOOMNUT_TREE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_SMACK_TREE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
show_actor_health_bar(target);

View File

@ -142,10 +142,10 @@ ApiStatus ActorSpeak(Evt* script, s32 isInitialCall) {
gSpeakingActorPart = part;
headX = actor->curPos.x + actor->headOffset.x;
if (!(actor->flags & ACTOR_FLAG_8000)) {
headY = actor->size.y + (actor->curPos.y + actor->headOffset.y);
if (!(actor->flags & ACTOR_FLAG_HALF_HEIGHT)) {
headY = actor->curPos.y + actor->headOffset.y + actor->size.y;
} else {
headY = actor->curPos.y + actor->headOffset.y + (actor->size.y / 2);
headY = actor->curPos.y + actor->headOffset.y + actor->size.y / 2;
}
headZ = actor->curPos.z + actor->headOffset.z;
@ -168,11 +168,10 @@ ApiStatus ActorSpeak(Evt* script, s32 isInitialCall) {
part = gSpeakingActorPart;
headX = actor->curPos.x + actor->headOffset.x;
if (!(actor->flags & ACTOR_FLAG_8000)) {
headY = actor->size.y + (actor->curPos.y + actor->headOffset.y);
if (!(actor->flags & ACTOR_FLAG_HALF_HEIGHT)) {
headY = actor->curPos.y + actor->headOffset.y + actor->size.y;
} else {
headY = actor->headOffset.y;
headY = actor->curPos.y + actor->headOffset.y + (actor->size.y / 2);
headY = actor->curPos.y + actor->headOffset.y + actor->size.y / 2;
}
headZ = actor->curPos.z + actor->headOffset.z;
@ -236,7 +235,7 @@ ApiStatus EndActorSpeech(Evt* script, s32 isInitialCall) {
ActorPart* actorPart = gSpeakingActorPart;
x = actor->curPos.x + actor->headOffset.x;
if (!(gSpeakingActor->flags & ACTOR_FLAG_8000)) {
if (!(gSpeakingActor->flags & ACTOR_FLAG_HALF_HEIGHT)) {
y = actor->curPos.y + actor->headOffset.y + actor->size.y ;
} else {
y = actor->curPos.y + actor->headOffset.y + actor->size.y / 2;
@ -401,7 +400,7 @@ ApiStatus PlaySoundAtActor(Evt* script, s32 isInitialCall) {
}
actor = get_actor(actorID);
sfx_play_sound_at_position(soundID, SOUND_SPACE_MODE_0, actor->curPos.x, actor->curPos.y, actor->curPos.z);
sfx_play_sound_at_position(soundID, SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
return ApiStatus_DONE2;
}
@ -418,7 +417,7 @@ ApiStatus PlaySoundAtPart(Evt* script, s32 isInitialCall) {
}
part = get_actor_part(get_actor(actorID), partID);
sfx_play_sound_at_position(soundID, SOUND_SPACE_MODE_0, part->curPos.x, part->curPos.y, part->curPos.z);
sfx_play_sound_at_position(soundID, SOUND_SPACE_DEFAULT, part->curPos.x, part->curPos.y, part->curPos.z);
return ApiStatus_DONE2;
}
@ -436,7 +435,7 @@ ApiStatus PlayLoopingSoundAtActor(Evt* script, s32 isInitialCall) {
actor = get_actor(actorID);
actor->loopingSoundID[idx] = soundID;
sfx_play_sound_at_position(soundID, SOUND_SPACE_MODE_0, actor->curPos.x, actor->curPos.y, actor->curPos.z);
sfx_play_sound_at_position(soundID, SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
return ApiStatus_DONE2;
}

View File

@ -191,8 +191,8 @@ void enable_actor_blur(Actor* actor) {
s32 i, j;
s32 numParts;
decorationTable->effectType = 0;
decorationTable->unk_7DB++;
decorationTable->blurDisableDelay = 0;
decorationTable->blurEnableCount++;
actor->flags |= ACTOR_FLAG_BLUR_ENABLED;
partsTable = actor->partsTable;
numParts = actor->numParts;
@ -201,7 +201,7 @@ void enable_actor_blur(Actor* actor) {
if (partsTable->idleAnimations != NULL && !(partsTable->flags & ACTOR_PART_FLAG_2)) {
decorationTable = partsTable->decorationTable;
decorationTable->unk_7D8 = 0;
decorationTable->unk_7D9 = 0;
decorationTable->blurBufferPos = 0;
for (j = 0; j < ARRAY_COUNT(decorationTable->posX); j++) {
decorationTable->posX[j] = partsTable->curPos.x;
decorationTable->posY[j] = partsTable->curPos.y;
@ -225,10 +225,10 @@ void disable_actor_blur(Actor* actor) {
if ((actorPart->idleAnimations != NULL) && !(actorPart->flags & ACTOR_PART_FLAG_2)) {
DecorationTable* decorationTable = actorPart->decorationTable;
if (decorationTable->unk_7DB != 0) {
decorationTable->unk_7DB--;
if (decorationTable->unk_7DB == 0) {
decorationTable->effectType = 20;
if (decorationTable->blurEnableCount != 0) {
decorationTable->blurEnableCount--;
if (decorationTable->blurEnableCount == 0) {
decorationTable->blurDisableDelay = 20;
}
}
}
@ -240,24 +240,24 @@ void reset_actor_blur(Actor* actor) {
if ((actorPart->idleAnimations != NULL) && !(actorPart->flags & ACTOR_PART_FLAG_2)) {
DecorationTable* decorationTable = actorPart->decorationTable;
if (decorationTable->unk_7DB != 0) {
decorationTable->unk_7DB--;
if (decorationTable->unk_7DB == 0) {
if (decorationTable->blurEnableCount != 0) {
decorationTable->blurEnableCount--;
if (decorationTable->blurEnableCount == 0) {
actor->flags &= ~ACTOR_FLAG_BLUR_ENABLED;
decorationTable->effectType = 1;
decorationTable->blurDisableDelay = 1;
}
}
}
}
void func_80254610(Actor* actor) {
void force_disable_actor_blur(Actor* actor) {
ActorPart* actorPart = actor->partsTable;
if (actorPart->idleAnimations != NULL && !(actorPart->flags & ACTOR_PART_FLAG_2)) {
DecorationTable* decorationTable = actorPart->decorationTable;
decorationTable->unk_7DB = 0;
decorationTable->effectType = 20;
decorationTable->blurEnableCount = 0;
decorationTable->blurDisableDelay = 20;
}
}
@ -273,8 +273,8 @@ void reset_partner_blur(void) {
reset_actor_blur(gBattleStatus.partnerActor);
}
void func_802546B0(void) {
func_80254610(gBattleStatus.partnerActor);
void force_disable_partner_blur(void) {
force_disable_actor_blur(gBattleStatus.partnerActor);
}
void enable_player_blur(void) {
@ -283,11 +283,11 @@ void enable_player_blur(void) {
DecorationTable* decorationTable = partsTable->decorationTable;
s32 i;
decorationTable->effectType = 0;
decorationTable->unk_7DB++;
decorationTable->blurDisableDelay = 0;
decorationTable->blurEnableCount++;
playerActor->flags |= ACTOR_FLAG_BLUR_ENABLED;
decorationTable->unk_7D8 = 0;
decorationTable->unk_7D9 = 0;
decorationTable->blurBufferPos = 0;
for (i = 0; i < ARRAY_COUNT(decorationTable->posX); i++) {
decorationTable->posX[i] = partsTable->curPos.x;
@ -304,51 +304,57 @@ void enable_player_blur(void) {
}
void disable_player_blur(void) {
DecorationTable* decorationTable = gBattleStatus.playerActor->partsTable->decorationTable;
Actor* playerActor = gBattleStatus.playerActor;
ActorPart* partsTable = playerActor->partsTable;
DecorationTable* decorationTable = partsTable->decorationTable;
if (decorationTable->unk_7DB != 0) {
decorationTable->unk_7DB--;
if (decorationTable->unk_7DB == 0) {
decorationTable->effectType = 20;
if (decorationTable->blurEnableCount != 0) {
decorationTable->blurEnableCount--;
if (decorationTable->blurEnableCount == 0) {
decorationTable->blurDisableDelay = 20;
}
}
}
void func_80254950(void) {
void reset_player_blur(void) {
Actor* playerActor = gBattleStatus.playerActor;
DecorationTable* decorationTable = playerActor->partsTable->decorationTable;
ActorPart* partsTable = playerActor->partsTable;
DecorationTable* decorationTable = partsTable->decorationTable;
if (decorationTable->unk_7DB != 0) {
decorationTable->unk_7DB--;
if (decorationTable->unk_7DB == 0) {
if (decorationTable->blurEnableCount != 0) {
decorationTable->blurEnableCount--;
if (decorationTable->blurEnableCount == 0) {
playerActor->flags &= ~ACTOR_FLAG_BLUR_ENABLED;
decorationTable->effectType = 1;
decorationTable->blurDisableDelay = 1;
}
}
}
void func_802549A0(void) {
DecorationTable* decorationTable = gBattleStatus.playerActor->partsTable->decorationTable;
void force_disable_player_blur(void) {
Actor* playerActor = gBattleStatus.playerActor;
ActorPart* partsTable = playerActor->partsTable;
DecorationTable* decorationTable = partsTable->decorationTable;
decorationTable->unk_7DB = 0;
decorationTable->effectType = 20;
decorationTable->blurEnableCount = 0;
decorationTable->blurDisableDelay = 20;
}
void func_802549C0(void) {
void force_disable_player_blur_immediately(void) {
Actor* playerActor = gBattleStatus.playerActor;
DecorationTable* decorationTable = playerActor->partsTable->decorationTable;
ActorPart* partsTable = playerActor->partsTable;
DecorationTable* decorationTable = partsTable->decorationTable;
playerActor->flags &= ~ACTOR_FLAG_BLUR_ENABLED;
decorationTable->unk_7DB = 0;
decorationTable->effectType = 1;
decorationTable->blurEnableCount = 0;
decorationTable->blurDisableDelay = 1;
}
void func_802549F4(Actor* actor) {
void update_player_actor_blur_history(Actor* actor) {
ActorPart* partsTable = actor->partsTable;
DecorationTable* decorationTable = partsTable->decorationTable;
if (!(partsTable->flags & ACTOR_PART_FLAG_INVISIBLE) && partsTable->idleAnimations != NULL) {
s32 i = decorationTable->unk_7D9;
s32 i = decorationTable->blurBufferPos;
decorationTable->posX[i] = partsTable->curPos.x;
decorationTable->posY[i] = partsTable->curPos.y;
@ -366,7 +372,7 @@ void func_802549F4(Actor* actor) {
if (i >= ARRAY_COUNT(decorationTable->posX)) {
i = 0;
}
decorationTable->unk_7D9 = i;
decorationTable->blurBufferPos = i;
}
}
@ -375,105 +381,110 @@ void appendGfx_player_actor_blur(Actor* actor) {
Matrix4f mtxScale;
Matrix4f mtxPivotOn, mtxPivotOff, mtxTranslate;
Matrix4f mtxTransform, mtxTemp;
s32 delay;
s32 num;
s32 strideIdx;
s32 drawIdx;
s32 yaw;
ActorPart* partTable;
DecorationTable* decorationTable;
f32 rotX, rotY, rotZ;
s32 prevOpacity;
s32 temp_v1;
s32 opacity;
s32 pivotOffsetX;
s32 pivotOffsetY;
s32 bufPos;
s32 newOpacityBase;
s32 newOpacityModulus;
s32 blurOpacityBase;
s32 opacityLossIncrement;
f32 x, y, z;
partTable = actor->partsTable;
decorationTable = partTable->decorationTable;
if (decorationTable->effectType != 0) {
decorationTable->effectType--;
if (decorationTable->effectType == 0) {
if (decorationTable->blurDisableDelay != 0) {
decorationTable->blurDisableDelay--;
if (decorationTable->blurDisableDelay == 0) {
actor->flags &= ~ACTOR_FLAG_BLUR_ENABLED;
return;
}
}
if (!(partTable->flags & ACTOR_PART_FLAG_INVISIBLE) && partTable->idleAnimations != NULL) {
delay = 0;
num = 0;
bufPos = decorationTable->unk_7D9;
bufPos = decorationTable->blurBufferPos;
strideIdx = 0;
drawIdx = 0;
while (1) {
while (TRUE) {
bufPos--;
delay++;
strideIdx++;
if (bufPos < 0) {
bufPos = ARRAY_COUNT(decorationTable->posX) - 1;
}
if (bufPos == decorationTable->unk_7D9) {
if (bufPos == decorationTable->blurBufferPos) {
break;
}
if (delay >= 3) {
delay = 0;
num++;
if (decorationTable->unk_7DA < num) {
break;
}
temp_v1 = partTable->opacity;
x = decorationTable->posX[bufPos];
y = decorationTable->posY[bufPos];
z = decorationTable->posZ[bufPos];
yaw = decorationTable->yaw[bufPos];
pivotOffsetX = decorationTable->rotPivotOffsetX[bufPos];
pivotOffsetY = decorationTable->rotPivotOffsetY[bufPos];
rotX = decorationTable->rotX[bufPos] * 2;
rotY = decorationTable->rotY[bufPos] * 2;
rotZ = decorationTable->rotZ[bufPos] * 2;
newOpacityBase = 120;
newOpacityModulus = 20;
if (temp_v1 < 50) {
newOpacityBase = 50;
newOpacityModulus = 8;
} else if (temp_v1 < 100) {
newOpacityBase = 70;
newOpacityModulus = 10;
} else if (temp_v1 < 150) {
newOpacityBase = 100;
newOpacityModulus = 15;
}
guTranslateF(mtxTranslate, x, y, z);
guTranslateF(mtxPivotOn, -pivotOffsetX, -pivotOffsetY, 0.0f);
guTranslateF(mtxPivotOff, pivotOffsetX, pivotOffsetY, 0.0f);
guRotateF(mtxRotX, rotX, 1.0f, 0.0f, 0.0f);
guRotateF(mtxRotY, rotY, 0.0f, 1.0f, 0.0f);
guRotateF(mtxRotZ, rotZ, 0.0f, 0.0f, 1.0f);
guMtxCatF(mtxRotX, mtxRotY, mtxTransform);
guMtxCatF(mtxTransform, mtxRotZ, mtxRotation);
guScaleF(mtxScale, actor->scale.x * SPRITE_WORLD_SCALE_D * actor->scalingFactor,
actor->scale.y * SPRITE_WORLD_SCALE_D * actor->scalingFactor * partTable->verticalStretch,
actor->scale.z * SPRITE_WORLD_SCALE_D);
guMtxCatF(mtxScale, mtxPivotOn, mtxTemp);
guMtxCatF(mtxTemp, mtxRotation, mtxTransform);
guMtxCatF(mtxTransform, mtxPivotOff, mtxTemp);
guMtxCatF(mtxTemp, mtxTranslate, mtxTransform);
prevOpacity = partTable->opacity;
partTable->opacity = newOpacityBase - (num * newOpacityModulus);
render_with_adjusted_palettes(SPRITE_MODE_PLAYER, partTable, clamp_angle(yaw + 180), mtxTransform, 1);
partTable->opacity = prevOpacity;
// only draw every third blur frame
if (strideIdx < 3) {
continue;
}
strideIdx = 0;
drawIdx++;
if (decorationTable->blurDrawCount < drawIdx) {
break;
}
opacity = partTable->opacity;
x = decorationTable->posX[bufPos];
y = decorationTable->posY[bufPos];
z = decorationTable->posZ[bufPos];
yaw = decorationTable->yaw[bufPos];
pivotOffsetX = decorationTable->rotPivotOffsetX[bufPos];
pivotOffsetY = decorationTable->rotPivotOffsetY[bufPos];
rotX = decorationTable->rotX[bufPos] * 2;
rotY = decorationTable->rotY[bufPos] * 2;
rotZ = decorationTable->rotZ[bufPos] * 2;
blurOpacityBase = 120;
opacityLossIncrement = 20;
if (opacity < 50) {
blurOpacityBase = 50;
opacityLossIncrement = 8;
} else if (opacity < 100) {
blurOpacityBase = 70;
opacityLossIncrement = 10;
} else if (opacity < 150) {
blurOpacityBase = 100;
opacityLossIncrement = 15;
}
guTranslateF(mtxTranslate, x, y, z);
guTranslateF(mtxPivotOn, -pivotOffsetX, -pivotOffsetY, 0.0f);
guTranslateF(mtxPivotOff, pivotOffsetX, pivotOffsetY, 0.0f);
guRotateF(mtxRotX, rotX, 1.0f, 0.0f, 0.0f);
guRotateF(mtxRotY, rotY, 0.0f, 1.0f, 0.0f);
guRotateF(mtxRotZ, rotZ, 0.0f, 0.0f, 1.0f);
guMtxCatF(mtxRotX, mtxRotY, mtxTransform);
guMtxCatF(mtxTransform, mtxRotZ, mtxRotation);
guScaleF(mtxScale, actor->scale.x * SPRITE_WORLD_SCALE_D * actor->scalingFactor,
actor->scale.y * SPRITE_WORLD_SCALE_D * actor->scalingFactor * partTable->verticalStretch,
actor->scale.z * SPRITE_WORLD_SCALE_D);
guMtxCatF(mtxScale, mtxPivotOn, mtxTemp);
guMtxCatF(mtxTemp, mtxRotation, mtxTransform);
guMtxCatF(mtxTransform, mtxPivotOff, mtxTemp);
guMtxCatF(mtxTemp, mtxTranslate, mtxTransform);
prevOpacity = partTable->opacity;
partTable->opacity = blurOpacityBase - (drawIdx * opacityLossIncrement);
render_with_adjusted_palettes(SPRITE_MODE_PLAYER, partTable, clamp_angle(yaw + 180), mtxTransform, 1);
partTable->opacity = prevOpacity;
}
}
}
void func_802550BC(s32 arg0, Actor* actor) {
void update_nonplayer_actor_blur_history(b32 isPartner, Actor* actor) {
s32 numParts = actor->numParts;
ActorPart* partsTable = actor->partsTable;
DecorationTable* decorationTable;
@ -484,7 +495,7 @@ void func_802550BC(s32 arg0, Actor* actor) {
partsTable = partsTable->nextPart;
} else {
decorationTable = partsTable->decorationTable;
j = decorationTable->unk_7D9;
j = decorationTable->blurBufferPos;
decorationTable->posX[j] = partsTable->curPos.x;
decorationTable->posY[j] = partsTable->curPos.y;
@ -502,12 +513,12 @@ void func_802550BC(s32 arg0, Actor* actor) {
if (j >= ARRAY_COUNT(decorationTable->posX)) {
j = 0;
}
decorationTable->unk_7D9 = j;
decorationTable->blurBufferPos = j;
}
}
}
void func_802552EC(s32 arg0, Actor* actor) {
void appendGfx_nonplayer_actor_blur(b32 isPartner, Actor* actor) {
DecorationTable* decorationTable;
ActorPart* partTable;
Matrix4f mtxRotX, mtxRotY, mtxRotZ, mtxRotation;
@ -516,16 +527,16 @@ void func_802552EC(s32 arg0, Actor* actor) {
Matrix4f mtxPivotOn, mtxPivotOff;
Matrix4f mtxActor, mtxPartScale;
s32 numParts;
s32 i, j, k, l;
s32 i, bufPos, strideIdx, drawIdx;
f32 x, y, z;
f32 rotX, rotY, rotZ;
s32 yaw;
s32 opacity;
s32 pivotX;
s32 pivotY;
s32 phi_fp;
s32 phi_s6;
s32 temp;
s32 blurOpacityBase;
s32 opacityLossIncrement;
s32 blurOpacity;
s32 flags;
guRotateF(mtxRotX, actor->rot.x, 1.0f, 0.0f, 0.0f);
@ -547,9 +558,9 @@ void func_802552EC(s32 arg0, Actor* actor) {
}
decorationTable = partTable->decorationTable;
if (decorationTable->effectType != 0) {
decorationTable->effectType--;
if (decorationTable->effectType == 0) {
if (decorationTable->blurDisableDelay != 0) {
decorationTable->blurDisableDelay--;
if (decorationTable->blurDisableDelay == 0) {
actor->flags &= ~ACTOR_FLAG_BLUR_ENABLED;
partTable = partTable->nextPart;
continue;
@ -565,59 +576,60 @@ void func_802552EC(s32 arg0, Actor* actor) {
guScaleF(mtxPartScale, actor->scale.x * SPRITE_WORLD_SCALE_D, actor->scale.y * SPRITE_WORLD_SCALE_D, actor->scale.z * SPRITE_WORLD_SCALE_D);
}
j = decorationTable->unk_7D9;
k = 0;
l = 0;
bufPos = decorationTable->blurBufferPos;
strideIdx = 0;
drawIdx = 0;
while (1) {
j--;
k++;
while (TRUE) {
bufPos--;
strideIdx++;
if (j < 0) {
j = 15;
if (bufPos < 0) {
bufPos = 15;
}
if (j == decorationTable->unk_7D9) {
if (bufPos == decorationTable->blurBufferPos) {
break;
}
if (k < 3) {
// only draw every third blur frame
if (strideIdx < 3) {
continue;
}
k = 0;
l++;
strideIdx = 0;
drawIdx++;
if (decorationTable->unk_7DA < l) {
if (decorationTable->blurDrawCount < drawIdx) {
break;
}
opacity = partTable->opacity;
x = decorationTable->posX[j];
y = decorationTable->posY[j];
z = decorationTable->posZ[j];
x = decorationTable->posX[bufPos];
y = decorationTable->posY[bufPos];
z = decorationTable->posZ[bufPos];
yaw = decorationTable->yaw[j];
yaw = decorationTable->yaw[bufPos];
pivotX = decorationTable->rotPivotOffsetX[j];
pivotY = decorationTable->rotPivotOffsetY[j];
pivotX = decorationTable->rotPivotOffsetX[bufPos];
pivotY = decorationTable->rotPivotOffsetY[bufPos];
rotX = decorationTable->rotX[j] * 2;
rotY = decorationTable->rotY[j] * 2;
rotZ = decorationTable->rotZ[j] * 2;
rotX = decorationTable->rotX[bufPos] * 2;
rotY = decorationTable->rotY[bufPos] * 2;
rotZ = decorationTable->rotZ[bufPos] * 2;
phi_fp = 120;
phi_s6 = 20;
blurOpacityBase = 120;
opacityLossIncrement = 20;
if (opacity < 50) {
phi_fp = 50;
phi_s6 = 8;
blurOpacityBase = 50;
opacityLossIncrement = 8;
} else if (opacity < 100) {
phi_fp = 70;
phi_s6 = 10;
blurOpacityBase = 70;
opacityLossIncrement = 10;
} else if (opacity < 150) {
phi_fp = 100;
phi_s6 = 15;
blurOpacityBase = 100;
opacityLossIncrement = 15;
}
if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
@ -647,37 +659,37 @@ void func_802552EC(s32 arg0, Actor* actor) {
guMtxCatF(mtxTemp, mtxTranslate, mtxTransform);
flags = ACTOR_PART_FLAG_80000000;
temp = phi_fp - l * phi_s6;
if (arg0 == 0) {
spr_draw_npc_sprite(partTable->spriteInstanceID | flags, yaw, temp, 0, mtxTransform);
blurOpacity = blurOpacityBase - drawIdx * opacityLossIncrement;
if (!isPartner) {
spr_draw_npc_sprite(partTable->spriteInstanceID | flags, yaw, blurOpacity, 0, mtxTransform);
} else {
spr_draw_npc_sprite(partTable->spriteInstanceID | flags, clamp_angle(yaw + 180), temp, 0, mtxTransform);
spr_draw_npc_sprite(partTable->spriteInstanceID | flags, clamp_angle(yaw + 180), blurOpacity, 0, mtxTransform);
}
}
}
}
void func_8025593C(Actor* actor) {
func_802550BC(0, actor);
void update_enemy_actor_blur_history(Actor* actor) {
update_nonplayer_actor_blur_history(FALSE, actor);
}
void appendGfx_enemy_actor_blur(void* data) {
Actor* actor = data;
func_802552EC(0, actor);
appendGfx_nonplayer_actor_blur(FALSE, actor);
}
void func_8025597C(Actor* actor) {
func_802550BC(1, actor);
void update_partner_actor_blur_history(Actor* actor) {
update_nonplayer_actor_blur_history(TRUE, actor);
}
void appendGfx_partner_actor_blur(void* data) {
Actor* actor = data;
func_802552EC(1, actor);
appendGfx_nonplayer_actor_blur(TRUE, actor);
}
void update_actor_shadow(s32 arg0, Actor* actor) {
void update_nonplayer_actor_shadow(b32 isPartner, Actor* actor) {
Camera* camera = &gCameras[CAM_BATTLE];
ActorPart* actorPart;
Shadow* shadow;
@ -694,10 +706,10 @@ void update_actor_shadow(s32 arg0, Actor* actor) {
shadow->flags |= ENTITY_FLAG_HIDDEN;
if (!(actor->flags & ACTOR_FLAG_DISABLED)) {
if (actor->flags & ACTOR_FLAG_BLUR_ENABLED) {
if (arg0 == 0) {
func_8025593C(actor);
if (!isPartner) {
update_enemy_actor_blur_history(actor);
} else {
func_8025597C(actor);
update_partner_actor_blur_history(actor);
}
}
@ -804,19 +816,19 @@ void update_enemy_shadows(void) {
s32 i;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
update_actor_shadow(0, battleStatus->enemyActors[i]);
update_nonplayer_actor_shadow(FALSE, battleStatus->enemyActors[i]);
}
}
void update_hero_shadows(void) {
update_actor_shadow(1, gBattleStatus.partnerActor);
update_nonplayer_actor_shadow(TRUE, gBattleStatus.partnerActor);
update_player_actor_shadow();
}
void func_80255FD8(void) {
}
void appendGfx_npc_actor(s32 isPartner, s32 actorIndex) {
void appendGfx_npc_actor(b32 isPartner, s32 actorIndex) {
BattleStatus* battleStatus = &gBattleStatus;
Matrix4f mtxRotX, mtxRotY, mtxRotZ, mtxRotation;
Matrix4f mtxScale, mtxScaleMod;
@ -1399,7 +1411,7 @@ void update_player_actor_shadow(void) {
parts->animNotifyValue = spr_update_player_sprite(PLAYER_SPRITE_MAIN, parts->curAnimation, parts->animationRate);
if (player->flags & ACTOR_FLAG_BLUR_ENABLED) {
func_802549F4(player);
update_player_actor_blur_history(player);
}
shadow = get_shadow_by_index(player->shadow.id);

View File

@ -615,7 +615,7 @@ void btl_state_update_celebration(void) {
btl_cam_use_preset(BTL_CAM_DEFAULT);
btl_cam_move(5);
DMA_COPY_SEGMENT(level_up);
sfx_play_sound(SOUND_LOOP_08);
sfx_play_sound(SOUND_LOOP_CHEERING);
CelebrateStateTime = 0;
gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_BEGIN;
}

View File

@ -29,7 +29,7 @@ BSS s32 D_8029FBA8;
BSS s32 D_8029FBAC;
BSS s32 D_8029FBB0[3];
API_CALLABLE(func_802749F8);
API_CALLABLE(ForceDisablePlayerBlurImmediately);
void btl_set_player_idle_anims(void) {
BattleStatus* battleStatus = &gBattleStatus;
@ -230,8 +230,12 @@ API_CALLABLE(LifeShroomShroudWorld) {
set_background_color_blend(0, 0, 0, ((20 - script->functionTemp[0]) * 12) & 0xFC);
script->functionTemp[0] -= 1;
do {} while (0); // TODO required to match
return (script->functionTemp[0] == 0) * ApiStatus_DONE2;
if (script->functionTemp[0] == 0) {
return ApiStatus_DONE2;
}
return ApiStatus_BLOCK;
}
API_CALLABLE(LifeShroomRevealWorld) {
@ -247,7 +251,7 @@ API_CALLABLE(LifeShroomRevealWorld) {
set_background_color_blend(0, 0, 0, 0);
return ApiStatus_DONE2;
}
return ApiStatus_BLOCK;
}
@ -368,7 +372,7 @@ API_CALLABLE(BattleFadeInMerlee) {
Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE);
if (isInitialCall) {
sfx_play_sound(SOUND_024B);
sfx_play_sound(SOUND_MERLEE_APPEAR);
merlee->alpha = 0;
}
@ -695,7 +699,7 @@ EvtScript EVS_MarioEnterStage = {
EVT_CHILD_THREAD
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(1.0))
EVT_END_CHILD_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_0162)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TRIP)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_GetUp)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_DustOff)
@ -777,23 +781,23 @@ EvtScript EVS_Peach_HandlePhase = {
EvtScript EVS_ExecuteMarioAction = {
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CASE_EQ(BTL_MENU_TYPE_JUMP)
EVT_CALL(LoadMoveScript)
EVT_EXEC_WAIT(LVar0)
EVT_CASE_EQ(1)
EVT_CASE_EQ(BTL_MENU_TYPE_SMASH)
EVT_CALL(LoadMoveScript)
EVT_EXEC_WAIT(LVar0)
EVT_CASE_EQ(2)
EVT_CASE_EQ(BTL_MENU_TYPE_ITEMS)
EVT_CALL(LoadItemScript)
EVT_EXEC_WAIT(LVar0)
EVT_CASE_EQ(8)
EVT_CASE_EQ(BTL_MENU_TYPE_STAR_POWERS)
EVT_CALL(LoadStarPowerScript)
EVT_EXEC_WAIT(LVar0)
EVT_END_SWITCH
EVT_CALL(EnablePlayerBlur, BLUR_ENABLE)
EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE)
EVT_RETURN
EVT_END
@ -803,7 +807,7 @@ EvtScript EVS_ExecutePeachAction = {
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(8)
EVT_CASE_EQ(BTL_MENU_TYPE_STAR_POWERS)
EVT_CALL(LoadStarPowerScript)
EVT_EXEC_WAIT(LVar0)
EVT_END_SWITCH
@ -823,7 +827,7 @@ EvtScript EVS_PlayerFirstStrike = {
EVT_CALL(LoadMoveScript)
EVT_EXEC_WAIT(LVar0)
EVT_END_SWITCH
EVT_CALL(EnablePlayerBlur, BLUR_ENABLE)
EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE)
EVT_RETURN
EVT_END
@ -844,7 +848,7 @@ EvtScript EVS_Player_HandleEvent = {
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_100, FALSE)
EVT_CALL(func_802693F0)
EVT_CALL(func_802749F8)
EVT_CALL(ForceDisablePlayerBlurImmediately)
EVT_CALL(GetLastEvent, ACTOR_PLAYER, LVarF)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(EVENT_SPIKE_CONTACT)
@ -1059,7 +1063,7 @@ EvtScript EVS_Player_Celebrate = {
EvtScript EVS_RunAwayNoCommand = {
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hustled)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_015D)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_RUN_IN_PLACE)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30)
EVT_WAIT(1)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60)
@ -1096,7 +1100,7 @@ EvtScript EVS_RunAwayNoCommand = {
EVT_CALL(DetermineAutoRunAwaySuccess)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetFledBattleFlag)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_015E)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_RUN_AWAY)
EVT_CALL(SetGoalPos, ACTOR_PLAYER, -240, 0, 10)
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(16.0))
EVT_CALL(PlayerRunToGoal, 0)
@ -1106,7 +1110,7 @@ EvtScript EVS_RunAwayNoCommand = {
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(1.0))
EVT_END_CHILD_THREAD
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Trip)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_0162)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TRIP)
EVT_CALL(SetGoalPos, ACTOR_PLAYER, -100, 0, 10)
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(10.0))
EVT_CALL(PlayerRunToGoal, 0)
@ -1168,7 +1172,7 @@ EvtScript EVS_RunAwayStart = {
EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0)
EVT_CALL(func_80260E38)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hustled)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_015D)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_RUN_IN_PLACE)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30)
EVT_WAIT(1)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60)
@ -1210,7 +1214,7 @@ EvtScript EVS_RunAwayStart = {
EVT_CALL(DetermineAutoRunAwaySuccess)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetFledBattleFlag)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_015E)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_RUN_AWAY)
EVT_CALL(SetGoalPos, ACTOR_PLAYER, -240, 0, 10)
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(16.0))
EVT_CALL(PlayerRunToGoal, 0)
@ -1220,7 +1224,7 @@ EvtScript EVS_RunAwayStart = {
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(1.0))
EVT_END_CHILD_THREAD
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Trip)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_0162)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TRIP)
EVT_CALL(SetGoalPos, ACTOR_PLAYER, -100, 0, 10)
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(10.0))
EVT_CALL(PlayerRunToGoal, 0)
@ -1285,7 +1289,7 @@ EvtScript EVS_PlayerDies = {
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Dying)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_24)
EVT_WAIT(15)
EVT_CALL(EnablePlayerBlur, BLUR_DISABLE)
EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_0371)
EVT_SET(LVar0, 0)
EVT_LOOP(30)
@ -1299,7 +1303,7 @@ EvtScript EVS_PlayerDies = {
EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(EnablePlayerBlur, BLUR_ENABLE)
EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE)
EVT_WAIT(30)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_03FB)
EVT_SET(LVar0, 0)
@ -1551,7 +1555,7 @@ EvtScript EVS_UseLifeShroom = {
EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 2, LVar0, LVar1, LVar2, 20, 20, EVT_FLOAT(1.0), 10, 50)
EVT_END_LOOP
EVT_END_CHILD_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_0160)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_JUMP)
EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0))
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0))
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)

View File

@ -140,7 +140,7 @@ void create_target_list(Actor* actor, s32 arg1) {
for (j = 0; j < numParts; targetPart = targetPart->nextPart, j++) {
if (!(targetPart->flags & ACTOR_PART_FLAG_NO_TARGET)) {
ActorPartBlueprint* partBlueprint = targetPart->staticData;
s8 partIndex;
if (!(targetPart->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) {
row = !arg1; // required to match
if (row) {
@ -178,17 +178,16 @@ void create_target_list(Actor* actor, s32 arg1) {
}
targetDataList->actorID = ACTOR_CLASS_ENEMY | i;
partIndex = partBlueprint->index;
targetDataList->partID = partBlueprint->index;
targetDataList->posA.x = targetX;
targetDataList->posA.y = targetY;
targetDataList->posA.z = targetZ;
targetDataList->unk_10 = 0;
targetDataList->partID = partIndex;
if ((targetActor->flags & ACTOR_FLAG_TARGET_ONLY) && !(targetActor->flags & ACTOR_FLAG_10)) {
targetDataList->unk_10 = 100;
}
targetDataList->unk_10 += targetPart->unk_70;
targetDataList->unk_10 += targetPart->targetPriorityOffset;
targetDataList->posB.x = f12 + targetDataList->unk_10 * 100;
targetDataList->posB.y = f2;
targetDataList->posB.z = f14;
@ -1346,7 +1345,7 @@ void load_player_actor(void) {
part->yaw = 0.0f;
part->targetOffset.x = 0;
part->targetOffset.y = 0;
part->unk_70 = 0;
part->targetPriorityOffset = 0;
part->rot.x = 0.0f;
part->rot.y = 0.0f;
part->rot.z = 0.0f;
@ -1381,7 +1380,7 @@ void load_player_actor(void) {
decorationTable->unk_764 = 0;
decorationTable->unk_768 = 0;
decorationTable->unk_7D8 = 0;
decorationTable->unk_7D9 = 0;
decorationTable->blurBufferPos = 0;
for (j = 0; j < ARRAY_COUNT(decorationTable->posX); j++) {
decorationTable->posX[j] = player->curPos.x;
@ -1389,9 +1388,9 @@ void load_player_actor(void) {
decorationTable->posZ[j] = player->curPos.z;
}
decorationTable->unk_7DA = 3;
decorationTable->unk_7DB = 0;
decorationTable->effectType = 0;
decorationTable->blurDrawCount = 3;
decorationTable->blurEnableCount = 0;
decorationTable->blurDisableDelay = 0;
for (j = 0; j < ARRAY_COUNT(decorationTable->effect); j++) {
decorationTable->effect[j] = NULL;
@ -1574,7 +1573,7 @@ void load_partner_actor(void) {
part->yaw = 0.0f;
part->targetOffset.x = ActorPartBlueprint->targetOffset.x;
part->targetOffset.y = ActorPartBlueprint->targetOffset.y;
part->unk_70 = 0;
part->targetPriorityOffset = 0;
part->rotPivotOffset.x = 0;
part->rotPivotOffset.y = 0;
part->rotPivotOffset.z = 0;
@ -1610,7 +1609,7 @@ void load_partner_actor(void) {
decorationTable->unk_764 = 0;
decorationTable->unk_768 = 0;
decorationTable->unk_7D8 = 0;
decorationTable->unk_7D9 = 0;
decorationTable->blurBufferPos = 0;
for (j = 0; j < ARRAY_COUNT(decorationTable->posX); j++) {
decorationTable->posX[j] = partnerActor->curPos.x;
@ -1618,9 +1617,9 @@ void load_partner_actor(void) {
decorationTable->posZ[j] = partnerActor->curPos.z;
}
decorationTable->unk_7DA = 3;
decorationTable->unk_7DB = 0;
decorationTable->effectType = 0;
decorationTable->blurDrawCount = 3;
decorationTable->blurEnableCount = 0;
decorationTable->blurDisableDelay = 0;
for (j = 0; j < ARRAY_COUNT(decorationTable->effect); j++) {
decorationTable->effect[j] = NULL;
@ -1838,7 +1837,7 @@ Actor* create_actor(Formation formation) {
part->yaw = 0.0f;
part->targetOffset.x = actorPartBP->targetOffset.x;
part->targetOffset.y = actorPartBP->targetOffset.y;
part->unk_70 = 0;
part->targetPriorityOffset = 0;
part->projectileTargetOffset.x = actorPartBP->projectileTargetOffset.x;
part->projectileTargetOffset.y = actorPartBP->projectileTargetOffset.y;
part->rot.x = 0.0f;
@ -1872,7 +1871,7 @@ Actor* create_actor(Formation formation) {
decorationTable->unk_764 = 0;
decorationTable->unk_768 = 0;
decorationTable->unk_7D8 = 0;
decorationTable->unk_7D9 = 0;
decorationTable->blurBufferPos = 0;
for (k = 0; k < ARRAY_COUNT(decorationTable->posX); k++) {
decorationTable->posX[k] = actor->curPos.x;
@ -1880,9 +1879,9 @@ Actor* create_actor(Formation formation) {
decorationTable->posZ[k] = actor->curPos.z;
}
decorationTable->unk_7DA = 3;
decorationTable->unk_7DB = 0;
decorationTable->effectType = 0;
decorationTable->blurDrawCount = 3;
decorationTable->blurEnableCount = 0;
decorationTable->blurDisableDelay = 0;
for (k = 0; k < ARRAY_COUNT(decorationTable->effect); k++) {
decorationTable->effect[k] = NULL;

View File

@ -208,7 +208,7 @@ HitResult calc_player_test_enemy(void) {
}
if (target->stoneStatus == STATUS_KEY_STONE) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return HIT_RESULT_IMMUNE;
}
@ -216,7 +216,7 @@ HitResult calc_player_test_enemy(void) {
&& (targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP)
&& !player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD))
{
sfx_play_sound_at_position(SOUND_0108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SPIKE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return HIT_RESULT_LANDED_ON_SPIKE;
}
@ -225,7 +225,7 @@ HitResult calc_player_test_enemy(void) {
&& (!(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_SPIKY_FRONT)
&& !player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD)))
{
sfx_play_sound_at_position(SOUND_0108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SPIKE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_player_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
@ -309,7 +309,7 @@ HitResult calc_player_damage_enemy(void) {
}
if (target->stoneStatus == STATUS_KEY_STONE) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 1);
show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 0);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
@ -326,7 +326,7 @@ HitResult calc_player_damage_enemy(void) {
&& (targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP)
&& !player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD))
{
sfx_play_sound_at_position(SOUND_0108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SPIKE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_player_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
@ -334,7 +334,7 @@ HitResult calc_player_damage_enemy(void) {
if (!(battleStatus->curAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SMASH))) {
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLODE_ON_CONTACT) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_player_1(1, EVENT_BURN_CONTACT);
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
return HIT_RESULT_BACKFIRE;
@ -345,7 +345,7 @@ HitResult calc_player_damage_enemy(void) {
&& !(player_team_is_ability_active(player, ABILITY_FIRE_SHIELD))
&& !(player_team_is_ability_active(player, ABILITY_ICE_POWER))
) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_player_1(1, EVENT_BURN_CONTACT);
dispatch_event_actor(target, EVENT_BURN_TAUNT);
return HIT_RESULT_BACKFIRE;
@ -356,7 +356,7 @@ HitResult calc_player_damage_enemy(void) {
&& battleStatus->curAttackElement & DAMAGE_TYPE_FIRE
&& targetPart->eventFlags & (ACTOR_EVENT_FLAG_FIRE_EXPLODE | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION)
) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
@ -369,7 +369,7 @@ HitResult calc_player_damage_enemy(void) {
&& !(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_FLAG_80)
&& !player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD)
) {
sfx_play_sound_at_position(SOUND_0108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SPIKE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_player_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
@ -402,22 +402,22 @@ HitResult calc_player_damage_enemy(void) {
switch (attackFxType) {
case 1:
sfx_play_sound_at_position(SOUND_0372, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_0372, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
break;
case 2:
sfx_play_sound_at_position(SOUND_00F1, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_PLANTS_BELL, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
break;
case 3:
sfx_play_sound_at_position(SOUND_SLIDE_WHISTLE_OUT, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_SLIDE_WHISTLE_OUT, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
break;
case 4:
sfx_play_sound_at_position(SOUND_2072, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_2072, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
break;
case 5:
sfx_play_sound_at_position(SOUND_2073, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_2073, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
break;
case 6:
sfx_play_sound_at_position(SOUND_FLOWERS_LAUGH, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_FLOWERS_LAUGH, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
break;
}
}
@ -595,7 +595,7 @@ HitResult calc_player_damage_enemy(void) {
if (!(battleStatus->curAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
dispatchEvent = EVENT_ZERO_DAMAGE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
if (target->curHP < 1) {
dispatchEvent = EVENT_DEATH;
@ -637,13 +637,13 @@ HitResult calc_player_damage_enemy(void) {
&& !(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
&& !(battleStatus->curAttackElement & DAMAGE_TYPE_SHOCK)
) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_PLAYER_SHOCK, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
apply_shock_effect(player);
dispatch_damage_event_player_1(1, EVENT_SHOCK_HIT);
return HIT_RESULT_BACKFIRE;
} else {
dispatchEvent = (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) ? EVENT_ZERO_DAMAGE : EVENT_IMMUNE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, dispatchEvent);
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
@ -894,7 +894,7 @@ HitResult calc_player_damage_enemy(void) {
if (tempBinary && gBattleStatus.flags1 & BS_FLAGS1_40 || gBattleStatus.flags1 & BS_FLAGS1_40) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_80)) {
if (player->actorTypeData1[5]) {
sfx_play_sound_at_position(player->actorTypeData1[5], SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(player->actorTypeData1[5], SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->lastAttackDamage > 0) {
@ -923,18 +923,18 @@ HitResult calc_player_damage_enemy(void) {
func_80267018(target, 1);
if (isFireDamage) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isShockDamage) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isIceDamage) {
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
}
if (battleStatus->lastAttackDamage < 1 && !tempBinary && !sp20 || targetPart->flags & ACTOR_PART_FLAG_2000) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->curAttackStatus & STATUS_FLAG_SLEEP && wasStatusInflicted) {
@ -942,7 +942,7 @@ HitResult calc_player_damage_enemy(void) {
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->curAttackStatus & STATUS_FLAG_DIZZY && wasStatusInflicted) {
@ -950,7 +950,7 @@ HitResult calc_player_damage_enemy(void) {
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->curAttackStatus & STATUS_FLAG_PARALYZE && wasStatusInflicted) {
@ -958,7 +958,7 @@ HitResult calc_player_damage_enemy(void) {
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->curAttackStatus & STATUS_FLAG_POISON && wasStatusInflicted) {
@ -966,7 +966,7 @@ HitResult calc_player_damage_enemy(void) {
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->curAttackStatus & STATUS_FLAG_STOP && wasStatusInflicted) {
@ -974,7 +974,7 @@ HitResult calc_player_damage_enemy(void) {
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->curAttackStatus & STATUS_FLAG_FROZEN && wasStatusInflicted) {
@ -983,7 +983,7 @@ HitResult calc_player_damage_enemy(void) {
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
evt->varTablePtr[3] = target;
sfx_play_sound_at_position(SOUND_HIT_PLAYER_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_PLAYER_ICE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->curAttackStatus & STATUS_FLAG_SHRINK && wasStatusInflicted) {
@ -992,11 +992,11 @@ HitResult calc_player_damage_enemy(void) {
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
evt->varTablePtr[3] = target;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->curAttackElement & DAMAGE_TYPE_SMASH && target->actorType == ACTOR_TYPE_GOOMNUT_TREE) {
sfx_play_sound_at_position(SOUND_SMASH_GOOMNUT_TREE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_SMACK_TREE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
show_actor_health_bar(target);
@ -1016,7 +1016,7 @@ HitResult calc_player_damage_enemy(void) {
&& !(battleStatus->curAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SHOCK))
&& !(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
) {
sfx_play_sound_at_position(SOUND_HIT_PLAYER_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_PLAYER_SHOCK, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
apply_shock_effect(player);
dispatch_damage_event_player_1(1, EVENT_SHOCK_HIT);
return HIT_RESULT_BACKFIRE;
@ -1081,7 +1081,7 @@ s32 dispatch_damage_event_player(s32 damageAmount, s32 event, s32 arg2) {
if (!arg2) {
set_goal_pos_to_part(state, ACTOR_PLAYER, 0);
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 1);
@ -1173,7 +1173,7 @@ ApiStatus func_80273444(Evt* script, s32 isInitialCall) {
playerState->unk_28 = 180 / playerState->moveTime;
playerState->unk_2C = playerState->goalPos.y;
if (script->functionTemp[1] != 2) {
sfx_play_sound_at_position(SOUND_0160, SOUND_SPACE_MODE_0, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_PLAYER_JUMP, SOUND_SPACE_DEFAULT, player->curPos.x, player->curPos.y, player->curPos.z);
}
script->functionTemp[0] = TRUE;
}
@ -1218,7 +1218,7 @@ ApiStatus func_80273444(Evt* script, s32 isInitialCall) {
play_movement_dust_effects(2, player->curPos.x, player->curPos.y, player->curPos.z, player->yaw);
}
if (script->functionTemp[1] != 2) {
sfx_play_sound_at_position(SOUND_LAND_SOFTLY, SOUND_SPACE_MODE_0, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_LAND_SOFTLY, SOUND_SPACE_DEFAULT, player->curPos.x, player->curPos.y, player->curPos.z);
}
return ApiStatus_DONE1;
@ -1286,7 +1286,7 @@ ApiStatus PlayerFallToGoal(Evt* script, s32 isInitialCall) {
player->curPos.y = state->goalPos.y;
player->curPos.z = state->goalPos.z;
play_movement_dust_effects(2, player->curPos.x, player->curPos.y, player->curPos.z, player->yaw);
sfx_play_sound_at_position(SOUND_LAND_SOFTLY, SOUND_SPACE_MODE_0, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_LAND_SOFTLY, SOUND_SPACE_DEFAULT, player->curPos.x, player->curPos.y, player->curPos.z);
return ApiStatus_DONE1;
}
return ApiStatus_BLOCK;
@ -1332,7 +1332,7 @@ ApiStatus PlayerLandJump(Evt* script, s32 isInitialCall) {
player->curPos.y = 0.0f;
play_movement_dust_effects(2, player->curPos.x, player->curPos.y, player->curPos.z, player->yaw);
sfx_play_sound_at_position(SOUND_LAND_SOFTLY, SOUND_SPACE_MODE_0, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_LAND_SOFTLY, SOUND_SPACE_DEFAULT, player->curPos.x, player->curPos.y, player->curPos.z);
return ApiStatus_DONE1;
}
@ -1394,9 +1394,9 @@ ApiStatus PlayerRunToGoal(Evt* script, s32 isInitialCall) {
player->footStepCounter++;
playerState->dist = 0.0f;
if ((player->footStepCounter % 2) != 0) {
sfx_play_sound_at_position(SOUND_STEP_NORMAL1, SOUND_SPACE_MODE_0, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_STEP_NORMAL1, SOUND_SPACE_DEFAULT, player->curPos.x, player->curPos.y, player->curPos.z);
} else {
sfx_play_sound_at_position(SOUND_STEP_NORMAL2, SOUND_SPACE_MODE_0, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_STEP_NORMAL2, SOUND_SPACE_DEFAULT, player->curPos.x, player->curPos.y, player->curPos.z);
}
}
@ -1469,9 +1469,9 @@ ApiStatus CancelablePlayerRunToGoal(Evt* script, s32 isInitialCall) {
player->footStepCounter++;
playerState->dist = 0.0f;
if ((player->footStepCounter % 2) != 0) {
sfx_play_sound_at_position(SOUND_STEP_NORMAL1, SOUND_SPACE_MODE_0, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_STEP_NORMAL1, SOUND_SPACE_DEFAULT, player->curPos.x, player->curPos.y, player->curPos.z);
} else {
sfx_play_sound_at_position(SOUND_STEP_NORMAL2, SOUND_SPACE_MODE_0, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_STEP_NORMAL2, SOUND_SPACE_DEFAULT, player->curPos.x, player->curPos.y, player->curPos.z);
}
}
@ -1735,24 +1735,24 @@ ApiStatus DispatchDamagePlayerEvent(Evt* script, s32 isInitialCall) {
ApiStatus EnablePlayerBlur(Evt* script, s32 isInitialCall) {
s32 setting = evt_get_variable(script, *script->ptrReadPos);
if (setting == 0) {
if (setting == ACTOR_BLUR_DISABLE) {
disable_player_blur();
} else if (setting == 1) {
} else if (setting == ACTOR_BLUR_ENABLE) {
enable_player_blur();
} else {
func_80254950();
reset_player_blur();
}
return ApiStatus_DONE2;
}
ApiStatus func_802749D8(Evt* script, s32 isInitialCall) {
func_802549A0();
ApiStatus ForceDisablePlayerBlur(Evt* script, s32 isInitialCall) {
force_disable_player_blur();
return ApiStatus_DONE2;
}
ApiStatus func_802749F8(Evt* script, s32 isInitialCall) {
func_802549C0();
ApiStatus ForceDisablePlayerBlurImmediately(Evt* script, s32 isInitialCall) {
force_disable_player_blur_immediately();
return ApiStatus_DONE2;
}
@ -1843,7 +1843,7 @@ ApiStatus func_80274A18(Evt* script, s32 isInitialCall) {
playerState->vel = vel2 + ((sin_rad(DEG_TO_RAD(playerState->unk_24)) * 0.8 * acc2) + acc2);
}
set_animation(0, 0, playerState->animJumpRise);
sfx_play_sound_at_position(SOUND_0160, SOUND_SPACE_MODE_0, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_PLAYER_JUMP, SOUND_SPACE_DEFAULT, player->curPos.x, player->curPos.y, player->curPos.z);
script->functionTemp[0] = 1;
}
@ -1984,7 +1984,7 @@ ApiStatus func_802752AC(Evt* script, s32 isInitialCall) {
playerState->vel = 0.0f;
playerState->speed += temp / playerState->moveTime;
set_animation(ACTOR_PLAYER, 0, playerState->animJumpRise);
sfx_play_sound_at_position(SOUND_0160, SOUND_SPACE_MODE_0, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_PLAYER_JUMP, SOUND_SPACE_DEFAULT, player->curPos.x, player->curPos.y, player->curPos.z);
playerState->unk_24 = 90.0f;
playerState->bounceDivisor = 45.0f;
playerState->unk_28 = 360 / playerState->moveTime;
@ -2088,7 +2088,7 @@ ApiStatus func_802752AC(Evt* script, s32 isInitialCall) {
playerState->unk_24 = clamp_angle(playerState->unk_24);
playerState->moveTime--;
if (playerState->moveTime == 0) {
sfx_play_sound_at_position(SOUND_0160, SOUND_SPACE_MODE_0, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_PLAYER_JUMP, SOUND_SPACE_DEFAULT, player->curPos.x, player->curPos.y, player->curPos.z);
set_animation(ACTOR_PLAYER, 0, playerState->animJumpFall);
player->rotPivotOffset.y = 14;
player->rot.z -= 66.0f;
@ -2228,8 +2228,8 @@ ApiStatus func_80275F00(Evt* script, s32 isInitialCall) {
playerState->unk_30.z = (playerState->goalPos.z - playerState->curPos.z) / playerState->moveTime;
playerState->speed += temp / playerState->moveTime;
set_animation(ACTOR_PLAYER, 0, playerState->animJumpFall);
sfx_play_sound_at_position(SOUND_0160, SOUND_SPACE_MODE_0, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_TORNADO_JUMP, SOUND_SPACE_MODE_0, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_PLAYER_JUMP, SOUND_SPACE_DEFAULT, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_TORNADO_JUMP, SOUND_SPACE_DEFAULT, player->curPos.x, player->curPos.y, player->curPos.z);
playerState->unk_18.x = 0.0f;
playerState->unk_18.y = 0.0f;
playerState->unk_24 = 90.0f;
@ -2272,8 +2272,8 @@ ApiStatus func_80275F00(Evt* script, s32 isInitialCall) {
playerState->unk_30.z = (playerState->goalPos.z - playerState->curPos.z) / playerState->moveTime;
playerState->speed += temp / playerState->moveTime;
set_animation(ACTOR_PLAYER, 0, playerState->animJumpRise);
sfx_play_sound_at_position(SOUND_0160, SOUND_SPACE_MODE_0, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_TORNADO_JUMP, SOUND_SPACE_MODE_0, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_PLAYER_JUMP, SOUND_SPACE_DEFAULT, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_TORNADO_JUMP, SOUND_SPACE_DEFAULT, player->curPos.x, player->curPos.y, player->curPos.z);
playerState->unk_18.x = 0.0f;
playerState->unk_18.y = 0.0f;
playerState->unk_24 = 90.0f;
@ -2327,7 +2327,7 @@ ApiStatus func_80275F00(Evt* script, s32 isInitialCall) {
playerState->unk_30.z = (playerState->goalPos.z - playerState->curPos.z) / playerState->moveTime;
playerState->speed += temp / playerState->moveTime;
set_animation(ACTOR_PLAYER, 0, playerState->animJumpRise);
sfx_play_sound_at_position(SOUND_0160, SOUND_SPACE_MODE_0, player->curPos.x, player->curPos.y, player->curPos.z);
sfx_play_sound_at_position(SOUND_PLAYER_JUMP, SOUND_SPACE_DEFAULT, player->curPos.x, player->curPos.y, player->curPos.z);
playerState->unk_24 = 90.0f;
playerState->bounceDivisor = 45.0f;
playerState->unk_28 = 360 / playerState->moveTime;

View File

@ -41,60 +41,60 @@ void play_hit_sound(Actor* actor, f32 x, f32 y, f32 z, u32 hitSound) {
switch (hitSound) {
case HIT_SOUND_MISS:
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, x, y, z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, x, y, z);
break;
case HIT_SOUND_BONES:
sfx_play_sound_at_position(SOUND_HIT_BONES, SOUND_SPACE_MODE_0, x, y, z);
sfx_play_sound_at_position(SOUND_HIT_BONES, SOUND_SPACE_DEFAULT, x, y, z);
break;
case HIT_SOUND_NORMAL:
switch (actorClass) {
case ACTOR_CLASS_PLAYER:
sfx_play_sound_at_position(SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_MODE_0, x, y, z);
sfx_play_sound_at_position(SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT, x, y, z);
break;
case ACTOR_CLASS_PARTNER:
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_MODE_0, x, y, z);
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_DEFAULT, x, y, z);
break;
case ACTOR_CLASS_ENEMY:
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_MODE_0, x, y, z);
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_DEFAULT, x, y, z);
break;
}
break;
case HIT_SOUND_FIRE:
switch (actorClass) {
case ACTOR_CLASS_PLAYER:
sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_MODE_0, x, y, z);
sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_DEFAULT, x, y, z);
break;
case ACTOR_CLASS_PARTNER:
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, x, y, z);
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_DEFAULT, x, y, z);
break;
case ACTOR_CLASS_ENEMY:
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, x, y, z);
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_DEFAULT, x, y, z);
break;
}
break;
case HIT_SOUND_ICE:
switch (actorClass) {
case ACTOR_CLASS_PLAYER:
sfx_play_sound_at_position(SOUND_HIT_PLAYER_ICE, SOUND_SPACE_MODE_0, x, y, z);
sfx_play_sound_at_position(SOUND_HIT_PLAYER_ICE, SOUND_SPACE_DEFAULT, x, y, z);
break;
case ACTOR_CLASS_PARTNER:
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, x, y, z);
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_DEFAULT, x, y, z);
break;
case ACTOR_CLASS_ENEMY:
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, x, y, z);
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_DEFAULT, x, y, z);
break;
}
break;
case HIT_SOUND_SHOCK:
switch (actorClass) {
case ACTOR_CLASS_PLAYER:
sfx_play_sound_at_position(SOUND_HIT_PLAYER_SHOCK, SOUND_SPACE_MODE_0, x, y, z);
sfx_play_sound_at_position(SOUND_HIT_PLAYER_SHOCK, SOUND_SPACE_DEFAULT, x, y, z);
break;
case ACTOR_CLASS_PARTNER:
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, x, y, z);
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_DEFAULT, x, y, z);
break;
case ACTOR_CLASS_ENEMY:
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, x, y, z);
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_DEFAULT, x, y, z);
break;
}
break;
@ -438,7 +438,7 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
if (blocked) {
damage--;
damage -= player_team_is_ability_active(target, ABILITY_DAMAGE_DODGE);
sfx_play_sound_at_position(SOUND_0231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_0231, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_action_rating(ACTION_RATING_NICE, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
gBattleStatus.flags1 |= BS_FLAGS1_ATK_BLOCKED;
break;
@ -451,7 +451,7 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
if (target->koStatus == 0 && !(battleStatus->curAttackElement & DAMAGE_TYPE_UNBLOCKABLE)) {
if (check_block_input(BUTTON_A)) {
damage = 0;
sfx_play_sound_at_position(SOUND_0231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_0231, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_action_rating(ACTION_RATING_NICE, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
gBattleStatus.flags1 |= BS_FLAGS1_ATK_BLOCKED;
break;
@ -718,7 +718,7 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
func_80267018(target, 1);
if (attacker->actorTypeData1[5] != SOUND_NONE) {
sfx_play_sound_at_position(attacker->actorTypeData1[5], SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(attacker->actorTypeData1[5], SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (isFire) {
@ -733,7 +733,7 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
}
if ((battleStatus->lastAttackDamage < 1 && !statusInflicted2 && !madeElectricContact) || targetPart->flags & ACTOR_PART_FLAG_2000) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->curAttackStatus & STATUS_FLAG_SLEEP) && statusInflicted) {
@ -741,35 +741,35 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->curAttackStatus & STATUS_FLAG_DIZZY) && statusInflicted) {
script = start_script(&EVS_PlayDizzyHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->curAttackStatus & STATUS_FLAG_PARALYZE) && statusInflicted) {
script = start_script(&EVS_PlayParalyzeHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->curAttackStatus & STATUS_FLAG_POISON) && statusInflicted) {
script = start_script(&EVS_PlayPoisonHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->curAttackStatus & STATUS_FLAG_STOP) && statusInflicted) {
script = start_script(&EVS_PlayStopHitFX, EVT_PRIORITY_A, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->curAttackStatus & STATUS_FLAG_FROZEN) && statusInflicted) {
script = start_script(&EVS_PlayFreezeHitFX, EVT_PRIORITY_A, 0);
@ -777,7 +777,7 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
script->varTablePtr[3] = target;
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->curAttackStatus & STATUS_FLAG_SHRINK) && statusInflicted) {
script = start_script(&EVS_PlayShrinkHitFX, EVT_PRIORITY_A, 0);
@ -785,11 +785,11 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
script->varTablePtr[3] = target;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->curAttackElement & DAMAGE_TYPE_SMASH) && target->actorType == ACTOR_TYPE_GOOMNUT_TREE) {
sfx_play_sound_at_position(SOUND_SMASH_GOOMNUT_TREE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_SMACK_TREE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
show_actor_health_bar(target);
@ -801,7 +801,7 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
&& (attacker->transparentStatus != STATUS_KEY_TRANSPARENT)
&& !has_enchanted_part(attacker))
{
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
apply_shock_effect(attacker);
dispatch_damage_event_actor_1(attacker, 1, EVENT_SHOCK_HIT);
return HIT_RESULT_BACKFIRE;
@ -969,14 +969,14 @@ ApiStatus EnableIdleScript(Evt* script, s32 isInitialCall) {
if (actor->idleScript != NULL) {
switch (var1) {
case -1:
case IDLE_SCRIPT_RESTART:
restart_script(actor->idleScript);
resume_all_script(actor->idleScriptID);
break;
case 1:
case IDLE_SCRIPT_ENABLE:
resume_all_script(actor->idleScriptID);
break;
case 0:
case IDLE_SCRIPT_DISABLE:
suspend_all_script(actor->idleScriptID);
break;
}
@ -999,7 +999,7 @@ ApiStatus BindHandleEvent(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus BindNextTurn(Evt* script, s32 isInitialCall) {
ApiStatus BindHandlePhase(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
EvtScript* src;
@ -1080,7 +1080,7 @@ ApiStatus JumpToGoal(Evt* script, s32 isInitialCall) {
set_animation(actor->actorID, (s8) actor->state.jumpPartIndex, actor->state.animJumpRise);
}
if (!(script->functionTemp[3] & 2) && (actor->actorTypeData1[4] != 0)) {
sfx_play_sound_at_position(actor->actorTypeData1[4], SOUND_SPACE_MODE_0, actor->curPos.x, actor->curPos.y, actor->curPos.z);
sfx_play_sound_at_position(actor->actorTypeData1[4], SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
}
script->functionTemp[0] = 1;
}
@ -1266,7 +1266,7 @@ ApiStatus JumpToGoalSimple2(Evt* script, s32 isInitialCall) {
state->vel = ((state->acceleration * state->moveTime) * 0.5f) + (posY / state->moveTime);
state->speed += moveDist / state->moveTime;
if (actor->actorTypeData1[4] != 0) {
sfx_play_sound_at_position(actor->actorTypeData1[4], SOUND_SPACE_MODE_0, actor->curPos.x, actor->curPos.y, actor->curPos.z);
sfx_play_sound_at_position(actor->actorTypeData1[4], SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
}
script->functionTemp[0] = TRUE;
}
@ -1354,7 +1354,7 @@ ApiStatus JumpWithBounce(Evt* script, s32 isInitialCall) {
actorState->speed += moveDist / actorState->moveTime;
if (actor->actorTypeData1[4] != 0) {
sfx_play_sound_at_position(actor->actorTypeData1[4], SOUND_SPACE_MODE_0, actor->curPos.x, actor->curPos.y, actor->curPos.z);
sfx_play_sound_at_position(actor->actorTypeData1[4], SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
}
script->functionTemp[0] = TRUE;
}
@ -1491,7 +1491,7 @@ ApiStatus FallToGoal(Evt* script, s32 isInitialCall) {
state->acceleration = (posY / state->moveTime - state->vel) / (-state->moveTime * 0.5);
if (actor->actorTypeData1[4] != 0) {
sfx_play_sound_at_position(actor->actorTypeData1[4], SOUND_SPACE_MODE_0, actor->curPos.x, actor->curPos.y, actor->curPos.z);
sfx_play_sound_at_position(actor->actorTypeData1[4], SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
}
script->functionTemp[0] = 1;
}
@ -1573,7 +1573,7 @@ ApiStatus RunToGoal(Evt* script, s32 isInitialCall) {
actorState->dist = ~actor->actorTypeData1b[0]; //TODO optimization?
}
if ((actor->actorTypeData1[0] != 0) && (actor->actorTypeData1[1] == 0)) {
sfx_play_sound_at_position(actor->actorTypeData1[0], SOUND_SPACE_MODE_0, actor->curPos.x, actor->curPos.y, actor->curPos.z);
sfx_play_sound_at_position(actor->actorTypeData1[0], SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
}
script->functionTemp[0] = TRUE;
}
@ -1600,11 +1600,11 @@ ApiStatus RunToGoal(Evt* script, s32 isInitialCall) {
actorState->dist = 0.0f;
if (actor->footStepCounter & 1) {
if (actor->actorTypeData1[0] != 0) {
sfx_play_sound_at_position(actor->actorTypeData1[0], SOUND_SPACE_MODE_0, actor->curPos.x, actor->curPos.y, actor->curPos.z);
sfx_play_sound_at_position(actor->actorTypeData1[0], SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
}
} else {
if (actor->actorTypeData1[1] != 0) {
sfx_play_sound_at_position(actor->actorTypeData1[1], SOUND_SPACE_MODE_0, actor->curPos.x, actor->curPos.y, actor->curPos.z);
sfx_play_sound_at_position(actor->actorTypeData1[1], SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
}
}
}
@ -1615,11 +1615,11 @@ ApiStatus RunToGoal(Evt* script, s32 isInitialCall) {
actorState->dist = 0.0f;
if (actor->footStepCounter & 1) {
if (actor->actorTypeData1[0] != 0) {
sfx_play_sound_at_position(actor->actorTypeData1[0], SOUND_SPACE_MODE_0, actor->curPos.x, actor->curPos.y, actor->curPos.z);
sfx_play_sound_at_position(actor->actorTypeData1[0], SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
}
} else {
if (actor->actorTypeData1[1] != 0) {
sfx_play_sound_at_position(actor->actorTypeData1[1], SOUND_SPACE_MODE_0, actor->curPos.x, actor->curPos.y, actor->curPos.z);
sfx_play_sound_at_position(actor->actorTypeData1[1], SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
}
}
}
@ -1792,7 +1792,7 @@ ApiStatus JumpPartTo(Evt* script, s32 isInitialCall) {
movement->moveSpeed += deltaDist / movement->moveTime;
movement->unk_2C = movement->jumpScale * movement->moveTime * 0.5f + posY / movement->moveTime;
if (part->partTypeData[4] != 0) {
sfx_play_sound_at_position(part->partTypeData[4], SOUND_SPACE_MODE_0, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
sfx_play_sound_at_position(part->partTypeData[4], SOUND_SPACE_DEFAULT, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
}
script->functionTemp[0] = 1;
}
@ -1883,7 +1883,7 @@ ApiStatus FallPartTo(Evt* script, s32 isInitialCall) {
movement->unk_2C = 0.0f;
movement->jumpScale = (posY / movement->moveTime - movement->unk_2C) / (-movement->moveTime * 0.5);
if (part->partTypeData[4] != 0) {
sfx_play_sound_at_position(part->partTypeData[4], SOUND_SPACE_MODE_0, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
sfx_play_sound_at_position(part->partTypeData[4], SOUND_SPACE_DEFAULT, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
}
script->functionTemp[0] = 1;
}
@ -2017,7 +2017,7 @@ ApiStatus RunPartTo(Evt* script, s32 isInitialCall) {
movement->dist = ~part->actorTypeData2b[0];
}
if (part->partTypeData[0] != 0 && part->partTypeData[1] == 0) {
sfx_play_sound_at_position(part->partTypeData[0], SOUND_SPACE_MODE_0, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
sfx_play_sound_at_position(part->partTypeData[0], SOUND_SPACE_DEFAULT, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
}
script->functionTemp[0] = 1;
}
@ -2044,11 +2044,11 @@ ApiStatus RunPartTo(Evt* script, s32 isInitialCall) {
movement->dist = 0;
if (actor->footStepCounter % 2 != 0) {
if (part->partTypeData[0] != 0) {
sfx_play_sound_at_position(part->partTypeData[0], SOUND_SPACE_MODE_0, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
sfx_play_sound_at_position(part->partTypeData[0], SOUND_SPACE_DEFAULT, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
}
} else {
if (part->partTypeData[1] != 0) {
sfx_play_sound_at_position(part->partTypeData[1], SOUND_SPACE_MODE_0, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
sfx_play_sound_at_position(part->partTypeData[1], SOUND_SPACE_DEFAULT, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
}
}
}
@ -2059,11 +2059,11 @@ ApiStatus RunPartTo(Evt* script, s32 isInitialCall) {
movement->dist = 0;
if (actor->footStepCounter % 2 != 0) {
if (part->partTypeData[0] != 0) {
sfx_play_sound_at_position(part->partTypeData[0], SOUND_SPACE_MODE_0, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
sfx_play_sound_at_position(part->partTypeData[0], SOUND_SPACE_DEFAULT, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
}
} else {
if (part->partTypeData[1] != 0) {
sfx_play_sound_at_position(part->partTypeData[1], SOUND_SPACE_MODE_0, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
sfx_play_sound_at_position(part->partTypeData[1], SOUND_SPACE_DEFAULT, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
}
}
}
@ -2214,7 +2214,7 @@ ApiStatus FlyToGoal(Evt* script, s32 isInitialCall) {
actorState->vel = ~actor->actorTypeData1b[1];
}
if ((actor->actorTypeData1[2] != 0) && (actor->actorTypeData1[3] == 0)) {
sfx_play_sound_at_position(actor->actorTypeData1[2], SOUND_SPACE_MODE_0, actor->curPos.x, actor->curPos.y, actor->curPos.z);
sfx_play_sound_at_position(actor->actorTypeData1[2], SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
}
}
@ -2250,11 +2250,11 @@ ApiStatus FlyToGoal(Evt* script, s32 isInitialCall) {
actorState->vel = 0.0f;
if (actor->footStepCounter & 1) {
if (actor->actorTypeData1[2] != 0) {
sfx_play_sound_at_position(actor->actorTypeData1[2], SOUND_SPACE_MODE_0, actor->curPos.x, actor->curPos.y, actor->curPos.z);
sfx_play_sound_at_position(actor->actorTypeData1[2], SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
}
} else {
if (actor->actorTypeData1[3] != 0) {
sfx_play_sound_at_position(actor->actorTypeData1[3], SOUND_SPACE_MODE_0, actor->curPos.x, actor->curPos.y, actor->curPos.z);
sfx_play_sound_at_position(actor->actorTypeData1[3], SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
}
}
}
@ -2265,11 +2265,11 @@ ApiStatus FlyToGoal(Evt* script, s32 isInitialCall) {
actorState->vel = 0.0f;
if (actor->footStepCounter & 1) {
if (actor->actorTypeData1[2] != 0) {
sfx_play_sound_at_position(actor->actorTypeData1[2], SOUND_SPACE_MODE_0, actor->curPos.x, actor->curPos.y, actor->curPos.z);
sfx_play_sound_at_position(actor->actorTypeData1[2], SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
}
} else {
if (actor->actorTypeData1[3] != 0) {
sfx_play_sound_at_position(actor->actorTypeData1[3], SOUND_SPACE_MODE_0, actor->curPos.x, actor->curPos.y, actor->curPos.z);
sfx_play_sound_at_position(actor->actorTypeData1[3], SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
}
}
}
@ -2468,7 +2468,7 @@ ApiStatus FlyPartTo(Evt* script, s32 isInitialCall) {
}
if (part->partTypeData[2] != 0 && part->partTypeData[3] == 0) {
sfx_play_sound_at_position(part->partTypeData[2], SOUND_SPACE_MODE_0, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
sfx_play_sound_at_position(part->partTypeData[2], SOUND_SPACE_DEFAULT, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
}
partMovement->unk_3C = 0;
partMovement->angle = 0.0f;
@ -2506,11 +2506,11 @@ ApiStatus FlyPartTo(Evt* script, s32 isInitialCall) {
partMovement->unk_2C = 0;
if (actor->footStepCounter % 2 != 0) {
if (part->partTypeData[2] != 0) {
sfx_play_sound_at_position(part->partTypeData[2], SOUND_SPACE_MODE_0, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
sfx_play_sound_at_position(part->partTypeData[2], SOUND_SPACE_DEFAULT, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
}
} else {
if (part->partTypeData[3] != 0) {
sfx_play_sound_at_position(part->partTypeData[3], SOUND_SPACE_MODE_0, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
sfx_play_sound_at_position(part->partTypeData[3], SOUND_SPACE_DEFAULT, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
}
}
}
@ -2521,11 +2521,11 @@ ApiStatus FlyPartTo(Evt* script, s32 isInitialCall) {
partMovement->unk_2C = 0;
if (actor->footStepCounter % 2 != 0) {
if (part->partTypeData[2] != 0) {
sfx_play_sound_at_position(part->partTypeData[2], SOUND_SPACE_MODE_0, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
sfx_play_sound_at_position(part->partTypeData[2], SOUND_SPACE_DEFAULT, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
}
} else {
if (part->partTypeData[3] != 0) {
sfx_play_sound_at_position(part->partTypeData[3], SOUND_SPACE_MODE_0, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
sfx_play_sound_at_position(part->partTypeData[3], SOUND_SPACE_DEFAULT, part->absolutePos.x, part->absolutePos.y, part->absolutePos.z);
}
}
}
@ -3090,7 +3090,7 @@ ApiStatus func_8027D434(Evt* script, s32 isInitialCall) {
partID = evt_get_variable(script, *args++);
part = get_actor_part(get_actor(actorID), partID);
part->unk_70 = evt_get_variable(script, *args++);
part->targetPriorityOffset = evt_get_variable(script, *args++);
return ApiStatus_DONE2;
}
@ -3130,9 +3130,9 @@ ApiStatus EnableActorBlur(Evt* script, s32 isInitialCall) {
actor = get_actor(actorID);
if (enable == 0) {
if (enable == ACTOR_BLUR_DISABLE) {
disable_actor_blur(actor);
} else if (enable == 1) {
} else if (enable == ACTOR_BLUR_ENABLE) {
enable_actor_blur(actor);
} else {
reset_actor_blur(actor);
@ -3140,14 +3140,17 @@ ApiStatus EnableActorBlur(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus func_8027D628(Evt* script, s32 isInitialCall) {
s32 actorID = evt_get_variable(script, *script->ptrReadPos);
ApiStatus ForceDisableActorBlur(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
Actor* actor;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
func_80254610(get_actor(actorID));
actor = get_actor(actorID);
force_disable_actor_blur(actor);
return ApiStatus_DONE2;
}
@ -3168,20 +3171,20 @@ ApiStatus AfflictActor(Evt* script, s32 isInitialCall) {
actor = get_actor(actorID);
switch (statusTypeKey) {
case 7:
statusDurationKey = 38;
case STATUS_KEY_FROZEN:
statusDurationKey = STATUS_TURN_MOD_PARALYZE; // @bug should be STATUS_TURN_MOD_FROZEN
break;
case 6:
statusDurationKey = 32;
case STATUS_KEY_SLEEP:
statusDurationKey = STATUS_TURN_MOD_SLEEP;
break;
case 5:
statusDurationKey = 38;
case STATUS_KEY_PARALYZE:
statusDurationKey = STATUS_TURN_MOD_PARALYZE;
break;
case 4:
statusDurationKey = 36;
case STATUS_KEY_DIZZY:
statusDurationKey = STATUS_TURN_MOD_DIZZY;
break;
default:
statusDurationKey = 38;
statusDurationKey = STATUS_TURN_MOD_PARALYZE;
break;
}

View File

@ -79,7 +79,7 @@ HitResult calc_partner_test_enemy(void) {
&& (part->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP)
&& !(target->flags2 & ACTOR_FLAG_UPSIDE_DOWN)
) {
sfx_play_sound_at_position(SOUND_0108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SPIKE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return HIT_RESULT_LANDED_ON_SPIKE;
}
@ -89,7 +89,7 @@ HitResult calc_partner_test_enemy(void) {
&& !(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_SPIKY_FRONT)
&& !player_team_is_ability_active(partner, ABILITY_SPIKE_SHIELD)
) {
sfx_play_sound_at_position(SOUND_0108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SPIKE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
@ -100,7 +100,7 @@ HitResult calc_partner_test_enemy(void) {
&& (part->eventFlags & ACTOR_EVENT_FLAG_FIREY)
&& !(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_BURN_CONTACT)
) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_BURN_CONTACT);
dispatch_event_actor(target, EVENT_BURN_TAUNT);
return HIT_RESULT_BACKFIRE;
@ -114,7 +114,7 @@ HitResult calc_partner_test_enemy(void) {
&& !(target->flags & ACTOR_FLAG_UPSIDE_DOWN)
&& !(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_SPIKY_TOP)
) {
sfx_play_sound_at_position(SOUND_0108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SPIKE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
@ -125,7 +125,7 @@ HitResult calc_partner_test_enemy(void) {
&& !(target->flags & ACTOR_FLAG_UPSIDE_DOWN)
&& !(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_FLAG_80)
) {
sfx_play_sound_at_position(SOUND_0108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SPIKE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
@ -138,7 +138,7 @@ HitResult calc_partner_test_enemy(void) {
&& !(battleStatus->curAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& !(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT))
{
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
apply_shock_effect(partner);
dispatch_damage_event_partner_1(1, EVENT_SHOCK_HIT);
return HIT_RESULT_BACKFIRE;
@ -149,7 +149,7 @@ HitResult calc_partner_test_enemy(void) {
&& (part->eventFlags & ACTOR_EVENT_FLAG_FIREY)
&& !(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_BURN_CONTACT))
{
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_BURN_CONTACT);
dispatch_event_actor(target, EVENT_BURN_TAUNT);
return HIT_RESULT_BACKFIRE;
@ -201,7 +201,7 @@ HitResult calc_partner_damage_enemy(void) {
if (gBattleStatus.flags1 & BS_FLAGS1_FORCE_HIT_IMMUNE) {
retVal = 2;
dispatchEvent = EVENT_ZERO_DAMAGE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY
|| target->transparentStatus == STATUS_KEY_TRANSPARENT
@ -211,7 +211,7 @@ HitResult calc_partner_damage_enemy(void) {
}
if (target->stoneStatus == STATUS_KEY_STONE) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 1);
show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 0);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
@ -228,7 +228,7 @@ HitResult calc_partner_damage_enemy(void) {
if (battleStatus->curAttackElement & DAMAGE_TYPE_JUMP
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP
) {
sfx_play_sound_at_position(SOUND_0108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SPIKE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
@ -241,12 +241,12 @@ HitResult calc_partner_damage_enemy(void) {
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
if (!(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_EXPLODE_CONTACT)) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_BURN_CONTACT);
return HIT_RESULT_BACKFIRE;
}
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
}
@ -258,7 +258,7 @@ HitResult calc_partner_damage_enemy(void) {
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_FIREY
&& !(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_BURN_CONTACT)
) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_BURN_CONTACT);
dispatch_event_actor(target, EVENT_BURN_TAUNT);
return HIT_RESULT_BACKFIRE;
@ -269,7 +269,7 @@ HitResult calc_partner_damage_enemy(void) {
&& targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_FRONT
&& !(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_SPIKY_FRONT)
) {
sfx_play_sound_at_position(SOUND_0108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SPIKE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
@ -280,7 +280,7 @@ HitResult calc_partner_damage_enemy(void) {
&& battleStatus->curAttackElement & DAMAGE_TYPE_FIRE
&& targetPart->eventFlags & (ACTOR_EVENT_FLAG_FIRE_EXPLODE | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION)
) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
@ -294,7 +294,7 @@ HitResult calc_partner_damage_enemy(void) {
&& !(target->flags & ACTOR_FLAG_UPSIDE_DOWN)
&& !(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_FLAG_80)
) {
sfx_play_sound_at_position(SOUND_0108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SPIKE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
@ -306,7 +306,7 @@ HitResult calc_partner_damage_enemy(void) {
&& !(target->flags & ACTOR_FLAG_UPSIDE_DOWN)
&& !(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_SPIKY_TOP)
) {
sfx_play_sound_at_position(SOUND_0108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SPIKE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_damage_event_partner_1(1, EVENT_SPIKE_CONTACT);
dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
return HIT_RESULT_BACKFIRE;
@ -317,7 +317,7 @@ HitResult calc_partner_damage_enemy(void) {
&& battleStatus->curAttackElement & DAMAGE_TYPE_FIRE
&& targetPart->eventFlags & (ACTOR_EVENT_FLAG_FIRE_EXPLODE | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION)
) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return HIT_RESULT_1;
@ -332,7 +332,7 @@ HitResult calc_partner_damage_enemy(void) {
&& !(battleStatus->curAttackElement & DAMAGE_TYPE_NO_CONTACT)
&& !(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
apply_shock_effect(partner);
dispatch_damage_event_partner_1(1, EVENT_SHOCK_HIT);
return HIT_RESULT_BACKFIRE;
@ -435,7 +435,7 @@ HitResult calc_partner_damage_enemy(void) {
if (!(battleStatus->curAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
retVal = 2;
dispatchEvent = EVENT_ZERO_DAMAGE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
retVal = 2;
if (target->curHP < 1) {
@ -478,7 +478,7 @@ HitResult calc_partner_damage_enemy(void) {
|| battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT
) {
dispatchEvent = (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) ? EVENT_ZERO_DAMAGE : EVENT_IMMUNE;
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, dispatchEvent);
show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
@ -487,7 +487,7 @@ HitResult calc_partner_damage_enemy(void) {
return HIT_RESULT_HIT;
}
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
apply_shock_effect(partner);
dispatch_damage_event_partner_1(1, EVENT_SHOCK_HIT);
return HIT_RESULT_BACKFIRE;
@ -684,7 +684,7 @@ HitResult calc_partner_damage_enemy(void) {
retVal = 0;
tempBinary = TRUE;
gBattleStatus.flags1 |= (BS_FLAGS1_40 | BS_FLAGS1_SP_EVT_ACTIVE | BS_FLAGS1_10 | BS_FLAGS1_SHOW_PLAYER_DECORATIONS | BS_FLAGS1_ACTORS_VISIBLE);
sfx_play_sound_at_position(SOUND_0231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_0231, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
dispatchEvent = EVENT_IMMUNE;
retVal = 2;
@ -725,7 +725,7 @@ HitResult calc_partner_damage_enemy(void) {
retVal = 0;
tempBinary = TRUE;
gBattleStatus.flags1 |= (BS_FLAGS1_40 | BS_FLAGS1_SP_EVT_ACTIVE | BS_FLAGS1_10 | BS_FLAGS1_SHOW_PLAYER_DECORATIONS | BS_FLAGS1_ACTORS_VISIBLE);
sfx_play_sound_at_position(SOUND_0231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_0231, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
dispatchEvent = EVENT_IMMUNE;
retVal = 2;
@ -764,7 +764,7 @@ HitResult calc_partner_damage_enemy(void) {
&& !(gBattleStatus.flags1 & BS_FLAGS1_80)
) {
if (battleStatus->lastAttackDamage > 0) {
sfx_play_sound_at_position(SOUND_0231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_0231, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->lastAttackDamage > 0 || (battleStatus->curAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS && tempBinary)) {
@ -783,19 +783,19 @@ HitResult calc_partner_damage_enemy(void) {
if (battleStatus->lastAttackDamage > 0) {
if (partImmuneToElement == 0) {
if (partner->actorTypeData1[5] != 0) {
sfx_play_sound_at_position(partner->actorTypeData1[5], SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(partner->actorTypeData1[5], SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
func_80267018(target, 1);
if (isFireDamage) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isShockDamage) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isIceDamage) {
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
}
}
@ -804,7 +804,7 @@ HitResult calc_partner_damage_enemy(void) {
&& !(tempBinary || wasStatusInflicted)
|| targetPart->flags & ACTOR_PART_FLAG_2000
) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->curAttackStatus & STATUS_FLAG_SLEEP && wasStatusInflicted) {
@ -812,7 +812,7 @@ HitResult calc_partner_damage_enemy(void) {
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->curAttackStatus & STATUS_FLAG_DIZZY && wasStatusInflicted) {
@ -820,7 +820,7 @@ HitResult calc_partner_damage_enemy(void) {
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->curAttackStatus & STATUS_FLAG_PARALYZE && wasStatusInflicted) {
@ -828,7 +828,7 @@ HitResult calc_partner_damage_enemy(void) {
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->curAttackStatus & STATUS_FLAG_POISON && wasStatusInflicted) {
@ -836,7 +836,7 @@ HitResult calc_partner_damage_enemy(void) {
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->curAttackStatus & STATUS_FLAG_STOP && wasStatusInflicted) {
@ -844,7 +844,7 @@ HitResult calc_partner_damage_enemy(void) {
evt->varTable[0] = state->goalPos.x;
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->curAttackStatus & STATUS_FLAG_FROZEN && wasStatusInflicted) {
@ -853,7 +853,7 @@ HitResult calc_partner_damage_enemy(void) {
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
evt->varTablePtr[3] = target;
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->curAttackStatus & STATUS_FLAG_SHRINK && wasStatusInflicted) {
@ -862,11 +862,11 @@ HitResult calc_partner_damage_enemy(void) {
evt->varTable[1] = state->goalPos.y;
evt->varTable[2] = state->goalPos.z;
evt->varTablePtr[3] = target;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->curAttackElement & DAMAGE_TYPE_SMASH && target->actorType == ACTOR_TYPE_GOOMNUT_TREE) {
sfx_play_sound_at_position(SOUND_SMASH_GOOMNUT_TREE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_SMACK_TREE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
show_actor_health_bar(target);
@ -884,7 +884,7 @@ HitResult calc_partner_damage_enemy(void) {
if (partner->staticStatus != STATUS_KEY_STATIC && (target->staticStatus == STATUS_KEY_STATIC ||
targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED) && !(battleStatus->curAttackElement & DAMAGE_TYPE_NO_CONTACT) &&
!(battleStatus->curAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
apply_shock_effect(partner);
dispatch_damage_event_partner_1(1, EVENT_SHOCK_HIT);
return -1;

View File

@ -586,7 +586,7 @@ void basic_ai_wander(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolum
yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->pos.x, gPlayerStatusPtr->pos.z);
if (!npc_test_move_simple_with_slipping(npc->collisionChannel, &x, &y, &z, aiSettings->chaseSpeed, yaw, npc->collisionHeight, npc->collisionDiameter)) {
npc->yaw = yaw;
ai_enemy_play_sound(npc, SOUND_SRAW_0B_A, SOUND_PARAM_MORE_QUIET);
ai_enemy_play_sound(npc, SOUND_AI_ALERT_A, SOUND_PARAM_MORE_QUIET);
fx_emote(EMOTE_EXCLAMATION, npc, 0, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &sp34);
enemy->aiFlags &= ~ENEMY_AI_FLAG_40;
enemy->aiFlags &= ~ENEMY_AI_FLAG_20;
@ -683,7 +683,7 @@ void basic_ai_loiter(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolum
yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->pos.x, gPlayerStatusPtr->pos.z);
if (!npc_test_move_simple_with_slipping(npc->collisionChannel, &x, &y, &z, aiSettings->chaseSpeed, yaw, npc->collisionHeight, npc->collisionDiameter)) {
npc->yaw = yaw;
ai_enemy_play_sound(npc, SOUND_SRAW_0B_A, SOUND_PARAM_MORE_QUIET);
ai_enemy_play_sound(npc, SOUND_AI_ALERT_A, SOUND_PARAM_MORE_QUIET);
fx_emote(EMOTE_EXCLAMATION, npc, 0, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &emoteTemp);
if (enemy->npcSettings->actionFlags & AI_ACTION_JUMP_WHEN_SEE_PLAYER) {
script->AI_TEMP_STATE = AI_STATE_ALERT_INIT;
@ -862,10 +862,10 @@ ApiStatus BasicAI_Main(Evt* script, s32 isInitialCall) {
npc->flags &= ~NPC_FLAG_JUMPING;
if (!enemy->territory->wander.isFlying) {
npc->flags |= NPC_FLAG_GRAVITY;
npc->flags &= ~NPC_FLAG_8;
npc->flags &= ~NPC_FLAG_FLYING;
} else {
npc->flags &= ~NPC_FLAG_GRAVITY;
npc->flags |= NPC_FLAG_8;
npc->flags |= NPC_FLAG_FLYING;
}
if (enemy->aiFlags & ENEMY_AI_FLAG_SUSPEND) {

View File

@ -64,7 +64,7 @@ EvtScript D_800939B4 = {
EVT_CALL(SetSelfVar, 0, 1)
EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(D_800939A4))
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY | NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_8 | NPC_FLAG_JUMPING, FALSE)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_JUMPING, FALSE)
EVT_CALL(SetNpcAnimation, NPC_SELF, LVar2)
EVT_SET(LVar0, 0)
EVT_LOOP(30)

View File

@ -2600,7 +2600,7 @@ void btl_state_update_player_menu(void) {
battleStatus->submenuStatus[entryIdx] = -1;
}
entryIdx++;
} while (0);
} while (0); // TODO required to match
} while (0); // TODO required to match
}
battleStatus->submenuMoveCount = entryIdx;
@ -4653,8 +4653,6 @@ void btl_state_draw_peach_menu(void) {
}
}
static const f32 padding2 = 0.0f;
s32 btl_menu_show_switch_to_peach(void) {
if (gBattleStatus.flags2 & BS_FLAGS2_2) {
return FALSE;
@ -4662,6 +4660,8 @@ s32 btl_menu_show_switch_to_peach(void) {
return TRUE;
}
static const f32 padding2 = 0.0f;
void btl_state_update_twink_menu(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor;

View File

@ -245,7 +245,7 @@ u32 _heap_free(HeapNode* heapNodeList, void* addrToFree) {
// walk the full heap node list looking for the block before our current entry
tempNode = heapNodeList;
while (1) {
while (TRUE) {
// get the pointer to the next block, if it matches the block being freed then
// exit the search
heapNodeList = tempNode->next;

View File

@ -632,7 +632,7 @@ Npc* peach_make_disguise_npc(s32 peachDisguise) {
playerStatus->peachDisguise = peachDisguise;
gGameStatusPtr->peachDisguise = peachDisguise;
bpPtr->flags = NPC_FLAG_8 | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_IGNORE_CAMERA_FOR_YAW;
bpPtr->flags = NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_IGNORE_CAMERA_FOR_YAW;
bpPtr->initialAnim = BasicPeachDisguiseAnims[playerStatus->peachDisguise].idle;
bpPtr->onUpdate = NULL;
bpPtr->onRender = NULL;

View File

@ -390,7 +390,7 @@ void phys_player_land(void) {
playerStatus->landPos.x = playerStatus->pos.x;
playerStatus->landPos.z = playerStatus->pos.z;
playerStatus->flags &= ~PS_FLAG_AIRBORNE;
sfx_play_sound_at_player(SOUND_LAND_SOFTLY, SOUND_SPACE_MODE_0);
sfx_play_sound_at_player(SOUND_LAND_SOFTLY, SOUND_SPACE_DEFAULT);
if (!(collisionStatus->curFloor & COLLISION_WITH_ENTITY_BIT)) {
phys_adjust_cam_on_landing();
}
@ -1130,7 +1130,7 @@ void try_player_footstep_sounds(s32 interval) {
soundID = altSoundID;
}
sfx_play_sound_at_player(soundID, SOUND_SPACE_MODE_0);
sfx_play_sound_at_player(soundID, SOUND_SPACE_DEFAULT);
FootstepSoundSelector ^= 1;
}
}

View File

@ -73,7 +73,7 @@ void clear_player_data(void) {
for (i = 0; i < ARRAY_COUNT(playerData->partners); i++) {
playerData->partners[i].enabled = FALSE;
playerData->partners[i].level = 0;
playerData->partners[i].level = PARTNER_RANK_NORMAL;
playerData->partners[i].unk_02[0] = 0;
playerData->partners[i].unk_02[1] = 0;
playerData->partners[i].unk_02[2] = 0;

View File

@ -2371,34 +2371,34 @@ void update_item_entity_collectable(ItemEntity* item) {
item->flags |= ITEM_ENTITY_FLAG_DONE_FALLING;
} else {
if (IS_BADGE(item->itemID)) {
sfx_play_sound_at_position(SOUND_BADGE_BOUNCE, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_BADGE_BOUNCE, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
} else if (IS_ITEM(item->itemID)) {
sfx_play_sound_at_position(SOUND_ITEM_BOUNCE, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_ITEM_BOUNCE, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
} else {
switch (item->itemID) {
case ITEM_HEART:
sfx_play_sound_at_position(SOUND_HEART_BOUNCE, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_HEART_BOUNCE, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
break;
case ITEM_COIN:
sfx_play_sound_at_position(SOUND_COIN_BOUNCE, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_COIN_BOUNCE, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
break;
case ITEM_KOOPA_FORTRESS_KEY:
sfx_play_sound_at_position(SOUND_COIN_BOUNCE, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_COIN_BOUNCE, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
break;
case ITEM_HEART_PIECE:
sfx_play_sound_at_position(SOUND_HEART_BOUNCE, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_HEART_BOUNCE, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
break;
case ITEM_STAR_POINT:
sfx_play_sound_at_position(SOUND_COIN_BOUNCE, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_COIN_BOUNCE, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
break;
case ITEM_HEART_POINT:
sfx_play_sound_at_position(SOUND_HEART_BOUNCE, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_HEART_BOUNCE, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
break;
case ITEM_STAR_PIECE:
sfx_play_sound_at_position(SOUND_STAR_PIECE_BOUNCE, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_STAR_PIECE_BOUNCE, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
break;
case ITEM_FLOWER_POINT:
sfx_play_sound_at_position(SOUND_FLOWER_BOUNCE, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_FLOWER_BOUNCE, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
break;
}
}
@ -2439,25 +2439,25 @@ void update_item_entity_collectable(ItemEntity* item) {
case ITEM_HEART:
if (playerData->curHP < playerData->curMaxHP) {
fx_recover(0, playerStatus->pos.x, playerStatus->pos.y + playerStatus->colliderHeight, playerStatus->pos.z, 1);
sfx_play_sound_at_position(SOUND_RECOVER, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_RECOVER, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
}
playerData->curHP++;
if (playerData->curHP > playerData->curMaxHP) {
playerData->curHP = playerData->curMaxHP;
}
sfx_play_sound_at_position(SOUND_HEART_PICKUP, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_HEART_PICKUP, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
fx_sparkles(4, playerStatus->pos.x, playerStatus->pos.y + playerStatus->colliderHeight, playerStatus->pos.z, 30.0f);
break;
case ITEM_FLOWER_POINT:
if (playerData->curFP < playerData->curMaxFP) {
fx_recover(1, playerStatus->pos.x, playerStatus->pos.y + playerStatus->colliderHeight, playerStatus->pos.z, 1);
sfx_play_sound_at_position(SOUND_RECOVER, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_RECOVER, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
}
playerData->curFP++;
if (playerData->curFP > playerData->curMaxFP) {
playerData->curFP = playerData->curMaxFP;
}
sfx_play_sound_at_position(SOUND_FLOWER_PICKUP, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_FLOWER_PICKUP, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
fx_sparkles(4, playerStatus->pos.x, playerStatus->pos.y + playerStatus->colliderHeight, playerStatus->pos.z, 30.0f);
break;
case ITEM_COIN:
@ -2465,7 +2465,7 @@ void update_item_entity_collectable(ItemEntity* item) {
if (playerData->coins > 999) {
playerData->coins = 999;
}
sfx_play_sound_at_position(SOUND_COIN_PICKUP, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_COIN_PICKUP, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
playerData->totalCoinsEarned++;
if (playerData->totalCoinsEarned > 99999) {
playerData->totalCoinsEarned = 99999;
@ -2473,19 +2473,19 @@ void update_item_entity_collectable(ItemEntity* item) {
break;
case ITEM_KOOPA_FORTRESS_KEY:
playerData->fortressKeyCount = playerData->fortressKeyCount + 1;
sfx_play_sound_at_position(SOUND_COIN_PICKUP, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_COIN_PICKUP, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
break;
case ITEM_STAR_POINT:
playerData->starPoints++;
if (playerData->starPoints > 100) {
playerData->starPoints = 100;
}
sfx_play_sound_at_position(SOUND_COIN_PICKUP, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_COIN_PICKUP, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
break;
case ITEM_HEART_POINT:
playerData->curHP = playerData->curMaxHP;
playerData->curFP = playerData->curMaxFP;
sfx_play_sound_at_position(SOUND_HEART_PICKUP, SOUND_SPACE_MODE_0, item->pos.x, item->pos.y, item->pos.z);
sfx_play_sound_at_position(SOUND_HEART_PICKUP, SOUND_SPACE_DEFAULT, item->pos.x, item->pos.y, item->pos.z);
break;
}
D_801565A8 = FALSE;

View File

@ -1969,7 +1969,7 @@ ApiStatus HPBarToCurrent(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus func_8026D8EC(Evt* script, s32 isInitialCall) {
ApiStatus HideHPBar(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
@ -1982,7 +1982,7 @@ ApiStatus func_8026D8EC(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus func_8026D940(Evt* script, s32 isInitialCall) {
ApiStatus SetHPBarOffset(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
Actor* actor;
@ -2123,12 +2123,18 @@ ApiStatus SummonEnemy(Evt* script, s32 isInitialCall) {
}
ApiStatus GetOwnerID(Evt* script, s32 isInitialCall) {
evt_set_variable(script, *script->ptrReadPos, script->owner1.actorID);
Bytecode* args = script->ptrReadPos;
s32 outVar = *args++;
evt_set_variable(script, outVar, script->owner1.actorID);
return ApiStatus_DONE2;
}
ApiStatus SetOwnerID(Evt* script, s32 isInitialCall) {
script->owner1.actorID = evt_get_variable(script, *script->ptrReadPos);
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
script->owner1.actorID = actorID;
return ApiStatus_DONE2;
}
@ -2151,50 +2157,65 @@ ApiStatus ActorExists(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus func_8026DEF0(Evt* script, s32 isInitialCall) {
ApiStatus GetPartAnimInstanceID(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 partID = evt_get_variable(script, *args++);
s32 a2 = *args++;
s32 outVar = *args++;
Actor* actor;
ActorPart* part;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
evt_set_variable(script, a2, get_actor_part(get_actor(actorID), partID)->spriteInstanceID);
actor = get_actor(actorID);
part = get_actor_part(actor, partID);
evt_set_variable(script, outVar, part->spriteInstanceID);
return ApiStatus_DONE2;
}
ApiStatus func_8026DF88(Evt* script, s32 isInitialCall) {
ApiStatus GetPartAnimNotify(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 partID = evt_get_variable(script, *args++);
s32 a2 = *args++;
s32 outVar = *args++;
Actor* actor;
ActorPart* part;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
evt_set_variable(script, a2, get_actor_part(get_actor(actorID), partID)->animNotifyValue);
actor = get_actor(actorID);
part = get_actor_part(actor, partID);
evt_set_variable(script, outVar, part->animNotifyValue);
return ApiStatus_DONE2;
}
ApiStatus SetBattleMenuEnabledFlags(Evt* script, s32 isInitialCall) {
s32 flagsValue = *script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
s32 flagsValue = *args++;
gBattleStatus.enabledMenusFlags = flagsValue;
return ApiStatus_DONE2;
}
ApiStatus SetEnabledStarPowers(Evt* script, s32 isInitialCall) {
gBattleStatus.enabledStarPowersFlags = *script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
s32 enabled = *args++;
gBattleStatus.enabledStarPowersFlags = enabled;
return ApiStatus_DONE2;
}
ApiStatus SetBattleInputMask(Evt* script, s32 isInitialCall) {
gBattleStatus.inputBitmask = *script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
s32 mask = *args++;
gBattleStatus.inputBitmask = mask;
return ApiStatus_DONE2;
}
@ -2203,7 +2224,7 @@ ApiStatus SetBattleInputButtons(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
s32 currentButtonsDown = *args++;
s32 currentButtonsPressed = *args++;
s32 currentButtonsHeld = *args;
s32 currentButtonsHeld = *args++;
battleStatus->curButtonsDown = currentButtonsDown;
battleStatus->curButtonsPressed = currentButtonsPressed;
@ -2215,40 +2236,46 @@ ApiStatus SetBattleInputButtons(Evt* script, s32 isInitialCall) {
ApiStatus CheckButtonPress(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Bytecode buttons = *args++;
Bytecode out = *args;
Bytecode outVar = *args++;
s32 buttonsPressed = gBattleStatus.curButtonsPressed;
evt_set_variable(script, out, (buttonsPressed & buttons) != 0);
evt_set_variable(script, outVar, (buttonsPressed & buttons) != 0);
return ApiStatus_DONE2;
}
ApiStatus CheckButtonHeld(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Bytecode buttons = *args++;
Bytecode out = *args;
Bytecode outVar = *args++;
s32 buttonsHeld = gBattleStatus.curButtonsHeld;
evt_set_variable(script, out, (buttonsHeld & buttons) != 0);
evt_set_variable(script, outVar, (buttonsHeld & buttons) != 0);
return ApiStatus_DONE2;
}
ApiStatus CheckButtonDown(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Bytecode buttons = *args++;
Bytecode out = *args;
Bytecode outVar = *args++;
s32 buttonsDown = gBattleStatus.curButtonsDown;
evt_set_variable(script, out, (buttonsDown & buttons) != 0);
evt_set_variable(script, outVar, (buttonsDown & buttons) != 0);
return ApiStatus_DONE2;
}
ApiStatus GetBattleState(Evt* script, s32 isInitialCall) {
evt_set_variable(script, *script->ptrReadPos, gBattleState);
Bytecode* args = script->ptrReadPos;
s32 outVar = *args++;
evt_set_variable(script, outVar, gBattleState);
return ApiStatus_DONE2;
}
ApiStatus SetBattleState(Evt* script, s32 isInitialCall) {
btl_set_state(evt_get_variable(script, *script->ptrReadPos));
Bytecode* args = script->ptrReadPos;
s32 state = evt_get_variable(script, *args++);
btl_set_state(state);
return ApiStatus_DONE2;
}
@ -2259,7 +2286,7 @@ ApiStatus WaitForState(Evt* script, s32 isInitialCall) {
if (isInitialCall) {
temp_v0 = evt_get_variable(script, *args++);
if (!temp_v0) {
if (temp_v0 == 0) {
battleStatus->unk_95 = 0;
return ApiStatus_DONE2;
}
@ -3216,7 +3243,7 @@ ApiStatus BoostAttack(Evt* script, s32 isInitialCall) {
x1 = actor->curPos.x + actor->headOffset.x;
if (flags & ACTOR_FLAG_UPSIDE_DOWN) {
y1 = actor->curPos.y + actor->headOffset.y - actor->size.y / 2;
} else if (!(flags & ACTOR_FLAG_8000)) {
} else if (!(flags & ACTOR_FLAG_HALF_HEIGHT)) {
y1 = actor->curPos.y + actor->headOffset.y + actor->size.y / 2;
} else {
y1 = actor->curPos.y + actor->headOffset.y + actor->size.y;
@ -3227,7 +3254,7 @@ ApiStatus BoostAttack(Evt* script, s32 isInitialCall) {
x2 = actor->curPos.x + actor->headOffset.x + actor->size.x / 2;
if (flags2 & ACTOR_FLAG_UPSIDE_DOWN) {
y2 = actor->curPos.y + actor->headOffset.y - actor->size.y;
} else if (!(flags2 & ACTOR_FLAG_8000)) {
} else if (!(flags2 & ACTOR_FLAG_HALF_HEIGHT)) {
y2 = actor->curPos.y + actor->headOffset.y + actor->size.y;
} else {
y2 = actor->curPos.y + actor->headOffset.y + actor->size.y * 2;
@ -3340,7 +3367,7 @@ ApiStatus BoostDefense(Evt* script, s32 isInitialCall) {
x1 = actor->curPos.x + actor->headOffset.x;
if (flags & ACTOR_FLAG_UPSIDE_DOWN) {
y1 = actor->curPos.y + actor->headOffset.y - actor->size.y / 2;
} else if (!(flags & ACTOR_FLAG_8000)) {
} else if (!(flags & ACTOR_FLAG_HALF_HEIGHT)) {
y1 = actor->curPos.y + actor->headOffset.y + actor->size.y / 2;
} else {
y1 = actor->curPos.y + actor->headOffset.y + actor->size.y;
@ -3351,7 +3378,7 @@ ApiStatus BoostDefense(Evt* script, s32 isInitialCall) {
x2 = actor->curPos.x + actor->headOffset.x + actor->size.x / 2;
if (flags2 & ACTOR_FLAG_UPSIDE_DOWN) {
y2 = actor->curPos.y + actor->headOffset.y - actor->size.y;
} else if (!(flags2 & ACTOR_FLAG_8000)) {
} else if (!(flags2 & ACTOR_FLAG_HALF_HEIGHT)) {
y2 = actor->curPos.y + actor->headOffset.y + actor->size.y;
} else {
y2 = actor->curPos.y + actor->headOffset.y + actor->size.y * 2;
@ -3462,7 +3489,7 @@ ApiStatus VanishActor(Evt* script, s32 isInitialCall) {
x = actor->curPos.x + actor->headOffset.x;
if (flags & ACTOR_FLAG_UPSIDE_DOWN) {
y = actor->curPos.y + actor->headOffset.y - actor->size.y / 2;
} else if (!(flags & ACTOR_FLAG_8000)) {
} else if (!(flags & ACTOR_FLAG_HALF_HEIGHT)) {
y = actor->curPos.y + actor->headOffset.y + actor->size.y / 2;
} else {
y = actor->curPos.y + actor->headOffset.y + actor->size.y;
@ -3568,7 +3595,7 @@ ApiStatus ElectrifyActor(Evt* script, s32 isInitialCall) {
x = actor->curPos.x + actor->headOffset.x;
if (flags & ACTOR_FLAG_UPSIDE_DOWN) {
y = actor->curPos.y + actor->headOffset.y - actor->size.y / 2;
} else if (!(flags & ACTOR_FLAG_8000)) {
} else if (!(flags & ACTOR_FLAG_HALF_HEIGHT)) {
y = actor->curPos.y + actor->headOffset.y + actor->size.y / 2;
} else {
y = actor->curPos.y + actor->headOffset.y + actor->size.y;
@ -3674,7 +3701,7 @@ ApiStatus HealActor(Evt* script, s32 isInitialCall) {
x1 = actor->curPos.x + actor->headOffset.x;
if (flags & ACTOR_FLAG_UPSIDE_DOWN) {
y1 = actor->curPos.y + actor->headOffset.y - actor->size.y / 2;
} else if (!(flags & ACTOR_FLAG_8000)) {
} else if (!(flags & ACTOR_FLAG_HALF_HEIGHT)) {
y1 = actor->curPos.y + actor->headOffset.y + actor->size.y / 2;
} else {
y1 = actor->curPos.y + actor->headOffset.y + actor->size.y;
@ -3685,7 +3712,7 @@ ApiStatus HealActor(Evt* script, s32 isInitialCall) {
x2 = actor->curPos.x + actor->headOffset.x + actor->size.x / 2;
if (flags2 & ACTOR_FLAG_UPSIDE_DOWN) {
y2 = actor->curPos.y + actor->headOffset.y - actor->size.y;
} else if (!(flags2 & ACTOR_FLAG_8000)) {
} else if (!(flags2 & ACTOR_FLAG_HALF_HEIGHT)) {
y2 = actor->curPos.y + actor->headOffset.y + actor->size.y;
} else {
y2 = actor->curPos.y + actor->headOffset.y + actor->size.y * 2;

View File

@ -319,7 +319,7 @@ void sfx_play_sound_at_player(s32 soundID, s32 arg1);
void sfx_play_sound_at_npc(s32 soundID, s32 arg1, s32 npcID);
void sfx_play_sound_at_position(s32 soundID, s32 flags, f32 posX, f32 posY, f32 posZ);
void sfx_get_spatialized_sound_params(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags);
void sfx_compute_spatialized_sound_params_0(f32 x, f32 y, f32 z, s16* volume, s16* pan);
void sfx_compute_spatialized_sound_params_1(f32 x, f32 y, f32 z, s16* volume, s16* pan);
void sfx_compute_spatialized_sound_params_ignore_depth(f32 x, f32 y, f32 z, s16* volume, s16* pan);
void sfx_compute_spatialized_sound_params_with_depth(f32 x, f32 y, f32 z, s16* volume, s16* pan);
void sfx_compute_spatialized_sound_params_full(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags);
*/

View File

@ -90,8 +90,8 @@ void sfx_play_sound_at_player(s32 soundID, s32 arg1);
void sfx_play_sound_at_npc(s32 soundID, s32 arg1, s32 npcID);
void sfx_play_sound_at_position(s32 soundID, s32 flags, f32 posX, f32 posY, f32 posZ);
void sfx_get_spatialized_sound_params(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags);
void sfx_compute_spatialized_sound_params_0(f32 x, f32 y, f32 z, s16* volume, s16* pan);
void sfx_compute_spatialized_sound_params_1(f32 x, f32 y, f32 z, s16* volume, s16* pan);
void sfx_compute_spatialized_sound_params_ignore_depth(f32 x, f32 y, f32 z, s16* volume, s16* pan);
void sfx_compute_spatialized_sound_params_with_depth(f32 x, f32 y, f32 z, s16* volume, s16* pan);
void sfx_compute_spatialized_sound_params_full(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags);
#endif

View File

@ -10,15 +10,15 @@ SHIFT_BSS u16 gCurrentRoomDoorSounds;
// map logical looping soundIDs to raw ones
s32 LoopingSounds[] = {
[SOUND_LOOP_IDX(SOUND_LOOP_00)] SOUND_LRAW_0287,
[SOUND_LOOP_IDX(SOUND_LOOP_BOMBETTE_FUSE)] SOUND_LRAW_BOMBETTE_FUSE,
[SOUND_LOOP_IDX(SOUND_LOOP_BOBOMB_FUSE)] SOUND_LRAW_BOBOMB_FUSE,
[SOUND_LOOP_IDX(SOUND_LOOP_02)] SOUND_LRAW_0054,
[SOUND_LOOP_IDX(SOUND_LOOP_03)] SOUND_LRAW_0056,
[SOUND_LOOP_IDX(SOUND_LOOP_ISK_FLIP_STAIRS)] SOUND_ISK_FLIP_STAIRS,
[SOUND_LOOP_IDX(SOUND_LOOP_ISK_LOWER_STAIRS)] SOUND_LRAW_ISK_LOWER_STAIRS,
[SOUND_LOOP_IDX(SOUND_LOOP_TRD_02_LOWER_STAIRS)] SOUND_LRAW_TRD_02_LOWER_STAIRS,
[SOUND_LOOP_IDX(SOUND_LOOP_TRD_04_LOWER_STAIRS)] SOUND_LRAW_TRD_04_LOWER_STAIRS,
[SOUND_LOOP_IDX(SOUND_LOOP_TRD_FLOWING_WATER)] SOUND_LRAW_TRD_FLOWING_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TRD_RAISE_STAIRS)] SOUND_LRAW_TRD_RAISE_STAIRS,
[SOUND_LOOP_IDX(SOUND_LOOP_08)] SOUND_LRAW_CHEERING,
[SOUND_LOOP_IDX(SOUND_LOOP_CHEERING)] SOUND_LRAW_CHEERING,
[SOUND_LOOP_IDX(SOUND_LOOP_09)] SOUND_LRAW_0273,
[SOUND_LOOP_IDX(SOUND_LOOP_0A)] SOUND_LRAW_0275,
[SOUND_LOOP_IDX(SOUND_LOOP_0B)] SOUND_LRAW_0275,
@ -27,19 +27,19 @@ s32 LoopingSounds[] = {
[SOUND_LOOP_IDX(SOUND_LOOP_0E)] SOUND_LRAW_0274,
[SOUND_LOOP_IDX(SOUND_LOOP_OBK_LOWER_CHAIN)] SOUND_LRAW_OBK_LOWER_CHAIN,
[SOUND_LOOP_IDX(SOUND_LOOP_MOVE_STATUE)] SOUND_LRAW_MOVE_STATUE,
[SOUND_LOOP_IDX(SOUND_LOOP_11)] SOUND_LRAW_032E,
[SOUND_LOOP_IDX(SOUND_LOOP_SENTINEL_ALARM)] SOUND_LRAW_SENTINEL_ALARM,
[SOUND_LOOP_IDX(SOUND_LOOP_QUIZ_TICKING)] SOUND_LRAW_QUIZ_TICKING,
[SOUND_LOOP_IDX(SOUND_LOOP_AUDIENCE_MURMUR)] SOUND_LRAW_AUDIENCE_MURMUR,
[SOUND_LOOP_IDX(SOUND_LOOP_TOYBOX_TRAIN_GEAR)] SOUND_LRAW_TOYBOX_TRAIN_GEAR,
[SOUND_LOOP_IDX(SOUND_LOOP_15)] SOUND_LRAW_0388,
[SOUND_LOOP_IDX(SOUND_LOOP_OMO_SLOT_MACHINE)] SOUND_LRAW_OMO_SLOT_MACHINE,
[SOUND_LOOP_IDX(SOUND_LOOP_OMO_ROTATING_WHEEL)] SOUND_LRAW_OMO_ROTATING_WHEEL,
[SOUND_LOOP_IDX(SOUND_LOOP_17)] SOUND_LRAW_004A,
[SOUND_LOOP_IDX(SOUND_LOOP_JAN_BEACH_WAVES)] SOUND_LRAW_JAN_BEACH_WAVES,
[SOUND_LOOP_IDX(SOUND_LOOP_MOVE_LARGE_STATUE)] SOUND_LRAW_MOVE_LARGE_STATUE,
[SOUND_LOOP_IDX(SOUND_LOOP_19)] SOUND_LRAW_0168,
[SOUND_LOOP_IDX(SOUND_LOOP_1A)] SOUND_LRAW_0185,
[SOUND_LOOP_IDX(SOUND_LOOP_1B)] SOUND_LRAW_0052,
[SOUND_LOOP_IDX(SOUND_LOOP_1C)] SOUND_LRAW_004E,
[SOUND_LOOP_IDX(SOUND_LOOP_1D)] SOUND_LRAW_004F,
[SOUND_LOOP_IDX(SOUND_LOOP_ZIPLINE_RIDE)] SOUND_LRAW_ZIPLINE_RIDE,
[SOUND_LOOP_IDX(SOUND_LOOP_ZIPLINE_RETURN)] SOUND_LRAW_ZIPLINE_RETURN,
[SOUND_LOOP_IDX(SOUND_LOOP_TROMP_ROLL)] SOUND_LRAW_TROMP_ROLL,
[SOUND_LOOP_IDX(SOUND_LOOP_JAN_SMALL_GEYSER)] SOUND_LRAW_JAN_SMALL_GEYSER,
[SOUND_LOOP_IDX(SOUND_LOOP_JAN_LARGE_GEYSER)] SOUND_LRAW_JAN_LARGE_GEYSER,
[SOUND_LOOP_IDX(SOUND_LOOP_1E)] SOUND_LRAW_0189,
[SOUND_LOOP_IDX(SOUND_LOOP_1F)] SOUND_NONE,
[SOUND_LOOP_IDX(SOUND_LOOP_20)] SOUND_NONE,
@ -74,9 +74,9 @@ s32 LoopingSounds[] = {
[SOUND_LOOP_IDX(SOUND_LOOP_3D)] SOUND_LRAW_0276,
[SOUND_LOOP_IDX(SOUND_LOOP_3E)] SOUND_LRAW_0275,
[SOUND_LOOP_IDX(SOUND_LOOP_3F)] SOUND_LRAW_0274,
[SOUND_LOOP_IDX(SOUND_LOOP_40)] SOUND_LRAW_039E,
[SOUND_LOOP_IDX(SOUND_LOOP_SAM_STAIRS_RISE)] SOUND_LRAW_SAM_STAIRS_RISE,
[SOUND_LOOP_IDX(SOUND_LOOP_CHARGE_BAR)] SOUND_LRAW_CHARGE_BAR,
[SOUND_LOOP_IDX(SOUND_LOOP_42)] SOUND_LRAW_0207,
[SOUND_LOOP_IDX(SOUND_LOOP_CRYSTAL_BALL_GLOW)] SOUND_LRAW_CRYSTAL_BALL_GLOW,
[SOUND_LOOP_IDX(SOUND_LOOP_43)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_44)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_45)] SOUND_LRAW_0275,
@ -84,13 +84,13 @@ s32 LoopingSounds[] = {
[SOUND_LOOP_IDX(SOUND_LOOP_47)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_48)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_49)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_4A)] SOUND_LRAW_0050,
[SOUND_LOOP_IDX(SOUND_LOOP_WINDILL_GEARS)] SOUND_LRAW_WINDILL_GEARS,
[SOUND_LOOP_IDX(SOUND_LOOP_4C)] SOUND_LRAW_036C,
[SOUND_LOOP_IDX(SOUND_LOOP_4D)] SOUND_LRAW_036D,
[SOUND_LOOP_IDX(SOUND_LOOP_4E)] SOUND_FLIGHT,
[SOUND_LOOP_IDX(SOUND_LOOP_4F)] SOUND_LRAW_0043,
[SOUND_LOOP_IDX(SOUND_LOOP_50)] SOUND_LRAW_0197,
[SOUND_LOOP_IDX(SOUND_LOOP_WINDMILL_EXT)] SOUND_LRAW_WINDMILL_EXT,
[SOUND_LOOP_IDX(SOUND_LOOP_WINDMILL_GEARS)] SOUND_LRAW_WINDMILL_GEARS,
[SOUND_LOOP_IDX(SOUND_LOOP_SHY_GUY_CROWD_1)] SOUND_LRAW_SHY_GUY_CROWD_1,
[SOUND_LOOP_IDX(SOUND_LOOP_SHY_GUY_CROWD_2)] SOUND_LRAW_SHY_GUY_CROWD_2,
[SOUND_LOOP_IDX(SOUND_LOOP_FLIGHT)] SOUND_FLIGHT,
[SOUND_LOOP_IDX(SOUND_LOOP_WHALE_GEYSER)] SOUND_LRAW_WHALE_GEYSER,
[SOUND_LOOP_IDX(SOUND_LOOP_FLO_FILL_WATER_POOL)] SOUND_LRAW_FLO_FILL_WATER_POOL,
[SOUND_LOOP_IDX(SOUND_LOOP_KPA_CHAIN_DRIVE)] SOUND_LRAW_KPA_CHAIN_DRIVE,
[SOUND_LOOP_IDX(SOUND_LOOP_KPA_FILL_WATER)] SOUND_LRAW_KPA_FILL_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_KPA_DRAIN_WATER)] SOUND_LRAW_KPA_DRAIN_WATER,
@ -98,24 +98,24 @@ s32 LoopingSounds[] = {
[SOUND_LOOP_IDX(SOUND_LOOP_JR_TROOPA_SWIM)] SOUND_LRAW_JR_TROOPA_SWIM,
[SOUND_LOOP_IDX(SOUND_LOOP_KKJ_RUMBLING)] SOUND_LRAW_KKJ_RUMBLING,
[SOUND_LOOP_IDX(SOUND_LOOP_OSR_RUMBLING)] SOUND_LRAW_OSR_RUMBLING,
[SOUND_LOOP_IDX(SOUND_LOOP_58)] SOUND_LRAW_0039,
[SOUND_LOOP_IDX(SOUND_LOOP_59)] SOUND_LRAW_004C,
[SOUND_LOOP_IDX(SOUND_LOOP_5A)] SOUND_LRAW_004D,
[SOUND_LOOP_IDX(SOUND_LOOP_5B)] SOUND_LRAW_01B1,
[SOUND_LOOP_IDX(SOUND_LOOP_5C)] SOUND_LRAW_01B2,
[SOUND_LOOP_IDX(SOUND_LOOP_MAC_HARBOR_WATER)] SOUND_LRAW_MAC_HARBOR_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_OSR_FOUNTAIN_INTACT)] SOUND_LRAW_OSR_FOUNTAIN_INTACT,
[SOUND_LOOP_IDX(SOUND_LOOP_OSR_FOUNTAIN_BROKEN)] SOUND_LRAW_OSR_FOUNTAIN_BROKEN,
[SOUND_LOOP_IDX(SOUND_LOOP_NOK_WATER)] SOUND_LRAW_NOK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TRD_WATER_EXT)] SOUND_LRAW_TRD_WATER_EXT,
[SOUND_LOOP_IDX(SOUND_LOOP_DGB_COLLAPSE)] SOUND_LRAW_DGB_COLLAPSE,
[SOUND_LOOP_IDX(SOUND_LOOP_5E)] SOUND_LRAW_005D,
[SOUND_LOOP_IDX(SOUND_LOOP_5F)] SOUND_LRAW_005B,
[SOUND_LOOP_IDX(SOUND_LOOP_60)] SOUND_LRAW_0060,
[SOUND_LOOP_IDX(SOUND_LOOP_61)] SOUND_LRAW_01B3,
[SOUND_LOOP_IDX(SOUND_LOOP_SBK_RUINS_RISING)] SOUND_LRAW_SBK_RUINS_RISING,
[SOUND_LOOP_IDX(SOUND_LOOP_SBK_RUINS_WHIRLWIND)] SOUND_LRAW_SBK_RUINS_WHIRLWIND,
[SOUND_LOOP_IDX(SOUND_LOOP_SBK_RUINS_RISING_DISTANT)] SOUND_LRAW_SBK_RUINS_RISING_DISTANT,
[SOUND_LOOP_IDX(SOUND_LOOP_SBK_OASIS_WATER)] SOUND_LRAW_SBK_OASIS_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_62)] SOUND_NONE,
[SOUND_LOOP_IDX(SOUND_LOOP_STAR_SANCTUARY_FAR)] SOUND_LRAW_STAR_SANCTUARY_FAR,
[SOUND_LOOP_IDX(SOUND_LOOP_STAR_SANCTUARY_NEAR)] SOUND_LRAW_STAR_SANCTUARY_NEAR,
[SOUND_LOOP_IDX(SOUND_LOOP_STAR_SANCTUARY_INSIDE)] SOUND_LRAW_STAR_SANCTUARY_INSIDE,
[SOUND_LOOP_IDX(SOUND_LOOP_BOWSER_PROPELLER)] SOUND_LRAW_BOWSER_PROPELLER,
[SOUND_LOOP_IDX(SOUND_LOOP_STAR_CARD_APPEARS)] SOUND_LRAW_STAR_CARD_APPEARS,
[SOUND_LOOP_IDX(SOUND_LOOP_68)] SOUND_LRAW_0248,
[SOUND_LOOP_IDX(SOUND_LOOP_69)] SOUND_LRAW_0249,
[SOUND_LOOP_IDX(SOUND_LOOP_STAR_ORB_RISING)] SOUND_LRAW_STAR_ORB_RISING,
[SOUND_LOOP_IDX(SOUND_LOOP_USE_STAR_BEAM)] SOUND_LRAW_USE_STAR_BEAM,
[SOUND_LOOP_IDX(SOUND_LOOP_USE_PEACH_BEAM)] SOUND_LRAW_USE_PEACH_BEAM,
[SOUND_LOOP_IDX(SOUND_LOOP_6A)] SOUND_LRAW_0391,
[SOUND_LOOP_IDX(SOUND_LOOP_6B)] SOUND_LRAW_03BC,
[SOUND_LOOP_IDX(SOUND_LOOP_6C)] SOUND_LRAW_03AD,
@ -124,40 +124,40 @@ s32 LoopingSounds[] = {
};
// all sound IDs for alternating sounds
s32 FireBar0Sounds[] = { SOUND_SRAW_FIRE_BAR_0_A, SOUND_SRAW_FIRE_BAR_0_B };
s32 FireBar1Sounds[] = { SOUND_SRAW_FIRE_BAR_1_A, SOUND_SRAW_FIRE_BAR_1_B };
s32 FireBar2Sounds[] = { SOUND_SRAW_FIRE_BAR_2_A, SOUND_SRAW_FIRE_BAR_2_B };
s32 FireBar3Sounds[] = { SOUND_SRAW_FIRE_BAR_3_A, SOUND_SRAW_FIRE_BAR_3_B };
s32 FireBar4Sounds[] = { SOUND_SRAW_FIRE_BAR_4_A, SOUND_SRAW_FIRE_BAR_4_B };
s32 FireBar5Sounds[] = { SOUND_SRAW_FIRE_BAR_5_A, SOUND_SRAW_FIRE_BAR_5_B };
s32 FireBar6Sounds[] = { SOUND_SRAW_FIRE_BAR_6_A, SOUND_SRAW_FIRE_BAR_6_B };
s32 FireBar7Sounds[] = { SOUND_SRAW_FIRE_BAR_7_A, SOUND_SRAW_FIRE_BAR_7_B };
s32 FireBar8Sounds[] = { SOUND_SRAW_FIRE_BAR_8_A, SOUND_SRAW_FIRE_BAR_8_B };
s32 FireBar9Sounds[] = { SOUND_SRAW_FIRE_BAR_9_A, SOUND_SRAW_FIRE_BAR_9_B };
s32 FireBarDeadSounds[] = { SOUND_SRAW_FIRE_BAR_DEAD, SOUND_SRAW_FIRE_BAR_DEAD };
s32 D_8014F4E4[] = { SOUND_SRAW_0B_A, SOUND_SRAW_0B_B };
s32 D_8014F4EC[] = { SOUND_SRAW_0C_A, SOUND_SRAW_0C_B };
s32 D_8014F4F4[] = { SOUND_SRAW_0D_A, SOUND_SRAW_0D_B };
s32 D_8014F4FC[] = { SOUND_SRAW_0E_A, SOUND_SRAW_0E_B };
s32 FireBar0Sounds[] = { SOUND_FIRE_BAR_0_A, SOUND_FIRE_BAR_0_B };
s32 FireBar1Sounds[] = { SOUND_FIRE_BAR_1_A, SOUND_FIRE_BAR_1_B };
s32 FireBar2Sounds[] = { SOUND_FIRE_BAR_2_A, SOUND_FIRE_BAR_2_B };
s32 FireBar3Sounds[] = { SOUND_FIRE_BAR_3_A, SOUND_FIRE_BAR_3_B };
s32 FireBar4Sounds[] = { SOUND_FIRE_BAR_4_A, SOUND_FIRE_BAR_4_B };
s32 FireBar5Sounds[] = { SOUND_FIRE_BAR_5_A, SOUND_FIRE_BAR_5_B };
s32 FireBar6Sounds[] = { SOUND_FIRE_BAR_6_A, SOUND_FIRE_BAR_6_B };
s32 FireBar7Sounds[] = { SOUND_FIRE_BAR_7_A, SOUND_FIRE_BAR_7_B };
s32 FireBar8Sounds[] = { SOUND_FIRE_BAR_8_A, SOUND_FIRE_BAR_8_B };
s32 FireBar9Sounds[] = { SOUND_FIRE_BAR_9_A, SOUND_FIRE_BAR_9_B };
s32 FireBarDeadSounds[] = { SOUND_FIRE_BAR_DEAD, SOUND_FIRE_BAR_DEAD };
s32 AlertSounds[] = { SOUND_AI_ALERT_A, SOUND_AI_ALERT_B };
s32 SnoreInhaleSounds[] = { SOUND_SNORE_INHALE_A, SOUND_SNORE_INHALE_B };
s32 SnoreExhaleSounds[] = { SOUND_SNORE_EXHALE_A, SOUND_SNORE_EXHALE_B };
s32 SnapAwakeSounds[] = { SOUND_SNAP_AWAKE_A, SOUND_SNAP_AWAKE_B };
s32 BooVanishSounds[] = { SOUND_BOO_VANISH_A, SOUND_BOO_VANISH_B };
s32 BooAppearSounds[] = { SOUND_BOO_APPEAR_A, SOUND_BOO_APPEAR_B };
s32 D_8014F514[] = { SOUND_SRAW_11_A, SOUND_SRAW_11_B };
s32 D_8014F51C[] = { SOUND_SRAW_12_A, SOUND_SRAW_12_B };
s32 WindowOpenSounds[] = { SOUND_WINDOW_OPEN_A, SOUND_WINDOW_OPEN_B };
s32 WindowCloseSounds[] = { SOUND_WINDOW_CLOSE_A, SOUND_WINDOW_CLOSE_B };
s32 RavenLeapSounds[] = { SOUND_RAVEN_LEAP_A, SOUND_RAVEN_LEAP_B };
s32 D_8014F52C[] = { SOUND_SRAW_14_A, SOUND_SRAW_14_B, SOUND_SRAW_14_C };
s32 D_8014F538[] = { SOUND_SRAW_15_A, SOUND_SRAW_15_B };
s32 D_8014F540[] = { SOUND_SRAW_16_A, SOUND_SRAW_16_B };
s32 D_8014F548[] = { SOUND_SRAW_17_A, SOUND_SRAW_17_B, SOUND_SRAW_17_C };
s32 D_8014F554[] = { SOUND_SRAW_20_A, SOUND_SRAW_20_B };
s32 D_8014F55C[] = { SOUND_SRAW_19_A, SOUND_SRAW_19_B };
s32 D_8014F564[] = { SOUND_SRAW_1A_A, SOUND_SRAW_1A_B };
s32 D_8014F56C[] = { SOUND_SRAW_1B_A, SOUND_SRAW_1B_B };
s32 D_8014F574[] = { SOUND_SRAW_1C_A, SOUND_SRAW_1C_B };
s32 D_8014F57C[] = { SOUND_SRAW_1D_A, SOUND_SRAW_1D_B };
s32 D_8014F584[] = { SOUND_SRAW_1E_A, SOUND_SRAW_1E_B };
s32 D_8014F58C[] = { SOUND_SRAW_1F_A, SOUND_SRAW_1F_B };
s32 D_8014F594[] = { SOUND_SRAW_20_A, SOUND_SRAW_20_B };
s32 D_8014F59C[] = { SOUND_SRAW_21_A, SOUND_SRAW_21_B };
s32 RavenFallSounds[] = { SOUND_RAVEN_FALL_A, SOUND_RAVEN_FALL_B, SOUND_RAVEN_FALL_C };
s32 ShootingStarFallSounds[] = { SOUND_SHOOTING_STAR_FALL_A, SOUND_SHOOTING_STAR_FALL_B };
s32 ShootingStarBounceSounds[] = { SOUND_STAR_BOUNCE_A, SOUND_STAR_BOUNCE_B };
s32 FuzzyHopSounds[] = { SOUND_FUZZY_HOP_A, SOUND_FUZZY_HOP_B, SOUND_FUZZY_HOP_C };
s32 BulletBillExplodeSounds[] = { SOUND_BULLET_BILL_EXPLODE_A, SOUND_BULLET_BILL_EXPLODE_B };
s32 LuigiStepSounds[] = { SOUND_LUIGI_STEP_A, SOUND_LUIGI_STEP_B };
s32 TrainChugSounds[] = { SOUND_TRAIN_CHUG_A, SOUND_TRAIN_CHUG_B };
s32 FinaleBridgeCollapseSounds[] = { SOUND_FINALE_BRIDGE_COLLAPSE_A, SOUND_FINALE_BRIDGE_COLLAPSE_B };
s32 FinaleExplosionSounds[] = { SOUND_FINALE_EXPLOSION_A, SOUND_FINALE_EXPLOSION_B };
s32 CardShuffleSounds[] = { SOUND_SHUFFLE_CARD_A, SOUND_SHUFFLE_CARD_B };
s32 StarSpiritAppearSounds[] = { SOUND_STAR_SPIRIT_APPEAR_A, SOUND_STAR_SPIRIT_APPEAR_B };
s32 StarSpiritCastSounds[] = { SOUND_STAR_SPIRIT_CAST_A, SOUND_STAR_SPIRIT_CAST_B };
s32 UnusedExplodeSounds[] = { SOUND_BULLET_BILL_EXPLODE_A, SOUND_BULLET_BILL_EXPLODE_B };
s32 ShyGuyStepSounds[] = { SOUND_SHY_GUY_STEP_A, SOUND_SHY_GUY_STEP_B };
#define SEQ_SOUND_ENTRY(soundID, sym) [soundID & 0xFFFF] { .sounds = sym, .soundCount = ARRAY_COUNT(sym) }
@ -174,29 +174,29 @@ AlternatingSoundSet AlternatingSounds[] = {
SEQ_SOUND_ENTRY(SOUND_SEQ_FIRE_BAR_8, FireBar8Sounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_FIRE_BAR_9, FireBar9Sounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_FIRE_BAR_DEAD, FireBarDeadSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_0B, D_8014F4E4),
SEQ_SOUND_ENTRY(SOUND_SEQ_0C, D_8014F4EC),
SEQ_SOUND_ENTRY(SOUND_SEQ_0D, D_8014F4F4),
SEQ_SOUND_ENTRY(SOUND_SEQ_0E, D_8014F4FC),
SEQ_SOUND_ENTRY(SOUND_SEQ_AI_ALERT, AlertSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_SNORE_INHALE, SnoreInhaleSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_SNORE_EXHALE, SnoreExhaleSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_SNAP_AWAKE, SnapAwakeSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_BOO_VANISH, BooVanishSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_BOO_APPEAR, BooAppearSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_11, D_8014F514),
SEQ_SOUND_ENTRY(SOUND_SEQ_12, D_8014F51C),
SEQ_SOUND_ENTRY(SOUND_SEQ_WINDOW_OPEN, WindowOpenSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_WINDOW_CLOSE, WindowCloseSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_RAVEN_LEAP, RavenLeapSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_14, D_8014F52C),
SEQ_SOUND_ENTRY(SOUND_SEQ_15, D_8014F538),
SEQ_SOUND_ENTRY(SOUND_SEQ_16, D_8014F540),
SEQ_SOUND_ENTRY(SOUND_SEQ_17, D_8014F548),
SEQ_SOUND_ENTRY(SOUND_SEQ_18, D_8014F554),
SEQ_SOUND_ENTRY(SOUND_SEQ_19, D_8014F55C),
SEQ_SOUND_ENTRY(SOUND_SEQ_1A, D_8014F564),
SEQ_SOUND_ENTRY(SOUND_SEQ_1B, D_8014F56C),
SEQ_SOUND_ENTRY(SOUND_SEQ_1C, D_8014F574),
SEQ_SOUND_ENTRY(SOUND_SEQ_1D, D_8014F57C),
SEQ_SOUND_ENTRY(SOUND_SEQ_1E, D_8014F584),
SEQ_SOUND_ENTRY(SOUND_SEQ_1F, D_8014F58C),
SEQ_SOUND_ENTRY(SOUND_SEQ_20, D_8014F594),
SEQ_SOUND_ENTRY(SOUND_SEQ_21, D_8014F59C),
SEQ_SOUND_ENTRY(SOUND_SEQ_RAVEN_FALL, RavenFallSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_SHOOTING_STAR_FALL, ShootingStarFallSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_SHOOTING_STAR_BOUNCE, ShootingStarBounceSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_FUZZY_HOP, FuzzyHopSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_BULLET_BILL_EXPLODE, BulletBillExplodeSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_LUIGI_STEP, LuigiStepSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_TRAIN_CHUG, TrainChugSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_FINALE_BRIDGE_COLLAPSE, FinaleBridgeCollapseSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_FINALE_EXPLOSION, FinaleExplosionSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_SHUFFLE_CARD, CardShuffleSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_STAR_SPIRIT_APPEAR, StarSpiritAppearSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_STAR_SPIRIT_CAST, StarSpiritCastSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_UNUSED_EXPLODE, UnusedExplodeSounds),
SEQ_SOUND_ENTRY(SOUND_SEQ_SHY_GUY_STEP, ShyGuyStepSounds),
};
s32 OpenCloseSounds[][2] = {
@ -205,8 +205,8 @@ s32 OpenCloseSounds[][2] = {
{ SOUND_LARGE_DOOR_OPEN, SOUND_LARGE_DOOR_CLOSE },
{ SOUND_CREAKY_DOOR_OPEN, SOUND_CREAKY_DOOR_CLOSE },
{ SOUND_METAL_GATE_OPEN, SOUND_METAL_GATE_CLOSE },
{ SOUND_SRAW_11_A, SOUND_SRAW_12_A },
{ SOUND_20A3, SOUND_20A4 },
{ SOUND_WINDOW_OPEN_A, SOUND_WINDOW_CLOSE_A },
{ SOUND_CREAKY_WINDOW_OPEN, SOUND_CREAKY_WINDOW_CLOSE },
};
SHIFT_BSS SoundInstance wEnvSounds[MAX_SOUND_INSTANCES];
@ -559,11 +559,11 @@ void sfx_get_spatialized_sound_params(f32 x, f32 y, f32 z, s16* volume, s16* pan
} while (0); // required to match
switch (spaceMode) {
case SOUND_SPACE_MODE_0:
sfx_compute_spatialized_sound_params_0(x, y, z, volume, pan);
case SOUND_SPACE_DEFAULT:
sfx_compute_spatialized_sound_params_ignore_depth(x, y, z, volume, pan);
break;
case SOUND_SPACE_MODE_1:
sfx_compute_spatialized_sound_params_1(x, y, z, volume, pan);
case SOUND_SPACE_WITH_DEPTH:
sfx_compute_spatialized_sound_params_with_depth(x, y, z, volume, pan);
break;
case SOUND_SPACE_FULL:
sfx_compute_spatialized_sound_params_full(x, y, z, volume, pan, paramFlags);
@ -594,7 +594,7 @@ void sfx_get_spatialized_sound_params(f32 x, f32 y, f32 z, s16* volume, s16* pan
}
}
void sfx_compute_spatialized_sound_params_0(f32 x, f32 y, f32 z, s16* volume, s16* pan) {
void sfx_compute_spatialized_sound_params_ignore_depth(f32 x, f32 y, f32 z, s16* volume, s16* pan) {
s32 screenX, screenY, screenZ;
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
@ -628,7 +628,7 @@ void sfx_compute_spatialized_sound_params_0(f32 x, f32 y, f32 z, s16* volume, s1
}
}
void sfx_compute_spatialized_sound_params_1(f32 x, f32 y, f32 z, s16* volume, s16* pan) {
void sfx_compute_spatialized_sound_params_with_depth(f32 x, f32 y, f32 z, s16* volume, s16* pan) {
Camera* camera = &gCameras[gCurrentCameraID];
s32 screenX, screenY, screenZ;
f32 depth;
@ -646,7 +646,6 @@ void sfx_compute_spatialized_sound_params_1(f32 x, f32 y, f32 z, s16* volume, s1
*volume = (screenX * 0.3f) + 127.0f;
screenX = 0;
}
if (camera->viewportW < screenX) {
*volume = 127.0f - ((screenX - camera->viewportW) * 0.3f);
screenX = camera->viewportW;

View File

@ -546,10 +546,10 @@ s32 check_block_input(s32 buttonMask) {
s32 i;
s32 ignoreWindow;
battleStatus->blockResult = 0; // Fail
battleStatus->blockResult = BLOCK_RESULT_FAIL;
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_TUTORIAL_BLOCK && (battleStatus->flags1 & BS_FLAGS1_TUTORIAL_BATTLE)) {
battleStatus->blockResult = 1;
battleStatus->blockResult = BLOCK_RESULT_SUCCESS;
return TRUE;
}
@ -603,7 +603,7 @@ s32 check_block_input(s32 buttonMask) {
}
if (battleStatus->pushInputBuffer[bufferPos] & buttonMask) {
battleStatus->blockResult = 1; // Block
battleStatus->blockResult = BLOCK_RESULT_SUCCESS;
block = TRUE;
break;
}
@ -611,7 +611,7 @@ s32 check_block_input(s32 buttonMask) {
}
if (mash) {
battleStatus->blockResult = -1; // Mash
battleStatus->blockResult = BLOCK_RESULT_EARLY;
block = FALSE;
}
@ -769,13 +769,13 @@ API_CALLABLE(GetActionSuccessCopy) {
return ApiStatus_DONE2;
}
API_CALLABLE(func_80269524) {
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.unk_86);
API_CALLABLE(GetActionResult) {
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionResult);
return ApiStatus_DONE2;
}
API_CALLABLE(func_80269550) {
gBattleStatus.unk_86 = evt_get_variable(script, *script->ptrReadPos);
API_CALLABLE(SetActionResult) {
gBattleStatus.actionResult = evt_get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
}
@ -784,13 +784,13 @@ API_CALLABLE(GetBlockResult) {
return ApiStatus_DONE2;
}
API_CALLABLE(GetActionResult) {
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionResult);
API_CALLABLE(GetActionQuality) {
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionQuality);
return ApiStatus_DONE2;
}
API_CALLABLE(SetActionResult) {
gBattleStatus.actionResult = evt_get_variable(script, *script->ptrReadPos);
API_CALLABLE(SetActionQuality) {
gBattleStatus.actionQuality = evt_get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
}

View File

@ -140,11 +140,11 @@ API_CALLABLE(CloseActionCommandInfo);
API_CALLABLE(func_80269470);
API_CALLABLE(ShowActionHud);
API_CALLABLE(GetActionSuccessCopy);
API_CALLABLE(func_80269524);
API_CALLABLE(func_80269550);
API_CALLABLE(GetBlockResult);
API_CALLABLE(GetActionResult);
API_CALLABLE(SetActionResult);
API_CALLABLE(GetBlockResult);
API_CALLABLE(GetActionQuality);
API_CALLABLE(SetActionQuality);
API_CALLABLE(func_80269600);
API_CALLABLE(func_8026962C);

View File

@ -71,7 +71,7 @@ API_CALLABLE(N(start)) {
actionCommandStatus->wrongButtonPressed = FALSE;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
battleStatus->actionResult = ACTION_RESULT_FAIL;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
func_8024FAFC();
@ -160,7 +160,7 @@ void N(update)(void) {
}
}
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
battleStatus->actionQuality = actionCommandStatus->barFillLevel / 100;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;

View File

@ -12,7 +12,7 @@ API_CALLABLE(N(init)) {
battleStatus->unk_82 = 100;
battleStatus->actionCmdDifficultyTable = actionCmdTable0A;
battleStatus->unk_86 = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
@ -118,7 +118,7 @@ void N(update)(void) {
hud_element_clear_flags(id, 2);
}
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
battleStatus->actionQuality = actionCommandStatus->barFillLevel / 100;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
@ -133,9 +133,9 @@ void N(update)(void) {
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
if (battleStatus->actionSuccess >= cutoff) {
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
} else {
battleStatus->unk_86 = -2;
battleStatus->actionResult = ACTION_RESULT_MINUS_2;
}
if (battleStatus->actionSuccess == 100) {

View File

@ -18,7 +18,7 @@ API_CALLABLE(N(init)) {
battleStatus->actionCmdDifficultyTable = actionCmdTableAirLift;
battleStatus->unk_82 = 0;
battleStatus->unk_86 = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
action_command_init_status();
actionCommandStatus->unk_5A = evt_get_variable(script, *args++);
actionCommandStatus->actionCommandID = ACTION_COMMAND_AIR_LIFT;
@ -29,7 +29,7 @@ API_CALLABLE(N(init)) {
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->isBarFilled = FALSE;
battleStatus->actionSuccess = 0;
battleStatus->actionResult = 0;
battleStatus->actionQuality = 0;
actionCommandStatus->hudPrepareTime = 30;
actionCommandStatus->hudPosX = -48;
air_lift_bss_0 = 0;
@ -72,7 +72,7 @@ API_CALLABLE(N(start)) {
actionCommandStatus->wrongButtonPressed = FALSE;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
mashMeterCutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
actionCommandStatus->unk_5C = 0;
@ -181,8 +181,8 @@ void N(update)(void) {
}
battleStatus->actionSuccess = actionCommandStatus->barFillLevel / 100;
if (battleStatus->actionResult < battleStatus->actionSuccess) {
battleStatus->actionResult = battleStatus->actionSuccess;
if (battleStatus->actionQuality < battleStatus->actionSuccess) {
battleStatus->actionQuality = battleStatus->actionSuccess;
}
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionSuccess * 12);
@ -192,15 +192,15 @@ void N(update)(void) {
}
if (actionCommandStatus->unk_5A == 0) {
battleStatus->actionResult = 0;
battleStatus->actionQuality = 0;
}
battleStatus->actionSuccess = battleStatus->actionResult;
battleStatus->actionSuccess = battleStatus->actionQuality;
if (rand_int(99) < battleStatus->actionSuccess) {
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
battleStatus->actionSuccess = 1;
} else {
battleStatus->unk_86 = -2;
battleStatus->actionResult = ACTION_RESULT_MINUS_2;
battleStatus->actionSuccess = -1;
}

View File

@ -17,7 +17,7 @@ API_CALLABLE(N(init)) {
battleStatus->unk_82 = 100;
battleStatus->actionCmdDifficultyTable = actionCmdTableAirRaid;
battleStatus->unk_86 = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
@ -158,32 +158,32 @@ void N(update)(void) {
hud_element_clear_flags(id, 2);
}
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionResult * 12);
battleStatus->actionQuality = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionQuality * 12);
switch (partner->actorBlueprint->level) {
case 0:
if (battleStatus->actionResult >= D_802A9984_429CA4[battleStatus->unk_85]) {
if (battleStatus->actionQuality >= D_802A9984_429CA4[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0 && battleStatus->actionResult < D_802A9984_429CA4[battleStatus->unk_85 - 1]) {
if (battleStatus->unk_85 > 0 && battleStatus->actionQuality < D_802A9984_429CA4[battleStatus->unk_85 - 1]) {
battleStatus->unk_85--;
}
break;
case 1:
if (battleStatus->actionResult >= D_802A9994_429CB4[battleStatus->unk_85]) {
if (battleStatus->actionQuality >= D_802A9994_429CB4[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0 && battleStatus->actionResult < D_802A9994_429CB4[battleStatus->unk_85 - 1]) {
if (battleStatus->unk_85 > 0 && battleStatus->actionQuality < D_802A9994_429CB4[battleStatus->unk_85 - 1]) {
battleStatus->unk_85--;
}
break;
case 2:
if (battleStatus->actionResult >= D_802A99A8_429CC8[battleStatus->unk_85]) {
if (battleStatus->actionQuality >= D_802A99A8_429CC8[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0 && battleStatus->actionResult < D_802A99A8_429CC8[battleStatus->unk_85 - 1]) {
if (battleStatus->unk_85 > 0 && battleStatus->actionQuality < D_802A99A8_429CC8[battleStatus->unk_85 - 1]) {
battleStatus->unk_85--;
}
break;
@ -202,9 +202,9 @@ void N(update)(void) {
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
if (battleStatus->actionSuccess <= cutoff) {
battleStatus->unk_86 = -2;
battleStatus->actionResult = ACTION_RESULT_MINUS_2;
} else {
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
}
if (battleStatus->actionSuccess == 100) {

View File

@ -12,7 +12,7 @@ API_CALLABLE(N(init)) {
battleStatus->unk_82 = 100;
battleStatus->actionCmdDifficultyTable = actionCmdTableBodySlam;
battleStatus->unk_86 = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
@ -137,8 +137,8 @@ void N(update)(void) {
}
}
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionResult * 12);
battleStatus->actionQuality = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionQuality * 12);
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
@ -154,7 +154,7 @@ void N(update)(void) {
}
} while (0); // required to match
battleStatus->unk_86 = 0;
battleStatus->actionResult = ACTION_RESULT_FAIL;
if (battleStatus->actionSuccess == 1) {
func_80269160();
}

View File

@ -14,7 +14,7 @@ API_CALLABLE(N(init)) {
battleStatus->unk_82 = 100;
battleStatus->actionCmdDifficultyTable = actionCmdTableBomb;
battleStatus->unk_86 = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
@ -147,8 +147,8 @@ void N(update)(void) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionResult * 12);
battleStatus->actionQuality = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionQuality * 12);
if (actionCommandStatus->frameCounter == 0) {
if (actionCommandStatus->barFillLevel == 0) {
@ -159,9 +159,9 @@ void N(update)(void) {
mashMeterCutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
if (mashMeterCutoff >= battleStatus->actionSuccess) {
battleStatus->unk_86 = -2;
battleStatus->actionResult = ACTION_RESULT_MINUS_2;
} else {
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
}
if (battleStatus->actionSuccess == 100) {

View File

@ -12,7 +12,7 @@ API_CALLABLE(N(init)) {
battleStatus->unk_82 = 0;
battleStatus->actionCmdDifficultyTable = actionCmdTableBreakFree;
battleStatus->unk_86 = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
@ -82,7 +82,7 @@ API_CALLABLE(N(start)) {
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
battleStatus->unk_82 = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
actionCommandStatus->thresholdLevel = rand_int(actionCommandStatus->unk_5A);
@ -196,10 +196,10 @@ void N(update)(void) {
}
if (battleStatus->actionSuccess >= actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals] - actionCommandStatus->thresholdLevel) {
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
battleStatus->actionSuccess = 1;
} else {
battleStatus->unk_86 = -2;
battleStatus->actionResult = ACTION_RESULT_MINUS_2;
battleStatus->actionSuccess = -1;
}

View File

@ -20,7 +20,7 @@ API_CALLABLE(N(start)) {
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
mashMeterCutoff = actionCommandStatus->mashMeterCutoffs[(actionCommandStatus->mashMeterIntervals - 1)];
battleStatus->flags1 &= ~BS_FLAGS1_8000;
actionCommandStatus->state = 10;

View File

@ -15,7 +15,7 @@ API_CALLABLE(N(init)) {
battleStatus->unk_82 = 100;
battleStatus->actionCmdDifficultyTable = actionCmdTableDizzyShell;
battleStatus->unk_86 = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
@ -143,8 +143,8 @@ void N(update)(void) {
hud_element_clear_flags(id, 2);
}
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionResult * 12);
battleStatus->actionQuality = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionQuality * 12);
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
@ -165,9 +165,9 @@ void N(update)(void) {
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
if (battleStatus->actionSuccess >= cutoff) {
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
} else {
battleStatus->unk_86 = -2;
battleStatus->actionResult = ACTION_RESULT_MINUS_2;
}
if (battleStatus->actionSuccess == 100) {

View File

@ -17,7 +17,7 @@ API_CALLABLE(N(init)) {
battleStatus->unk_82 = 100;
battleStatus->actionCmdDifficultyTable = actionCmdTableFireShell;
battleStatus->unk_86 = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
@ -145,30 +145,30 @@ void N(update)(void) {
hud_element_clear_flags(id, 2);
}
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionResult * 12);
battleStatus->actionQuality = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionQuality * 12);
switch (partner->actorBlueprint->level) {
case 0:
if (battleStatus->actionResult >= D_802A9964_427334[battleStatus->unk_85]) {
if (battleStatus->actionQuality >= D_802A9964_427334[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0 && (battleStatus->actionResult < D_802A9964_427334[battleStatus->unk_85 - 1])) {
if (battleStatus->unk_85 > 0 && (battleStatus->actionQuality < D_802A9964_427334[battleStatus->unk_85 - 1])) {
battleStatus->unk_85--;
}
break;
case 1:
if (battleStatus->actionResult >= D_802A9974_427344[battleStatus->unk_85]) {
if (battleStatus->actionQuality >= D_802A9974_427344[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0 && (battleStatus->actionResult < D_802A9974_427344[battleStatus->unk_85 - 1])) {
if (battleStatus->unk_85 > 0 && (battleStatus->actionQuality < D_802A9974_427344[battleStatus->unk_85 - 1])) {
battleStatus->unk_85--;
}
break;
case 2:
if (battleStatus->actionResult >= D_802A9988_427358[battleStatus->unk_85]) {
if (battleStatus->actionQuality >= D_802A9988_427358[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0 && (battleStatus->actionResult < D_802A9988_427358[battleStatus->unk_85 - 1])) {
if (battleStatus->unk_85 > 0 && (battleStatus->actionQuality < D_802A9988_427358[battleStatus->unk_85 - 1])) {
battleStatus->unk_85--;
}
break;
@ -187,9 +187,9 @@ void N(update)(void) {
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
if (cutoff >= battleStatus->actionSuccess) {
battleStatus->unk_86 = -2;
battleStatus->actionResult = ACTION_RESULT_MINUS_2;
} else {
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
}
if (battleStatus->actionSuccess == 100) {

View File

@ -16,7 +16,7 @@ API_CALLABLE(N(init)) {
battleStatus->unk_82 = 0;
battleStatus->actionCmdDifficultyTable = actionCmdTableFlee;
battleStatus->unk_86 = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
action_command_init_status();
actionCommandStatus->unk_5A = evt_get_variable(script, *args++);
actionCommandStatus->actionCommandID = ACTION_COMMAND_FLEE;
@ -82,7 +82,7 @@ API_CALLABLE(N(start)) {
actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
actionCommandStatus->wrongButtonPressed = FALSE;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
battleStatus->unk_82 = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
battleStatus->flags1 &= ~BS_FLAGS1_8000;
actionCommandStatus->state = 10;
@ -156,10 +156,10 @@ void N(update)(void) {
battleStatus->actionSuccess = actionCommandStatus->barFillLevel / 100;
if (actionCommandStatus->frameCounter == 0) {
if (battleStatus->actionSuccess >= (100 - actionCommandStatus->thresholdLevel)) {
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
battleStatus->actionSuccess = 1;
} else {
battleStatus->unk_86 = -2;
battleStatus->actionResult = ACTION_RESULT_MINUS_2;
battleStatus->actionSuccess = -1;
}
actionCommandStatus->frameCounter = 20;

View File

@ -12,11 +12,11 @@ API_CALLABLE(N(init)) {
battleStatus->unk_82 = 1;
battleStatus->actionCmdDifficultyTable = actionCmdTableHammer;
battleStatus->unk_86 = 0;
battleStatus->actionResult = ACTION_RESULT_FAIL;
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
battleStatus->actionResult = 0;
battleStatus->actionQuality = 0;
return ApiStatus_DONE2;
}
@ -80,7 +80,7 @@ API_CALLABLE(N(start)) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
battleStatus->actionResult = 0;
battleStatus->actionQuality = 0;
return ApiStatus_DONE2;
}
@ -98,8 +98,8 @@ API_CALLABLE(N(start)) {
actionCommandStatus->hammerMissedStart = FALSE;
battleStatus->actionSuccess = 0;
battleStatus->actionResult = 0;
battleStatus->unk_86 = 0;
battleStatus->actionQuality = 0;
battleStatus->actionResult = ACTION_RESULT_FAIL;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
func_80269118();
@ -213,13 +213,13 @@ void N(update)(void) {
if (actionCommandStatus->frameCounter < temp_f20) {
hud_element_set_script(actionCommandStatus->hudElements[4], &HES_TimingCharge3);
battleStatus->actionResult = 0;
battleStatus->actionQuality = 0;
if (actionCommandStatus->frameCounter == 0 && actionCommandStatus->playHammerSounds) {
sfx_play_sound(SOUND_TIMING_BAR_TICK);
}
} else if (actionCommandStatus->frameCounter < temp_f20 * 2) {
hud_element_set_script(actionCommandStatus->hudElements[3], &HES_TimingCharge2);
battleStatus->actionResult = 1;
battleStatus->actionQuality = 1;
if (actionCommandStatus->frameCounter == temp_f20) {
if (actionCommandStatus->playHammerSounds) {
sfx_play_sound(SOUND_TIMING_BAR_TICK);
@ -227,7 +227,7 @@ void N(update)(void) {
}
} else if (actionCommandStatus->frameCounter < temp_f20 * 3.0f) {
hud_element_set_script(actionCommandStatus->hudElements[2], &HES_TimingCharge1);
battleStatus->actionResult = 2;
battleStatus->actionQuality = 2;
if (actionCommandStatus->frameCounter == temp_f20 * 2) {
if (actionCommandStatus->playHammerSounds) {
sfx_play_sound(SOUND_TIMING_BAR_TICK);
@ -236,7 +236,7 @@ void N(update)(void) {
}
if (actionCommandStatus->frameCounter == (~phi_s0 + actionCommandStatus->duration)) {
battleStatus->actionResult = 3;
battleStatus->actionQuality = 3;
hud_element_set_script(actionCommandStatus->hudElements[1], &HES_TimingReady);
hud_element_set_script(actionCommandStatus->hudElements[5], &HES_StickTapNeutral);
if (actionCommandStatus->playHammerSounds) {
@ -260,7 +260,7 @@ void N(update)(void) {
battleStatus->actionCommandMode < ACTION_COMMAND_MODE_TUTORIAL)
{
battleStatus->actionSuccess = -1;
battleStatus->unk_86 = -1;
battleStatus->actionResult = ACTION_RESULT_EARLY;
action_command_free();
} else {
s32 i;
@ -282,7 +282,7 @@ void N(update)(void) {
actionCommandStatus->autoSucceed != 0)
{
battleStatus->actionSuccess = 1;
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
gBattleStatus.flags1 |= BS_FLAGS1_2000;
}
}

View File

@ -80,7 +80,7 @@ API_CALLABLE(N(start)) {
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
battleStatus->actionResult = ACTION_RESULT_FAIL;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
@ -251,7 +251,7 @@ void N(update)(void) {
adjustedFillLevel = actionCommandStatus->barFillLevel / 100;
battleStatus->actionResult = adjustedFillLevel;
battleStatus->actionQuality = adjustedFillLevel;
if (actionCommandStatus->frameCounter == 0) {
s16 threshold;
@ -274,10 +274,10 @@ void N(update)(void) {
mashMeterCutoff = actionCommandStatus->mashMeterCutoffs[mashMeterIndex];
threshold = mashMeterCutoff / 2;
if (battleStatus->actionResult <= threshold) {
battleStatus->unk_86 = -4;
if (battleStatus->actionQuality <= threshold) {
battleStatus->actionResult = ACTION_RESULT_MINUS_4;
} else {
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
}
if (battleStatus->actionSuccess == 100) {

View File

@ -11,7 +11,7 @@ API_CALLABLE(N(init)) {
gBattleStatus.unk_82 = 1;
gBattleStatus.actionCmdDifficultyTable = actionCmdTableJump;
gBattleStatus.unk_86 = 0;
gBattleStatus.actionResult = ACTION_RESULT_FAIL;
if (gBattleStatus.actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
gBattleStatus.actionSuccess = 0;
@ -125,7 +125,7 @@ void N(update)(void) {
}
if ((battleStatus->curButtonsPressed & BUTTON_A) && (actionCommandStatus->autoSucceed == 0)) {
actionCommandStatus->wrongButtonPressed = TRUE;
battleStatus->unk_86 = -1;
battleStatus->actionResult = ACTION_RESULT_EARLY;
}
if ((actionCommandStatus->prepareTime - temp_s0_3) > 0) {
actionCommandStatus->prepareTime -= 1;
@ -157,7 +157,7 @@ void N(update)(void) {
!actionCommandStatus->wrongButtonPressed) ||
(actionCommandStatus->autoSucceed != 0)) {
battleStatus->actionSuccess = 1;
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
gBattleStatus.flags1 |= BS_FLAGS1_2000;
}
}

View File

@ -81,7 +81,7 @@ API_CALLABLE(N(start)) {
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
battleStatus->actionResult = ACTION_RESULT_FAIL;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
@ -256,7 +256,7 @@ void N(update)(void) {
adjustedFillLevel = actionCommandStatus->barFillLevel / 100;
battleStatus->actionResult = adjustedFillLevel;
battleStatus->actionQuality = adjustedFillLevel;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, adjustedFillLevel * 12);
if (actionCommandStatus->frameCounter == 0) {
@ -280,10 +280,10 @@ void N(update)(void) {
mashMeterCutoff = actionCommandStatus->mashMeterCutoffs[mashMeterIndex];
threshold = mashMeterCutoff / 2;
if (battleStatus->actionResult <= threshold) {
battleStatus->unk_86 = -4;
if (battleStatus->actionQuality <= threshold) {
battleStatus->actionResult = ACTION_RESULT_MINUS_4;
} else {
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
}
if (battleStatus->actionSuccess == 100) {

View File

@ -88,7 +88,7 @@ API_CALLABLE(N(start)) {
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
battleStatus->actionResult = ACTION_RESULT_FAIL;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
func_80269118();
@ -207,8 +207,8 @@ void N(update)(void) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED);
}
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionResult * 12);
battleStatus->actionQuality = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionQuality * 12);
if (actionCommandStatus->frameCounter == 0) {
phi_a1 = actionCommandStatus->barFillLevel;
@ -216,20 +216,20 @@ void N(update)(void) {
phi_a1 = 0;
}
battleStatus->actionResult = phi_a1 / 100;
battleStatus->actionQuality = phi_a1 / 100;
if (phi_a1 == 0) {
battleStatus->actionSuccess = -1;
} else if (battleStatus->actionResult >= actionCommandStatus->thresholdLevel) {
} else if (battleStatus->actionQuality >= actionCommandStatus->thresholdLevel) {
battleStatus->actionSuccess = 1;
} else {
battleStatus->actionSuccess = 0;
}
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
if (cutoff / 2 < battleStatus->actionResult) {
battleStatus->unk_86 = 1;
if (cutoff / 2 < battleStatus->actionQuality) {
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
} else {
battleStatus->unk_86 = -4;
battleStatus->actionResult = ACTION_RESULT_MINUS_4;
}
if (battleStatus->actionSuccess == 1) {

View File

@ -41,7 +41,7 @@ API_CALLABLE(N(init)) {
battleStatus->unk_82 = 100;
battleStatus->actionCmdDifficultyTable = actionCmdTableSmack;
battleStatus->unk_86 = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
@ -56,7 +56,7 @@ API_CALLABLE(N(init)) {
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->isBarFilled = FALSE;
battleStatus->actionSuccess = 0;
battleStatus->actionResult = 0;
battleStatus->actionQuality = 0;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
@ -184,54 +184,54 @@ void N(update)(void) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAG_DISABLED);
}
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionResult * 12);
battleStatus->actionQuality = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionQuality * 12);
switch (partnerActor->actorBlueprint->level) {
case 0:
if (battleStatus->actionResult >= D_802A99E4_42ED84[battleStatus->unk_85]) {
if (battleStatus->actionQuality >= D_802A99E4_42ED84[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0) {
s32 index = battleStatus->unk_85 - 1;
if (battleStatus->actionResult < D_802A99E4_42ED84[index]) {
if (battleStatus->actionQuality < D_802A99E4_42ED84[index]) {
battleStatus->unk_85--;
}
}
break;
case 1:
if (battleStatus->actionResult >= D_802A99F4_42ED94[battleStatus->unk_85]) {
if (battleStatus->actionQuality >= D_802A99F4_42ED94[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0) {
s32 index = battleStatus->unk_85 - 1;
if (battleStatus->actionResult < D_802A99F4_42ED94[index]) {
if (battleStatus->actionQuality < D_802A99F4_42ED94[index]) {
battleStatus->unk_85--;
}
}
break;
case 2:
if (actionCommandStatus->targetWeakness == 0) {
if (battleStatus->actionResult >= D_802A9A08_42EDA8[battleStatus->unk_85]) {
if (battleStatus->actionQuality >= D_802A9A08_42EDA8[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0) {
s32 index = battleStatus->unk_85 - 1;
if (battleStatus->actionResult < D_802A9A08_42EDA8[index]) {
if (battleStatus->actionQuality < D_802A9A08_42EDA8[index]) {
battleStatus->unk_85--;
}
}
} else {
if (battleStatus->actionResult >= D_802A9A20_42EDC0[battleStatus->unk_85]) {
if (battleStatus->actionQuality >= D_802A9A20_42EDC0[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0) {
s32 index = battleStatus->unk_85 - 1;
if (battleStatus->actionResult < D_802A9A20_42EDC0[index]) {
if (battleStatus->actionQuality < D_802A9A20_42EDC0[index]) {
battleStatus->unk_85--;
}
}
@ -251,9 +251,9 @@ void N(update)(void) {
mashMeterCutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
if (mashMeterCutoff < battleStatus->actionSuccess) {
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
} else {
battleStatus->unk_86 = -2;
battleStatus->actionResult = ACTION_RESULT_MINUS_2;
}
if (battleStatus->actionSuccess == 100) {

View File

@ -31,7 +31,7 @@ API_CALLABLE(N(init)) {
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->isBarFilled = FALSE;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
battleStatus->actionResult = ACTION_RESULT_FAIL;
actionCommandStatus->hudPrepareTime = 30;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
@ -192,7 +192,7 @@ void N(update)(void) {
}
battleStatus->actionSuccess = actionCommandStatus->barFillLevel / 100;
D_802A98C0 = battleStatus->curButtonsDown;
battleStatus->actionResult = actionCommandStatus->unk_5C;
battleStatus->actionQuality = actionCommandStatus->unk_5C;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionSuccess * 12);
@ -209,9 +209,9 @@ void N(update)(void) {
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
if (cutoff >= battleStatus->actionSuccess) {
battleStatus->unk_86 = -2;
battleStatus->actionResult = ACTION_RESULT_MINUS_2;
} else {
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
}
if (battleStatus->actionSuccess == 100) {

View File

@ -15,7 +15,7 @@ API_CALLABLE(N(init)) {
battleStatus->unk_82 = 100;
battleStatus->actionCmdDifficultyTable = actionCmdTableSpook;
battleStatus->unk_86 = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
@ -30,7 +30,7 @@ API_CALLABLE(N(init)) {
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->isBarFilled = FALSE;
battleStatus->actionSuccess = 0;
battleStatus->actionResult = 0;
battleStatus->actionQuality = 0;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
@ -99,7 +99,7 @@ void N(update)(void) {
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_StickMashLeft);
actionCommandStatus->barFillLevel = 0;
battleStatus->actionResult = 0;
battleStatus->actionQuality = 0;
actionCommandStatus->unk_5C = 0;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
sfx_play_sound_with_params(SOUND_LOOP_CHARGE_BAR, 0, 0, 0);
@ -173,8 +173,8 @@ void N(update)(void) {
hud_element_clear_flags(id, 2);
}
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionResult * 12);
battleStatus->actionQuality = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionQuality * 12);
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
@ -195,9 +195,9 @@ void N(update)(void) {
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
if (battleStatus->actionSuccess > cutoff) {
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
} else {
battleStatus->unk_86 = -2;
battleStatus->actionResult = ACTION_RESULT_MINUS_2;
}
if (battleStatus->actionSuccess == 100) {

View File

@ -26,7 +26,7 @@ API_CALLABLE(N(init)) {
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionResult = 0;
battleStatus->actionQuality = 0;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->unk_5C = 0;
actionCommandStatus->hudPosY = 80;
@ -65,7 +65,7 @@ API_CALLABLE(N(start)) {
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
battleStatus->actionResult = ACTION_RESULT_FAIL;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
func_80269118();
@ -151,8 +151,8 @@ void N(update)(void) {
}
}
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionResult * 12);
battleStatus->actionQuality = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionQuality * 12);
id = actionCommandStatus->hudElements[0];
if (temp < 80) {
if (hud_element_get_script(id) != &HES_AButtonDown) {
@ -172,14 +172,14 @@ void N(update)(void) {
if (actionCommandStatus->barFillLevel == 0) {
battleStatus->actionSuccess = -1;
} else {
battleStatus->actionSuccess = battleStatus->actionResult;
battleStatus->actionSuccess = battleStatus->actionQuality;
}
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
if (cutoff / 2 < battleStatus->actionResult) {
battleStatus->unk_86 = 1;
if (cutoff / 2 < battleStatus->actionQuality) {
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
} else {
battleStatus->unk_86 = -4;
battleStatus->actionResult = ACTION_RESULT_MINUS_4;
}
if (battleStatus->actionSuccess == 100) {

View File

@ -59,7 +59,7 @@ API_CALLABLE(N(start)) {
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
battleStatus->actionResult = ACTION_RESULT_FAIL;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
@ -117,8 +117,8 @@ void N(update)(void) {
actionCommandStatus->barFillLevel += battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] / 6;
actionCommandStatus->barFillLevel += rand_int((battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty]) / 6);
}
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
if (actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals] <= battleStatus->actionResult) {
battleStatus->actionQuality = actionCommandStatus->barFillLevel / 100;
if (actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals] <= battleStatus->actionQuality) {
actionCommandStatus->frameCounter = 0;
}
@ -136,7 +136,7 @@ void N(update)(void) {
break;
}
battleStatus->actionSuccess = 1;
battleStatus->unk_86 = 127;
battleStatus->actionResult = ACTION_RESULT_NONE;
action_command_free();
default:
break;

View File

@ -27,7 +27,7 @@ API_CALLABLE(N(init)) {
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionResult = 0;
battleStatus->actionQuality = 0;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
@ -68,8 +68,8 @@ API_CALLABLE(N(start)) {
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->actionResult = 0;
battleStatus->unk_86 = 0;
battleStatus->actionQuality = 0;
battleStatus->actionResult = ACTION_RESULT_FAIL;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
func_80269118();
@ -262,7 +262,7 @@ void N(update)(void) {
actionCommandStatus->barFillLevel = 10000;
}
actionCommandStatus->state = 11;
battleStatus->actionResult++;
battleStatus->actionQuality++;
sfx_play_sound(SOUND_APPROVE);
return;
}
@ -272,12 +272,12 @@ void N(update)(void) {
}
break;
case 13:
if (battleStatus->actionResult == 0) {
if (battleStatus->actionQuality == 0) {
battleStatus->actionSuccess = -1;
} else {
battleStatus->actionSuccess = battleStatus->actionResult;
battleStatus->actionSuccess = battleStatus->actionQuality;
}
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
if (battleStatus->actionSuccess >= 10) {
func_80269160();
}

View File

@ -130,7 +130,7 @@ API_CALLABLE(N(init)) {
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->targetWeakness = evt_get_variable(script, *args++);
battleStatus->actionResult = 1;
battleStatus->actionQuality = 1;
actionCommandStatus->hudPrepareTime = 30;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
@ -232,9 +232,9 @@ API_CALLABLE(N(start)) {
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionResult = 1;
battleStatus->actionQuality = 1;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
battleStatus->actionResult = ACTION_RESULT_FAIL;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
func_80269118();
@ -396,7 +396,7 @@ void N(update)(void) {
if (((battleStatus->pushInputBuffer[pos] & BUTTON_A) && !actionCommandStatus->wrongButtonPressed) ||
(actionCommandStatus->autoSucceed != 0)) {
actionCommandStatus->unk_5C = 1;
battleStatus->actionResult++;
battleStatus->actionQuality++;
break;
}
}
@ -471,7 +471,7 @@ void N(update)(void) {
if (((battleStatus->pushInputBuffer[pos] & BUTTON_A) && !actionCommandStatus->wrongButtonPressed) ||
(actionCommandStatus->autoSucceed != 0)) {
actionCommandStatus->unk_5C = 1;
battleStatus->actionResult++;
battleStatus->actionQuality++;
break;
}
}
@ -545,7 +545,7 @@ void N(update)(void) {
if (((battleStatus->pushInputBuffer[pos] & BUTTON_A) && !actionCommandStatus->wrongButtonPressed) ||
(actionCommandStatus->autoSucceed != 0)) {
actionCommandStatus->unk_5C = 1;
battleStatus->actionResult++;
battleStatus->actionQuality++;
break;
}
}
@ -578,12 +578,12 @@ void N(update)(void) {
actionCommandStatus->unk_5D--;
break;
case 16:
if (battleStatus->actionResult == 0) {
if (battleStatus->actionQuality == 0) {
battleStatus->actionSuccess = -1;
} else {
battleStatus->actionSuccess = battleStatus->actionResult;
battleStatus->actionSuccess = battleStatus->actionQuality;
}
battleStatus->unk_86 = 1;
battleStatus->actionResult = ACTION_RESULT_SUCCESS;
if (battleStatus->actionSuccess == 3) {
func_80269160();
}
@ -617,8 +617,8 @@ void N(draw)(void) {
hud_element_draw_clipped(actionCommandStatus->hudElements[13]);
hudElement = actionCommandStatus->hudElements[10];
if (hud_element_get_script(hudElement) != D_802AB180_42C670[battleStatus->actionResult]) {
hud_element_set_script(hudElement, D_802AB180_42C670[battleStatus->actionResult]);
if (hud_element_get_script(hudElement) != D_802AB180_42C670[battleStatus->actionQuality]) {
hud_element_set_script(hudElement, D_802AB180_42C670[battleStatus->actionQuality]);
}
hud_element_draw_clipped(hudElement);

View File

@ -83,9 +83,9 @@ API_CALLABLE(N(init)) {
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->barFillWidth = 0;
if (actionCommandStatus->targetWeakness == 0) {
battleStatus->actionResult = 0;
battleStatus->actionQuality = 0;
} else {
battleStatus->actionResult = 3;
battleStatus->actionQuality = 3;
}
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
@ -136,11 +136,11 @@ API_CALLABLE(N(start)) {
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
battleStatus->actionResult = ACTION_RESULT_FAIL;
if (actionCommandStatus->targetWeakness == 0) {
battleStatus->actionResult = 0;
battleStatus->actionQuality = 0;
} else {
battleStatus->actionResult = 3;
battleStatus->actionQuality = 3;
}
actionCommandStatus->state = 10;
gBattleStatus.flags1 &= ~BS_FLAGS1_8000;
@ -241,17 +241,17 @@ void N(update)(void) {
actionCommandStatus->barFillLevel = cutoff * 100;
}
if (!actionCommandStatus->targetWeakness) {
battleStatus->actionResult = actionCommandStatus->barFillLevel / 2000;
battleStatus->actionQuality = actionCommandStatus->barFillLevel / 2000;
} else {
battleStatus->actionResult = D_802AA8B4_425524[actionCommandStatus->barFillLevel / 1000];
battleStatus->actionQuality = D_802AA8B4_425524[actionCommandStatus->barFillLevel / 1000];
}
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
battleStatus->unk_86 = 127;
battleStatus->actionSuccess = battleStatus->actionResult;
battleStatus->actionResult = ACTION_RESULT_NONE;
battleStatus->actionSuccess = battleStatus->actionQuality;
btl_set_popup_duration(0);
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
@ -283,12 +283,12 @@ void N(draw)(void) {
hud_element_draw_clipped(actionCommandStatus->hudElements[3]);
id = actionCommandStatus->hudElements[2];
if (!actionCommandStatus->targetWeakness) {
if (D_802AA888_4254F8[battleStatus->actionResult] != hud_element_get_script(id)) {
hud_element_set_script(id, D_802AA888_4254F8[battleStatus->actionResult]);
if (D_802AA888_4254F8[battleStatus->actionQuality] != hud_element_get_script(id)) {
hud_element_set_script(id, D_802AA888_4254F8[battleStatus->actionQuality]);
}
} else {
if (D_802AA8A0_425510[battleStatus->actionResult] != hud_element_get_script(id)) {
hud_element_set_script(id, D_802AA8A0_425510[battleStatus->actionResult]);
if (D_802AA8A0_425510[battleStatus->actionQuality] != hud_element_get_script(id)) {
hud_element_set_script(id, D_802AA8A0_425510[battleStatus->actionQuality]);
}
}
hud_element_draw_clipped(id);

191
src/battle/actor_levels.h Normal file
View File

@ -0,0 +1,191 @@
#ifndef _ACTOR_LEVELS_H_
#define _ACTOR_LEVELS_H_
#define ACTOR_LEVEL_NONE 99
#define ACTOR_LEVEL_GOOMBA 5
#define ACTOR_LEVEL_PARAGOOMBA 6
#define ACTOR_LEVEL_SPIKED_GOOMBA 6
#define ACTOR_LEVEL_RED_GOOMBA_BOSS 20
#define ACTOR_LEVEL_BLUE_GOOMBA_BOSS 20
#define ACTOR_LEVEL_GOOMBA_KING 49
#define ACTOR_LEVEL_GOOMNUT_TREE 1
#define ACTOR_LEVEL_GOOMBARIO_TUTOR1 99
#define ACTOR_LEVEL_MAGIKOOPA_BOSS 32
#define ACTOR_LEVEL_FLYING_MAGIKOOPA_BOSS 32
#define ACTOR_LEVEL_KOOPA_TROOPA 6
#define ACTOR_LEVEL_PARATROOPA 6
#define ACTOR_LEVEL_FUZZY 6
#define ACTOR_LEVEL_BOB_OMB 6
#define ACTOR_LEVEL_BILL_BLASTER 10
#define ACTOR_LEVEL_BULLET_BILL 5
#define ACTOR_LEVEL_FAKE_BOWSER 0
#define ACTOR_LEVEL_RED_NINJAKOOPA 17
#define ACTOR_LEVEL_BLACK_NINJAKOOPA 17
#define ACTOR_LEVEL_GREEN_NINJAKOOPA 16
#define ACTOR_LEVEL_YELLOW_NINJAKOOPA 16
#define ACTOR_LEVEL_ELDSTAR 99
#define ACTOR_LEVEL_MONTY_MOLE 8
#define ACTOR_LEVEL_MONTY_HOLE 9
#define ACTOR_LEVEL_CLEFT 10
#define ACTOR_LEVEL_WHACKA 0
#define ACTOR_LEVEL_BUZZAR 35
#define ACTOR_LEVEL_BANDIT 9
#define ACTOR_LEVEL_POKEY 9
#define ACTOR_LEVEL_POKEY_MUMMY 10
#define ACTOR_LEVEL_BUZZY_BEETLE 10
#define ACTOR_LEVEL_SWOOPER 10
#define ACTOR_LEVEL_STONE_CHOMP 14
#define ACTOR_LEVEL_TUTANKOOPA 55
#define ACTOR_LEVEL_CHOMP 14
#define ACTOR_LEVEL_GLOOMBA 11
#define ACTOR_LEVEL_PARAGLOOMBA 11
#define ACTOR_LEVEL_SPIKED_GLOOMBA 12
#define ACTOR_LEVEL_DARK_KOOPA 18
#define ACTOR_LEVEL_DARK_PARATROOPA 18
#define ACTOR_LEVEL_BLOOPER_BABY 0
#define ACTOR_LEVEL_BLOOPER 44
#define ACTOR_LEVEL_ELECTRO_BLOOPER1 50
#define ACTOR_LEVEL_SUPER_BLOOPER1 65
#define ACTOR_LEVEL_FOREST_FUZZY 11
#define ACTOR_LEVEL_PIRANHA_PLANT 11
#define ACTOR_LEVEL_HYPER_GOOMBA 12
#define ACTOR_LEVEL_HYPER_PARAGOOMBA 12
#define ACTOR_LEVEL_HYPER_CLEFT 15
#define ACTOR_LEVEL_CLUBBA 13
#define ACTOR_LEVEL_TUBBA_BLUBBA_INVINCIBLE 70
#define ACTOR_LEVEL_TUBBA_BLUBBA 0
#define ACTOR_LEVEL_TUBBA_HEART 0
#define ACTOR_LEVEL_SHY_GUY 14
#define ACTOR_LEVEL_SKY_GUY 14
#define ACTOR_LEVEL_MEDI_GUY 14
#define ACTOR_LEVEL_GROOVE_GUY 15
#define ACTOR_LEVEL_PYRO_GUY 15
#define ACTOR_LEVEL_SPY_GUY 15
#define ACTOR_LEVEL_ANTI_GUY 42
#define ACTOR_LEVEL_SLOT_MACHINE_STOP 99
#define ACTOR_LEVEL_SLOT_MACHINE_START 99
#define ACTOR_LEVEL_BIG_LANTERN_GHOST 42
#define ACTOR_LEVEL_GENERAL_GUY 73
#define ACTOR_LEVEL_LIGHT_BULB 0
#define ACTOR_LEVEL_TOY_TANK 0
#define ACTOR_LEVEL_SHY_SQUAD 0
#define ACTOR_LEVEL_STILT_GUY 0
#define ACTOR_LEVEL_SHY_STACK 0
#define ACTOR_LEVEL_SIGNAL_GUY 0
#define ACTOR_LEVEL_SHY_SQUAD_DUP 0
#define ACTOR_LEVEL_SHY_GUY_DUP 0
#define ACTOR_LEVEL_FUZZIPEDE 43
#define ACTOR_LEVEL_JUNGLE_FUZZY 16
#define ACTOR_LEVEL_SPEAR_GUY 16
#define ACTOR_LEVEL_HURT_PLANT 16
#define ACTOR_LEVEL_M_BUSH 16
#define ACTOR_LEVEL_PUTRID_PIRANHA 17
#define ACTOR_LEVEL_LAVA_BUBBLE 17
#define ACTOR_LEVEL_SPIKE_TOP 17
#define ACTOR_LEVEL_LAVA_PIRANHA_PHASE_1 45
#define ACTOR_LEVEL_LAVA_BUD_PHASE_1 0
#define ACTOR_LEVEL_PETIT_PIRANHA_BOMB 0
#define ACTOR_LEVEL_PETIT_PIRANHA 0
#define ACTOR_LEVEL_BZZAP 19
#define ACTOR_LEVEL_CRAZEE_DAYZEE 19
#define ACTOR_LEVEL_AMAZY_DAYZEE 100
#define ACTOR_LEVEL_MONTY_MOLE_BOSS 19
#define ACTOR_LEVEL_RUFF_PUFF 19
#define ACTOR_LEVEL_LAKITU 20
#define ACTOR_LEVEL_SPINY 19
#define ACTOR_LEVEL_SPIKE 40
#define ACTOR_LEVEL_HUFF_N_PUFF 80
#define ACTOR_LEVEL_TUFF_PUFF 0
#define ACTOR_LEVEL_FROST_PIRANHA 22
#define ACTOR_LEVEL_GULPIT 22
#define ACTOR_LEVEL_GULPIT_ROCKS 0
#define ACTOR_LEVEL_MONSTAR 45
#define ACTOR_LEVEL_SWOOPULA 22
#define ACTOR_LEVEL_WHITE_CLUBBA 23
#define ACTOR_LEVEL_DUPLIGHOST 23
#define ACTOR_LEVEL_GHOST_GOOMBARIO 23
#define ACTOR_LEVEL_GHOST_KOOPER 23
#define ACTOR_LEVEL_GHOST_BOMBETTE 23
#define ACTOR_LEVEL_GHOST_PARAKARRY 23
#define ACTOR_LEVEL_GHOST_BOW 23
#define ACTOR_LEVEL_GHOST_WATT 23
#define ACTOR_LEVEL_GHOST_SUSHIE 23
#define ACTOR_LEVEL_GHOST_LAKILESTER 23
#define ACTOR_LEVEL_ALBINO_DINO 23
#define ACTOR_LEVEL_CRYSTAL_KING 85
#define ACTOR_LEVEL_CRYSTAL_BIT 0
#define ACTOR_LEVEL_CRYSTAL_CLONE 0
#define ACTOR_LEVEL_EMBER 24
#define ACTOR_LEVEL_KOOPATROL 25
#define ACTOR_LEVEL_BONY_BEETLE 25
#define ACTOR_LEVEL_HAMMER_BROS 27
#define ACTOR_LEVEL_BOMBSHELL_BLASTER 27
#define ACTOR_LEVEL_BOMBSHELL_BILL 24
#define ACTOR_LEVEL_DRY_BONES 30
#define ACTOR_LEVEL_MAGIKOOPA 26
#define ACTOR_LEVEL_FLYING_MAGIKOOPA 26
#define ACTOR_LEVEL_MAGICLONE 26
#define ACTOR_LEVEL_FLYING_MAGICLONE 26
#define ACTOR_LEVEL_WHITE_MAGIKOOPA 21
#define ACTOR_LEVEL_GRAY_MAGIKOOPA 21
#define ACTOR_LEVEL_RED_MAGIKOOPA 21
#define ACTOR_LEVEL_YELLOW_MAGIKOOPA 21
#define ACTOR_LEVEL_GREEN_MAGIKOOPA 21
#define ACTOR_LEVEL_FLYING_WHITE_MAGIKOOPA 21
#define ACTOR_LEVEL_FLYING_GRAY_MAGIKOOPA 21
#define ACTOR_LEVEL_FLYING_RED_MAGIKOOPA 21
#define ACTOR_LEVEL_FLYING_YELLOW_MAGIKOOPA 21
#define ACTOR_LEVEL_FLYING_GREEN_MAGIKOOPA 21
#define ACTOR_LEVEL_KAMMY_KOOPA 99
#define ACTOR_LEVEL_INTRO_BOWSER 0
#define ACTOR_LEVEL_BOWSER_PHASE_1 100
#define ACTOR_LEVEL_BOWSER_PHASE_2 0
#define ACTOR_LEVEL_BOWSER_PHASE_3 0
#define ACTOR_LEVEL_JR_TROOPA_1 41
#define ACTOR_LEVEL_JR_TROOPA_2 44
#define ACTOR_LEVEL_JR_TROOPA_3 52
#define ACTOR_LEVEL_JR_TROOPA_4 59
#define ACTOR_LEVEL_JR_TROOPA_5 65
#define ACTOR_LEVEL_JR_TROOPA_6 74
#define ACTOR_LEVEL_KENT_C_KOOPA 55
#define ACTOR_LEVEL_CHAN 0
#define ACTOR_LEVEL_LEE 0
#define ACTOR_LEVEL_LEE_GOOMBARIO 0
#define ACTOR_LEVEL_LEE_KOOPER 0
#define ACTOR_LEVEL_LEE_BOMBETTE 0
#define ACTOR_LEVEL_LEE_PARAKARRY 0
#define ACTOR_LEVEL_LEE_BOW 0
#define ACTOR_LEVEL_LEE_WATT 0
#define ACTOR_LEVEL_LEE_SUSHIE 0
#define ACTOR_LEVEL_LEE_LAKILESTER 0
#define ACTOR_LEVEL_THE_MASTER_1 0
#define ACTOR_LEVEL_THE_MASTER_2 0
#define ACTOR_LEVEL_THE_MASTER_3 0
#define ACTOR_LEVEL_GOOMBARIO 0
#define ACTOR_LEVEL_KOOPER 0
#define ACTOR_LEVEL_BOMBETTE 0
#define ACTOR_LEVEL_PARAKARRY 0
#define ACTOR_LEVEL_BOW 0
#define ACTOR_LEVEL_WATT 0
#define ACTOR_LEVEL_SUSHIE 0
#define ACTOR_LEVEL_LAKILESTER 0
#define ACTOR_LEVEL_TWINK 0
#endif _ACTOR_LEVELS_H_

View File

@ -3,10 +3,10 @@
#define NAMESPACE A(tubba_blubba)
extern EvtScript N(init_80225D98);
extern EvtScript N(takeTurn_802264AC);
extern EvtScript N(idle_80225F58);
extern EvtScript N(handleEvent_802260D0);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(80225E08);
extern EvtScript N(80226558);
extern EvtScript N(80226B88);
@ -16,7 +16,15 @@ enum N(ActorPartIDs) {
PRT_MAIN = 1,
};
s32 N(IdleAnimations_80225C40)[] = {
enum N(ActorVars) {
AVAR_Unk_8 = 8,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
s32 N(DefaultAnims)[] = {
STATUS_KEY_NORMAL, ANIM_BattleTubba_Anim01,
STATUS_KEY_STONE, ANIM_BattleTubba_Anim00,
STATUS_KEY_SLEEP, ANIM_BattleTubba_Anim18,
@ -30,12 +38,12 @@ s32 N(IdleAnimations_80225C40)[] = {
STATUS_END,
};
s32 N(DefenseTable_80225C94)[] = {
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(StatusTable_80225CA0)[] = {
s32 N(StatusTable)[] = {
STATUS_KEY_NORMAL, 0,
STATUS_KEY_DEFAULT, 0,
STATUS_KEY_SLEEP, 80,
@ -60,15 +68,15 @@ s32 N(StatusTable_80225CA0)[] = {
STATUS_END,
};
ActorPartBlueprint N(ActorParts_80225D4C)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -15, 75 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_80225C40),
.defenseTable = N(DefenseTable_80225C94),
.idleAnimations = N(DefaultAnims),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, -10 },
@ -78,12 +86,12 @@ ActorPartBlueprint N(ActorParts_80225D4C)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_TUBBA_BLUBBA_INVINCIBLE,
.level = 70,
.level = ACTOR_LEVEL_TUBBA_BLUBBA_INVINCIBLE,
.maxHP = 10,
.partCount = ARRAY_COUNT( N(ActorParts_80225D4C)),
.partsData = N(ActorParts_80225D4C),
.initScript = &N(init_80225D98),
.statusTable = N(StatusTable_80225CA0),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
.hurricaneChance = 0,
@ -98,11 +106,11 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 10, 75 },
};
EvtScript N(init_80225D98) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_802264AC)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_80225F58)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_802260D0)))
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_8, 0)
EVT_EXEC(N(80225E08))
EVT_RETURN
EVT_END
@ -136,7 +144,7 @@ EvtScript N(80225E08) = {
EVT_END
};
EvtScript N(idle_80225F58) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(0)
EVT_WAIT(1)
EVT_GOTO(0)
@ -145,7 +153,7 @@ EvtScript N(idle_80225F58) = {
};
EvtScript N(80225F8C) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_8, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_RETURN
EVT_END_IF
@ -171,9 +179,9 @@ EvtScript N(80225FD4) = {
EVT_END
};
EvtScript N(handleEvent_802260D0) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVarA)
EVT_SWITCH(LVarA)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
@ -241,22 +249,22 @@ EvtScript N(handleEvent_802260D0) = {
EVT_EXEC_WAIT(EVS_Enemy_Recover)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_802264AC) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(RandInt, 100, LVar0)
EVT_IF_LT(LVar0, 60)
EVT_EXEC_WAIT(N(80226558))
EVT_ELSE
EVT_EXEC_WAIT(N(80226B88))
EVT_END_IF
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END

View File

@ -5,10 +5,10 @@
#define NAMESPACE A(tubbas_heart)
extern EvtScript N(init_80223DA0);
extern EvtScript N(takeTurn_802245C8);
extern EvtScript N(idle_80223E98);
extern EvtScript N(handleEvent_80224038);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(80224414);
extern EvtScript N(802244DC);
extern EvtScript N(80224B3C);
@ -20,6 +20,19 @@ enum N(ActorPartIDs) {
PRT_2 = 2,
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_1 = 1,
AVAR_Unk_2 = 2,
AVAR_Unk_3 = 3,
AVAR_Unk_4 = 4,
AVAR_Unk_5 = 5,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
s32 N(IdleAnimations_80223BC0)[] = {
STATUS_KEY_NORMAL, ANIM_TubbasHeart_Anim01,
STATUS_KEY_STONE, ANIM_TubbasHeart_Anim00,
@ -50,12 +63,12 @@ s32 N(IdleAnimations_80223C1C)[] = {
STATUS_END,
};
s32 N(DefenseTable_80223C78)[] = {
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(StatusTable_80223C84)[] = {
s32 N(StatusTable)[] = {
STATUS_KEY_NORMAL, 0,
STATUS_KEY_DEFAULT, 0,
STATUS_KEY_SLEEP, 0,
@ -80,7 +93,7 @@ s32 N(StatusTable_80223C84)[] = {
STATUS_END,
};
ActorPartBlueprint N(ActorParts_80223D30)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_NO_TARGET,
.index = PRT_MAIN,
@ -88,7 +101,7 @@ ActorPartBlueprint N(ActorParts_80223D30)[] = {
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_80223BC0),
.defenseTable = N(DefenseTable_80223C78),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, -10 },
@ -100,7 +113,7 @@ ActorPartBlueprint N(ActorParts_80223D30)[] = {
.targetOffset = { 0, -30 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_80223BC0),
.defenseTable = N(DefenseTable_80223C78),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, -10 },
@ -110,12 +123,12 @@ ActorPartBlueprint N(ActorParts_80223D30)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_TUBBA_HEART,
.level = 0,
.level = ACTOR_LEVEL_TUBBA_HEART,
.maxHP = 50,
.partCount = ARRAY_COUNT( N(ActorParts_80223D30)),
.partsData = N(ActorParts_80223D30),
.initScript = &N(init_80223DA0),
.statusTable = N(StatusTable_80223C84),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
.hurricaneChance = 0,
@ -130,16 +143,16 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 10, 20 },
};
EvtScript N(init_80223DA0) = {
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 4, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 5, 0)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_802245C8)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_80223E98)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_80224038)))
EvtScript N(EVS_Init) = {
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_3, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_4, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_5, 0)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PRT_2, ACTOR_PART_TARGET_FLAG_2, TRUE)
EVT_RETURN
EVT_END
@ -162,11 +175,11 @@ API_CALLABLE(N(func_80218680_4FF0D0)) {
return ApiStatus_DONE2;
}
EvtScript N(idle_80223E98) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(0)
EVT_CALL(ActorExists, ACTOR_SELF, LVar0)
EVT_IF_NE(LVar0, FALSE)
EVT_CALL(GetActorVar, ACTOR_SELF, 4, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_4, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar4)
@ -188,7 +201,7 @@ EvtScript N(idle_80223E98) = {
EvtScript N(80223FD8) = {
EVT_SET(LVar1, 7077902)
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_1, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_SET(LVar1, 7077899)
EVT_END_IF
@ -196,7 +209,7 @@ EvtScript N(80223FD8) = {
EVT_END
};
EvtScript N(handleEvent_80224038) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
@ -234,7 +247,7 @@ EvtScript N(handleEvent_80224038) = {
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET(LVar1, 7077889)
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_1, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_SET(LVar1, 7077899)
EVT_END_IF
@ -304,18 +317,18 @@ EvtScript N(802244DC) = {
EVT_END
};
EvtScript N(takeTurn_802245C8) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_IF_NE(LVar0, HIT_RESULT_MISS)
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_2, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x00000001)
EVT_CALL(GetCurrentPartnerID, LVar0)
EVT_IF_EQ(LVar0, 9)
EVT_CALL(EnableBattleStatusBar, FALSE)
EVT_BITWISE_OR_CONST(LVar0, 0x3)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, LVar0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 40)
@ -333,9 +346,9 @@ EvtScript N(takeTurn_802245C8) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(MoveBattleCamOver, 30)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_3, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(EnableBattleStatusBar, TRUE)
EVT_END_IF
@ -345,12 +358,12 @@ EvtScript N(takeTurn_802245C8) = {
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_3, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_3, 1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 40)
@ -358,31 +371,31 @@ EvtScript N(takeTurn_802245C8) = {
EVT_CALL(ActorSpeak, MSG_CH3_00C5, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01)
EVT_END_IF
EVT_EXEC_WAIT(N(80225258))
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_2, LVar0)
EVT_IF_FLAG(LVar0, 0x00000002)
EVT_CALL(EnableBattleStatusBar, TRUE)
EVT_END_IF
EVT_CASE_EQ(1)
EVT_EXEC_WAIT(N(802255D8))
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_1, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar1)
EVT_ADD(LVar1, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 5, LVar1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar1)
EVT_IF_GE(LVar1, 2)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 2)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 2)
EVT_ELSE
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
EVT_END_IF
EVT_END_IF
EVT_CASE_EQ(2)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
EVT_EXEC_WAIT(N(80224B3C))
EVT_END_SWITCH
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_2, LVar0)
EVT_BITWISE_AND_CONST(LVar0, -3)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, LVar0)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -513,7 +526,7 @@ EvtScript N(80225258) = {
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 1)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar4)
EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_SHRINK)
@ -524,7 +537,7 @@ EvtScript N(80225258) = {
EVT_SETF(LVar3, EVT_FLOAT(0.4))
EVT_END_IF
EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 3, LVar0, LVar1, LVar2, LVar3, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 4, LVarF)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_4, LVarF)
EVT_CALL(EnableActorGlow, ACTOR_SELF, TRUE)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_80223C1C)))
EVT_RETURN
@ -559,14 +572,14 @@ EvtScript N(802255D8) = {
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE)
EVT_END_THREAD
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_1, LVar0)
EVT_SUB(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE)
EVT_CALL(GetActorVar, ACTOR_SELF, 4, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_4, LVar0)
EVT_CALL(RemoveEffect, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, 4, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_4, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_80223BC0)))
EVT_END_IF
EVT_CALL(PlaySound, SOUND_20F9)

View File

@ -4,10 +4,10 @@
#define NAMESPACE A(tubba_blubba)
extern EvtScript N(EVS_Init);
extern EvtScript N(takeTurn_80219750);
extern EvtScript N(idle_80219204);
extern EvtScript N(handleEvent_80219338);
extern EvtScript N(nextTurn_80218FB0);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_HandlePhase);
extern EvtScript N(80218E60);
extern EvtScript N(80219D88);
extern EvtScript N(8021A36C);
@ -16,6 +16,16 @@ enum N(ActorPartIDs) {
PRT_MAIN = 1,
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_1 = 1,
AVAR_Unk_2 = 2,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
s32 N(IdleAnims)[] = {
STATUS_KEY_NORMAL, ANIM_BattleTubba_Anim02,
STATUS_KEY_STONE, ANIM_BattleTubba_Anim00,
@ -79,7 +89,7 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_TUBBA_BLUBBA,
.level = 0,
.level = ACTOR_LEVEL_TUBBA_BLUBBA,
.maxHP = 10,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
@ -100,18 +110,18 @@ ActorBlueprint NAMESPACE = {
};
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_80219750)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_80219204)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_80219338)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn_80218FB0)))
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 0)
EVT_IF_GE(GB_StoryProgress, -30)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
EVT_ELSE
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1)
EVT_END_IF
EVT_EXEC_GET_TID(N(80218E60), LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, LVar0)
EVT_RETURN
EVT_END
};
@ -144,16 +154,16 @@ EvtScript N(80218E60) = {
EVT_END
};
EvtScript N(nextTurn_80218FB0) = {
EvtScript N(EVS_HandlePhase) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetBattlePhase, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(PHASE_PLAYER_BEGIN)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(EnableBattleStatusBar, FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 75)
@ -176,13 +186,13 @@ EvtScript N(nextTurn_80218FB0) = {
EVT_CALL(EnableBattleStatusBar, TRUE)
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(idle_80219204) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(0)
EVT_WAIT(1)
EVT_GOTO(0)
@ -203,17 +213,17 @@ EvtScript N(80219238) = {
};
EvtScript N(802192E0) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_1, LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 1)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_80219338) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
@ -288,15 +298,15 @@ EvtScript N(handleEvent_80219338) = {
EVT_EXEC_WAIT(EVS_Enemy_Recover)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_80219750) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_IF_EQ(LVar0, HIT_RESULT_MISS)
@ -339,17 +349,17 @@ EvtScript N(takeTurn_80219750) = {
EVT_SET(LVar0, 220)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_2, LVar0)
EVT_KILL_THREAD(LVar0)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_BATTLE_FLED, TRUE)
EVT_CALL(SetEndBattleFadeOutRate, 10)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_1, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(EnableBattleStatusBar, FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 2)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 75)
@ -379,7 +389,7 @@ EvtScript N(takeTurn_80219750) = {
EVT_ELSE
EVT_EXEC_WAIT(N(8021A36C))
EVT_END_IF
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END

View File

@ -3,11 +3,11 @@
#define NAMESPACE A(tubba_blubba)
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(handleEvent);
extern EvtScript N(nextTurn);
extern EvtScript N(idle);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_HandlePhase);
extern EvtScript N(EVS_Idle);
extern EvtScript N(shakeCam);
extern EvtScript N(attackBodyCrush);
@ -15,6 +15,16 @@ enum N(ActorPartIDs) {
PRT_MAIN = 1,
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_1 = 1,
AVAR_Unk_2 = 2,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
s32 N(IdleAnimations)[] = {
STATUS_KEY_NORMAL, ANIM_BattleTubba_Anim02,
STATUS_KEY_STONE, ANIM_BattleTubba_Anim00,
@ -78,11 +88,11 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_TUBBA_BLUBBA_INVINCIBLE,
.level = 70,
.level = ACTOR_LEVEL_TUBBA_BLUBBA_INVINCIBLE,
.maxHP = 10,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
@ -98,15 +108,15 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 10, 75 },
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn)))
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
EVT_EXEC_GET_TID(N(shakeCam), LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, LVar0)
EVT_RETURN
EVT_END
};
@ -138,22 +148,22 @@ EvtScript N(shakeCam) = {
EVT_END
};
EvtScript N(nextTurn) = {
EvtScript N(EVS_HandlePhase) = {
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_RETURN
EVT_END
};
EvtScript N(returnHome) = {
EvtScript N(EVS_ReturnHome) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
@ -165,9 +175,9 @@ EvtScript N(returnHome) = {
EVT_END
};
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_IF_EQ(LVar0, HIT_RESULT_MISS)
@ -210,17 +220,17 @@ EvtScript N(takeTurn) = {
EVT_SET(LVar0, 220)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_2, LVar0)
EVT_KILL_THREAD(LVar0)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_BATTLE_FLED, TRUE)
EVT_CALL(SetEndBattleFadeOutRate, 10)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_1, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(EnableBattleStatusBar, FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 2)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 2)
EVT_CALL(ActorSpeak, MSG_CH3_0103, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim09, ANIM_BattleTubba_Anim02)
EVT_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim15)
@ -236,7 +246,7 @@ EvtScript N(takeTurn) = {
EVT_CALL(EnableBattleStatusBar, TRUE)
EVT_END_IF
EVT_EXEC_WAIT(N(attackBodyCrush))
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -283,10 +293,10 @@ EvtScript N(attackFistDrop) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 20)
EVT_IF_EQ(LVarA, 5)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
@ -307,14 +317,14 @@ EvtScript N(attackFistDrop) = {
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(10)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_WAIT(30)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02)
EVT_IF_EQ(LVarF, 10)
EVT_RETURN
EVT_END_IF
EVT_CALL(YieldTurn)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_RETURN
@ -372,7 +382,7 @@ EvtScript N(attackBodyCrush) = {
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0)
EVT_IF_EQ(LVarA, 5)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
@ -380,7 +390,7 @@ EvtScript N(attackBodyCrush) = {
EVT_WAIT(8)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim13)
EVT_WAIT(4)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
@ -408,7 +418,7 @@ EvtScript N(attackBodyCrush) = {
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(10)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5)
EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK)
EVT_GOTO(1)
@ -475,7 +485,7 @@ EvtScript N(attackBodyCrush) = {
EVT_RETURN
EVT_END_IF
EVT_CALL(YieldTurn)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_RETURN

View File

@ -15,6 +15,21 @@ enum N(ActorPartIDs) {
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_1 = 1,
AVAR_Unk_2 = 2,
AVAR_Unk_3 = 3,
AVAR_Unk_4 = 4,
AVAR_Unk_5 = 5,
AVAR_Unk_6 = 6,
AVAR_Unk_7 = 7,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
enum N(OldActorVars) {
N(VAR_FLAGS) = 0,
N(VAR_TURN_NUMBER) = 1,
N(VAR_TUFF_PUFF_BIT_ARRAY) = 2,
@ -39,10 +54,10 @@ enum N(Flags) {
extern ActorBlueprint A(tuff_puff);
extern EvtScript N(EVS_Init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
extern EvtScript N(nextTurn);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_HandlePhase);
extern EvtScript N(attackDirectLightning);
extern EvtScript N(normalAction);
extern EvtScript N(electricCharge);
@ -399,9 +414,9 @@ ActorPartBlueprint N(ActorParts)[] = {
};
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING | ACTOR_FLAG_8000,
.flags = ACTOR_FLAG_FLYING | ACTOR_FLAG_HALF_HEIGHT,
.type = ACTOR_TYPE_HUFF_N_PUFF,
.level = 80,
.level = ACTOR_LEVEL_HUFF_N_PUFF,
.maxHP = 60,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
@ -422,10 +437,10 @@ ActorBlueprint NAMESPACE = {
};
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(SetActorVar, ACTOR_ENEMY0, N(VAR_FLAGS), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURN_NUMBER), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TUFF_PUFF_BIT_ARRAY), 0)
@ -509,7 +524,7 @@ EvtScript N(updateCharged) = {
EVT_END
};
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_SET(LVarF, 0)
EVT_LOOP(0)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_COMBO_COUNTER), LVarA)
@ -610,10 +625,10 @@ EvtScript N(spawnTuffPuff) = {
EVT_IF_GT(LVarA, 0)
EVT_SUB(LVarA, 1)
EVT_CALL(SummonEnemy, EVT_PTR(N(formation_tuff_puff_large)), FALSE)
EVT_CALL(SetActorVar, LVar0, 5, 2)
EVT_CALL(SetActorVar, LVar0, AVAR_Unk_5, 2)
EVT_ELSE
EVT_CALL(SummonEnemy, EVT_PTR(N(formation_tuff_puff_small)), FALSE)
EVT_CALL(SetActorVar, LVar0, 5, 1)
EVT_CALL(SetActorVar, LVar0, AVAR_Unk_5, 1)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_TUFF_PUFF_BIT_ARRAY), LVar1)
EVT_CALL(FindPlaceForTuffPuff, LVar1, LVar2)
@ -678,7 +693,7 @@ EvtScript N(spawnTuffPuff) = {
EVT_IF_NE(LVar2, -1)
EVT_CALL(CopyStatusEffects, ACTOR_SELF, LVar0)
EVT_CALL(CopyBuffs, ACTOR_SELF, LVar0)
EVT_CALL(SetActorVar, LVar0, 1, LVar2)
EVT_CALL(SetActorVar, LVar0, AVAR_Unk_1, LVar2)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_CALL(SetActorPos, LVar0, LVar3, LVar4, LVar5)
EVT_ADD(LVar3, -5)
@ -969,7 +984,7 @@ EvtScript N(OnDamaged) = {
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
@ -1074,7 +1089,7 @@ EvtScript N(Speak1) = {
EVT_CALL(MoveBattleCamOver, 30)
EVT_WAIT(30)
EVT_CALL(UseIdleAnimation, LVar0, FALSE)
EVT_CALL(GetActorVar, LVar0, 0, LVar1)
EVT_CALL(GetActorVar, LVar0, AVAR_Unk_0, LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_CALL(SetAnimation, LVar0, 1, ANIM_RuffPuff_Anim09)
EVT_CALL(ActorSpeak, MSG_CH6_00CF, LVar0, 1, ANIM_RuffPuff_Anim14, ANIM_RuffPuff_Anim02)
@ -1176,7 +1191,7 @@ EvtScript N(Speak2) = {
EVT_END_LOOP
EVT_END_IF
EVT_CALL(UseIdleAnimation, LVar0, FALSE)
EVT_CALL(GetActorVar, LVar0, 0, LVar1)
EVT_CALL(GetActorVar, LVar0, AVAR_Unk_0, LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_CALL(SetAnimation, LVar0, 1, ANIM_RuffPuff_Anim09)
EVT_CALL(ActorSpeak, MSG_CH6_00D2, LVar0, 1, ANIM_RuffPuff_Anim14, ANIM_RuffPuff_Anim02)
@ -1274,7 +1289,7 @@ EvtScript N(Speak3) = {
EVT_END_LOOP
EVT_END_IF
EVT_CALL(UseIdleAnimation, LVar0, FALSE)
EVT_CALL(GetActorVar, LVar0, 0, LVar1)
EVT_CALL(GetActorVar, LVar0, AVAR_Unk_0, LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_CALL(ActorSpeak, MSG_CH6_00D4, LVar0, 1, ANIM_RuffPuff_Anim14, ANIM_RuffPuff_Anim02)
EVT_ELSE
@ -1361,7 +1376,7 @@ EvtScript N(Speak4) = {
EVT_CALL(MoveBattleCamOver, 30)
EVT_WAIT(30)
EVT_CALL(UseIdleAnimation, LVar0, FALSE)
EVT_CALL(GetActorVar, LVar0, 0, LVar1)
EVT_CALL(GetActorVar, LVar0, AVAR_Unk_0, LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_CALL(ActorSpeak, MSG_CH6_00D6, LVar0, 1, ANIM_RuffPuff_Anim14, ANIM_RuffPuff_Anim02)
EVT_ELSE
@ -1387,7 +1402,7 @@ EvtScript N(Speak4) = {
EVT_END
};
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_TURN_NUMBER), LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(4)
@ -1482,7 +1497,7 @@ EvtScript N(takeTurn) = {
EVT_END
};
EvtScript N(nextTurn) = {
EvtScript N(EVS_HandlePhase) = {
EVT_CALL(GetBattlePhase, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(PHASE_PLAYER_BEGIN)
@ -1648,10 +1663,10 @@ EvtScript N(inhaleOne) = {
EVT_ADD(LVar7, 0)
EVT_CALL(MakeSuctionPath, LVar1, LVar2, LVar3, LVar4, LVar5, LVar6, LVar7)
EVT_THREAD
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, 1)
EVT_WAIT(10)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 2)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, 2)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_RuffPuff_Anim12)
EVT_ELSE
@ -2114,7 +2129,7 @@ EvtScript N(attackWindBreath) = {
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(GetActionResult, LVar1)
EVT_CALL(GetActionQuality, LVar1)
EVT_ELSE
EVT_THREAD
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_SCALE_X), LVar2)
@ -2296,7 +2311,7 @@ EvtScript N(attackGroundLightning) = {
EVT_END_IF
EVT_END_THREAD
EVT_CALL(StopSound, SOUND_CHARGE_LIGHTNING)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_03D3)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_LIGHTNING_BLAST)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar2, 10)
EVT_SET(LVar3, LVar0)
@ -3959,9 +3974,9 @@ EvtScript N(tuffPuffMoveToPlayer) = {
EVT_CALL(SetOwnerID, LVar1)
EVT_CALL(RandInt, 1000, LVar0)
EVT_IF_LT(LVar0, 500)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, 1)
EVT_ELSE
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 2)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, 2)
EVT_END_IF
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)

View File

@ -5,10 +5,10 @@
extern s32 N(IdleAnimations)[];
extern s32 N(IdleAnimations2)[];
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_HandleEvent);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
@ -16,6 +16,14 @@ enum N(ActorPartIDs) {
PRT_3 = 3,
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_SMASH, 0,
@ -90,11 +98,11 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_MONTY_MOLE_BOSS,
.level = 19,
.level = ACTOR_LEVEL_MONTY_MOLE_BOSS,
.maxHP = 12,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 50,
.airLiftChance = 55,
@ -154,7 +162,7 @@ ActorPartBlueprint N(ActorParts_hole)[] = {
};
EvtScript N(init_hole) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_END_IF
@ -165,7 +173,7 @@ EvtScript N(init_hole) = {
ActorBlueprint N(hole) = {
.flags = ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_HEALTH_BAR | ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_NO_DMG_APPLY,
.type = ACTOR_TYPE_MONTY_HOLE,
.level = 9,
.level = ACTOR_LEVEL_MONTY_HOLE,
.maxHP = 5,
.partCount = ARRAY_COUNT(N(ActorParts_hole)),
.partsData = N(ActorParts_hole),
@ -209,23 +217,23 @@ EvtScript N(onDeath) = {
EVT_END
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetLastElement, LVarE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
@ -345,15 +353,15 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(N(onDeath))
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetBattlePhase, LVar0)
@ -380,7 +388,7 @@ EvtScript N(takeTurn) = {
EVT_CALL(SetPartScale, ACTOR_SELF, PRT_3, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_END_IF
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_3, SOUND_MOLE_THROW)
EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_3, ACTOR_SOUND_FLY, 0, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_3, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
@ -400,7 +408,7 @@ EvtScript N(takeTurn) = {
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(YieldTurn)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
@ -429,7 +437,7 @@ EvtScript N(takeTurn) = {
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_3, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END

View File

@ -3,10 +3,10 @@
#define NAMESPACE A(spike)
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_HandleEvent);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
@ -91,11 +91,11 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_SPIKE,
.level = 40,
.level = ACTOR_LEVEL_SPIKE,
.maxHP = 50,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
@ -111,20 +111,20 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 6, 32 },
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_RETURN
EVT_END
};
EvtScript N(returnHome) = {
EvtScript N(EVS_ReturnHome) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0))
@ -134,9 +134,9 @@ EvtScript N(returnHome) = {
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
@ -178,7 +178,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_JumpBack)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt)
@ -207,7 +207,7 @@ EvtScript N(handleEvent) = {
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, PRT_MAIN)
@ -230,7 +230,7 @@ EvtScript N(handleEvent) = {
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -238,7 +238,7 @@ EvtScript N(handleEvent) = {
EvtScript N(attack) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
@ -312,7 +312,7 @@ EvtScript N(attack) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_ThrowSpiny)
EVT_WAIT(3)
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_2, SOUND_LAKILESTER_THROW_SPINY)
EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_2, ACTOR_SOUND_JUMP, 0, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_2, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
@ -340,10 +340,10 @@ EvtScript N(attack) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
@ -367,16 +367,16 @@ EvtScript N(attack) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_WAIT(15)
EVT_CALL(YieldTurn)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_EXEC_WAIT(N(attack))
EVT_RETURN
EVT_END

View File

@ -3,18 +3,30 @@
#define NAMESPACE A(tuff_puff)
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
extern EvtScript N(nextTurn);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_HandlePhase);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
PRT_2 = 2,
};
enum N(actorVars) {
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_1 = 1,
AVAR_Unk_2 = 2,
AVAR_Unk_3 = 3,
AVAR_Unk_4 = 4,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
enum N(OldActorVars) {
N(VAR_IS_BIG) = 0,
N(VAR_INDEX) = 1,
N(VAR_2) = 2,
@ -114,13 +126,13 @@ ActorPartBlueprint N(ActorParts)[] = {
};
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING | ACTOR_FLAG_8000 | ACTOR_FLAG_NO_ATTACK,
.flags = ACTOR_FLAG_FLYING | ACTOR_FLAG_HALF_HEIGHT | ACTOR_FLAG_NO_ATTACK,
.type = ACTOR_TYPE_TUFF_PUFF,
.level = 0,
.level = ACTOR_LEVEL_TUFF_PUFF,
.maxHP = 1,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
@ -136,11 +148,11 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 10, 10 },
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn)))
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9)
@ -168,14 +180,14 @@ EvtScript N(init) = {
EVT_END
};
EvtScript N(nextTurn) = {
EvtScript N(EVS_HandlePhase) = {
EVT_RETURN
EVT_END
};
#include "common/CosInterpMinMax.inc.c"
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_SET(LVarF, 0)
EVT_LOOP(0)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_2), LVarA)
@ -215,7 +227,7 @@ EvtScript N(onDeath) = {
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_INDEX), LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 2, LVar1)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, AVAR_Unk_2, LVar1)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_BITWISE_AND_CONST(LVar1, ~0x1)
@ -238,12 +250,12 @@ EvtScript N(onDeath) = {
EVT_CASE_EQ(9)
EVT_BITWISE_AND_CONST(LVar1, ~0x200)
EVT_END_SWITCH
EVT_CALL(SetActorVar, ACTOR_ENEMY0, 2, LVar1)
EVT_CALL(SetActorVar, ACTOR_ENEMY0, AVAR_Unk_2, LVar1)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
@ -387,10 +399,10 @@ EvtScript N(handleEvent) = {
EVT_END
};
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END

View File

@ -1,16 +1,26 @@
#include "../area.h"
#include "battle/action_cmd/jump.h"
#include "battle/action_cmd.h"
#include "battle/action_cmd/jump.h"
#include "sprite/npc/BattleGoombario.h"
#include "sprite/npc/Twink.h"
#define NAMESPACE A(goombario_tutor)
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_ManageTutorial);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
PRT_MAIN = 1,
};
s32 N(IdleAnimations_80219010)[] = {
enum N(ActorVars) {
AVAR_FirstTurn = 0,
};
s32 N(DefaultAnims)[] = {
STATUS_KEY_NORMAL, ANIM_BattleGoombario_Idle,
STATUS_KEY_STONE, ANIM_BattleGoombario_Still,
STATUS_KEY_SLEEP, ANIM_BattleGoombario_Still,
@ -23,12 +33,12 @@ s32 N(IdleAnimations_80219010)[] = {
STATUS_END,
};
s32 N(DefenseTable_8021905C)[] = {
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(StatusTable_80219068)[] = {
s32 N(StatusTable)[] = {
STATUS_KEY_NORMAL, 0,
STATUS_KEY_DEFAULT, 0,
STATUS_KEY_SLEEP, 0,
@ -60,25 +70,23 @@ ActorPartBlueprint N(ActorParts)[] = {
.posOffset = { 0, 0, 0 },
.targetOffset = { -4, 24 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_80219010),
.defenseTable = N(DefenseTable_8021905C),
.idleAnimations = N(DefaultAnims),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, 0 },
},
};
extern EvtScript N(init_80219160);
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_NO_HEALTH_BAR,
.type = ACTOR_TYPE_GOOMBARIO_TUTOR1,
.level = 99,
.level = ACTOR_LEVEL_GOOMBARIO_TUTOR1,
.maxHP = 99,
.partCount = ARRAY_COUNT( N(ActorParts)),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init_80219160),
.statusTable = N(StatusTable_80219068),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
.hurricaneChance = 0,
@ -93,35 +101,30 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 10, 20 },
};
extern EvtScript N(takeTurn_80219444);
extern EvtScript N(idle_802191D0);
extern EvtScript N(handleEvent_802191E0);
extern EvtScript N(80219C74);
EvtScript N(init_80219160) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_80219444)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_802191D0)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_802191E0)))
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_EXEC(N(80219C74))
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FirstTurn, TRUE)
EVT_EXEC(N(EVS_ManageTutorial))
EVT_RETURN
EVT_END
};
EvtScript N(idle_802191D0) = {
EvtScript N(EVS_Idle) = {
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_802191E0) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_THREAD
EVT_CALL(FreezeBattleState, TRUE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(10)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CASE_EQ(EVENT_HIT)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FirstTurn, LVar0)
EVT_IF_EQ(LVar0, FALSE)
EVT_CALL(RandInt, 2, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
@ -136,19 +139,19 @@ EvtScript N(handleEvent_802191E0) = {
EVT_END_THREAD
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(9)
EVT_CASE_OR_EQ(10)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(23)
EVT_CASE_OR_EQ(25)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_BattleGoombario_Idle)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(48)
EVT_CASE_EQ(EVENT_30)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
@ -160,9 +163,9 @@ EvtScript N(handleEvent_802191E0) = {
EVT_END
};
EvtScript N(takeTurn_80219444) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
EVT_CALL(SetBattleCamZoom, 400)
@ -227,8 +230,8 @@ EvtScript N(takeTurn_80219444) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FirstTurn, LVar0)
EVT_IF_EQ(LVar0, TRUE)
EVT_CALL(SetDamageSource, DMG_SRC_TUTORIAL_GOOMBARIO)
EVT_END_IF
EVT_WAIT(2)
@ -238,7 +241,7 @@ EvtScript N(takeTurn_80219444) = {
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(10)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
@ -272,26 +275,26 @@ EvtScript N(takeTurn_80219444) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
API_CALLABLE(func_80218000_47F0B0) {
API_CALLABLE(N(SetPartnerGoombario)) {
PlayerData* playerData = &gPlayerData;
playerData->curPartner = PARTNER_GOOMBARIO;
return ApiStatus_DONE2;
}
EvtScript N(80219C74) = {
EvtScript N(EVS_ManageTutorial) = {
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_TUTORIAL_BATTLE, TRUE)
EVT_CALL(EnableBattleStatusBar, FALSE)
EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MENU)
EVT_WAIT(15)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_PARTNER, 0)
EVT_CALL(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0))
EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
@ -331,6 +334,7 @@ EvtScript N(80219C74) = {
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
// 'Press [A] at exactly this moment.'
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, MSG_HOS_001B, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly)
EVT_LOOP(0)
@ -354,6 +358,7 @@ EvtScript N(80219C74) = {
EVT_CALL(WaitForState, BATTLE_STATE_BEGIN_PARTNER_TURN)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_WAIT(15)
// 'When you see "Nice" appear ...'
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, MSG_HOS_001D, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
@ -451,7 +456,7 @@ EvtScript N(80219C74) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(0)
EVT_CALL(GetActionResult, LVar0)
EVT_CALL(GetActionQuality, LVar0)
EVT_IF_EQ(LVar0, 3)
EVT_BREAK_LOOP
EVT_END_IF
@ -488,26 +493,26 @@ EvtScript N(80219C74) = {
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, MSG_HOS_0028, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FirstTurn, FALSE)
EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_200, FALSE)
EVT_LABEL(10)
EVT_CALL(SetBattleMenuEnabledFlags, BTL_MENU_ENABLED_JUMP | BTL_MENU_ENABLED_SMASH | BTL_MENU_ENABLED_STRATEGIES)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MOVE)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar0, 7)
EVT_IF_EQ(LVar0, BTL_MENU_TYPE_STRATEGIES)
EVT_GOTO(99)
EVT_END_IF
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED)
EVT_CALL(WaitForState, BATTLE_STATE_BEGIN_PARTNER_TURN)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(func_80269524, LVar0)
EVT_CALL(GetActionResult, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(-1)
EVT_CASE_EQ(ACTION_RESULT_EARLY)
EVT_CALL(ActorSpeak, MSG_HOS_002A, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly)
EVT_CASE_EQ(0)
EVT_CASE_EQ(ACTION_RESULT_FAIL)
EVT_CALL(ActorSpeak, MSG_HOS_002B, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly)
EVT_CASE_EQ(1)
EVT_CASE_EQ(ACTION_RESULT_SUCCESS)
EVT_CALL(ActorSpeak, MSG_HOS_0029, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly)
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
@ -518,11 +523,11 @@ EvtScript N(80219C74) = {
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(GetBlockResult, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(-1)
EVT_CASE_EQ(BLOCK_RESULT_EARLY)
EVT_CALL(ActorSpeak, MSG_HOS_002A, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly)
EVT_CASE_EQ(0)
EVT_CASE_EQ(BLOCK_RESULT_FAIL)
EVT_CALL(ActorSpeak, MSG_HOS_002B, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly)
EVT_CASE_EQ(1)
EVT_CASE_EQ(BLOCK_RESULT_SUCCESS)
EVT_CALL(ActorSpeak, MSG_HOS_0029, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly)
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
@ -534,7 +539,7 @@ EvtScript N(80219C74) = {
EVT_LABEL(100)
EVT_CALL(WaitForState, BATTLE_STATE_0)
EVT_CALL(SetBattleState, BATTLE_STATE_END_TRAINING_BATTLE)
EVT_CALL(func_80218000_47F0B0)
EVT_CALL(N(SetPartnerGoombario))
EVT_WAIT(10000)
EVT_RETURN
EVT_END

View File

@ -10,6 +10,25 @@ enum N(ActorPartIDs) {
PRT_3 = 3,
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_1 = 1,
AVAR_Unk_2 = 2,
AVAR_Unk_3 = 3,
AVAR_Unk_4 = 4,
AVAR_Unk_5 = 5,
AVAR_Unk_6 = 6,
AVAR_Unk_7 = 7,
AVAR_Unk_8 = 8,
AVAR_Unk_9 = 9,
AVAR_Unk_A = 10,
AVAR_Unk_B = 11,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
@ -134,7 +153,7 @@ extern EvtScript N(init_8021E100);
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_MAGIKOOPA_BOSS,
.level = 32,
.level = ACTOR_LEVEL_MAGIKOOPA_BOSS,
.maxHP = 8,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
@ -159,7 +178,7 @@ extern EvtScript N(init_8021E2C0);
ActorBlueprint N(flying) = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_FLYING_MAGIKOOPA_BOSS,
.level = 32,
.level = ACTOR_LEVEL_FLYING_MAGIKOOPA_BOSS,
.maxHP = 8,
.partCount = ARRAY_COUNT(N(ActorParts_flying)),
.partsData = N(ActorParts_flying),
@ -210,7 +229,7 @@ s32 N(IdleAnimations_broomstick)[] = {
STATUS_END,
};
EvtScript N(idle_8021D774) = {
EvtScript N(EVS_Idle) = {
EVT_RETURN
EVT_END
};
@ -223,7 +242,7 @@ EvtScript N(8021D784) = {
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_PARTNER_ACTING)
EVT_IF_FLAG(LVar0, BS_FLAGS1_200 | BS_FLAGS1_40)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, 1)
EVT_END_IF
EVT_ELSE
EVT_CALL(N(GetSelectedMoveID), LVar0)
@ -234,7 +253,7 @@ EvtScript N(8021D784) = {
EVT_CASE_OR_EQ(MOVE_MULTIBONK)
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_FLAG(LVar0, BS_FLAGS1_200 | BS_FLAGS1_40)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, 1)
EVT_END_IF
EVT_END_CASE_GROUP
EVT_END_SWITCH
@ -250,7 +269,7 @@ EvtScript N(8021D784) = {
extern EvtScript N(handleEvent_8021E6D8);
EvtScript N(8021D890) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_2, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Magikoopa_Anim04)
EVT_GOTO(0)
@ -272,11 +291,11 @@ EvtScript N(8021D890) = {
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, ACTOR_PART_FLAG_MULTI_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_3, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_3, 1, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_3, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar2, 1)
EVT_CALL(SetPartPos, ACTOR_SELF, PRT_3, LVar0, LVar1, LVar2)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0301)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
@ -299,12 +318,12 @@ EvtScript N(8021D890) = {
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_LOOP(20)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_3, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_3, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_3, 1, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_3, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_3, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_3, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Magikoopa_Anim01)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE)
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021E6D8)))
@ -327,7 +346,7 @@ EvtScript N(8021D890) = {
EvtScript N(runAway) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(HideHealthBar, ACTOR_SELF)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_IF_NE(LVar0, 57)
@ -344,7 +363,7 @@ EvtScript N(runAway) = {
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_WAIT(10)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(EnableActorBlur, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
@ -359,10 +378,10 @@ EvtScript N(runAway) = {
EVT_END
};
EvtScript N(nextTurn_8021E0B0) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EvtScript N(EVS_HandlePhase) = {
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_BITWISE_AND_CONST(LVar0, -2) // TODO
EVT_CALL(SetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_RETURN
EVT_END
};
@ -370,26 +389,26 @@ EvtScript N(nextTurn_8021E0B0) = {
extern EvtScript N(takeTurn_80223B24);
EvtScript N(init_8021E100) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021D774)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_80223B24)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021E6D8)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn_8021E0B0)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(GetBattleVar, 2, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetBattleVar, 2, -1)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 4, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 5, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 6, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 7, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 9, -1)
EVT_CALL(SetActorVar, ACTOR_SELF, 10, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 11, -1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_3, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_4, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_5, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_6, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_7, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_8, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_9, -1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_A, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, -1)
EVT_RETURN
EVT_END
};
@ -397,40 +416,40 @@ EvtScript N(init_8021E100) = {
extern EvtScript N(handleEvent_8021EDF0);
EvtScript N(init_8021E2C0) = {
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021D774)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_80223B24)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021EDF0)))
EVT_CALL(GetBattleVar, 2, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetBattleVar, 2, -1)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 4, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 5, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 6, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 7, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 9, -1)
EVT_CALL(SetActorVar, ACTOR_SELF, 10, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 11, -1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_3, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_4, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_5, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_6, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_7, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_8, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_9, -1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_A, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, -1)
EVT_RETURN
EVT_END
};
EvtScript N(8021E46C) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_1, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 9, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_9, LVar0)
EVT_CALL(ActorExists, LVar0, LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_RETURN
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 10, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_A, 0)
EVT_CALL(GetLastElement, LVarA)
EVT_IF_FLAG(LVarA, DAMAGE_TYPE_MULTIPLE_POPUPS)
EVT_LABEL(0)
@ -440,8 +459,8 @@ EvtScript N(8021E46C) = {
EVT_GOTO(0)
EVT_END_IF
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 9, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, 9, -1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_9, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_9, -1)
EVT_CALL(GetActorFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, ACTOR_FLAG_FLYING)
EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_2, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
@ -463,31 +482,31 @@ EvtScript N(8021E46C) = {
EvtScript N(handleEvent_8021E6D8) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(9)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_BITWISE_OR_CONST(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_CASE_OR_EQ(10)
EVT_CASE_OR_EQ(61)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_CASE_OR_EQ(EVENT_UP_AND_AWAY)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_EXEC_WAIT(N(8021E46C))
EVT_END_CASE_GROUP
EVT_CASE_EQ(14)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim05)
EVT_SET_CONST(LVar2, ANIM_Magikoopa_Anim06)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_EXEC_WAIT(N(8021E46C))
EVT_CASE_EQ(36)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim05)
EVT_SET_CONST(LVar2, ANIM_Magikoopa_Anim06)
@ -497,12 +516,12 @@ EvtScript N(handleEvent_8021E6D8) = {
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim06)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(11)
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_EXEC_WAIT(N(8021E46C))
EVT_CASE_EQ(33)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
@ -511,15 +530,15 @@ EvtScript N(handleEvent_8021E6D8) = {
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(23)
EVT_CASE_EQ(EVENT_ZERO_DAMAGE)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim01)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_CASE_EQ(25)
EVT_CASE_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim01)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_FLAG(LVar0, 1)
EVT_EXEC_WAIT(N(8021E46C))
EVT_RETURN
@ -528,7 +547,7 @@ EvtScript N(handleEvent_8021E6D8) = {
EVT_IF_NE(LVar0, 0)
EVT_EXEC_WAIT(N(8021E46C))
EVT_END_IF
EVT_CASE_EQ(32)
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
@ -538,11 +557,11 @@ EvtScript N(handleEvent_8021E6D8) = {
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(49)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim01)
EVT_EXEC_WAIT(EVS_Enemy_Recover)
EVT_CASE_EQ(57)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_EXEC_WAIT(N(8021E46C))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Magikoopa_Anim04)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
@ -553,11 +572,11 @@ EvtScript N(handleEvent_8021E6D8) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Magikoopa_Anim02)
EVT_EXEC_WAIT(N(runAway))
EVT_RETURN
EVT_CASE_EQ(58)
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim02)
EVT_EXEC_WAIT(EVS_Enemy_AirLift)
EVT_CASE_EQ(22)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_EXEC_WAIT(N(8021E46C))
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED)
@ -571,18 +590,18 @@ EvtScript N(handleEvent_8021E6D8) = {
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_BlowAway)
EVT_RETURN
EVT_CASE_EQ(31)
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim01)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_CASE_EQ(19)
EVT_CASE_EQ(EVENT_STAR_BEAM)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_EXEC_WAIT(N(8021E46C))
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -590,20 +609,20 @@ EvtScript N(handleEvent_8021E6D8) = {
EvtScript N(handleEvent_8021EDF0) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_2, 255)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(9)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_BITWISE_OR_CONST(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_EXEC_WAIT(N(8021D784))
EVT_SET_CONST(LVar0, PRT_2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_CASE_OR_EQ(10)
EVT_CASE_OR_EQ(12)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_CASE_OR_EQ(EVENT_FALL_TRIGGER)
EVT_EXEC_WAIT(N(8021D784))
EVT_SET_CONST(LVar0, PRT_2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04)
@ -611,13 +630,13 @@ EvtScript N(handleEvent_8021EDF0) = {
EVT_EXEC_WAIT(N(8021E46C))
EVT_EXEC_WAIT(N(8021D890))
EVT_END_CASE_GROUP
EVT_CASE_EQ(61)
EVT_CASE_EQ(EVENT_UP_AND_AWAY)
EVT_SET_CONST(LVar0, PRT_2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_EXEC_WAIT(N(8021E46C))
EVT_CASE_OR_EQ(14)
EVT_CASE_OR_EQ(15)
EVT_CASE_OR_EQ(EVENT_BURN_HIT)
EVT_CASE_OR_EQ(EVENT_15)
EVT_EXEC_WAIT(N(8021D784))
EVT_SET_CONST(LVar0, PRT_2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim05)
@ -626,7 +645,7 @@ EvtScript N(handleEvent_8021EDF0) = {
EVT_EXEC_WAIT(N(8021E46C))
EVT_EXEC_WAIT(N(8021D890))
EVT_END_CASE_GROUP
EVT_CASE_EQ(36)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, PRT_2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim05)
EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Anim06)
@ -636,12 +655,12 @@ EvtScript N(handleEvent_8021EDF0) = {
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim06)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(11)
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, PRT_2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_EXEC_WAIT(N(8021E46C))
EVT_CASE_EQ(33)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, PRT_2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
@ -650,15 +669,15 @@ EvtScript N(handleEvent_8021EDF0) = {
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(23)
EVT_CASE_EQ(EVENT_ZERO_DAMAGE)
EVT_SET_CONST(LVar0, PRT_2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim01)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_CASE_EQ(25)
EVT_CASE_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, PRT_2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim01)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_FLAG(LVar0, 1)
EVT_EXEC_WAIT(N(8021E46C))
EVT_RETURN
@ -667,7 +686,7 @@ EvtScript N(handleEvent_8021EDF0) = {
EVT_IF_NE(LVar0, 0)
EVT_EXEC_WAIT(N(8021E46C))
EVT_END_IF
EVT_CASE_EQ(32)
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, PRT_2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
@ -677,21 +696,21 @@ EvtScript N(handleEvent_8021EDF0) = {
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(56)
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
EVT_CASE_EQ(53)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_FlyingMagikoopa_Anim01)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_FlyingMagikoopa_Anim01)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(49)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, PRT_2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim01)
EVT_EXEC_WAIT(EVS_Enemy_Recover)
EVT_CASE_EQ(57)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_EXEC_WAIT(N(8021E46C))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_FlyingMagikoopa_Anim04)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5))
@ -702,11 +721,11 @@ EvtScript N(handleEvent_8021EDF0) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_FlyingMagikoopa_Anim02)
EVT_EXEC_WAIT(N(runAway))
EVT_RETURN
EVT_CASE_EQ(58)
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, PRT_2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim02)
EVT_EXEC_WAIT(EVS_Enemy_AirLift)
EVT_CASE_EQ(22)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_EXEC_WAIT(N(8021E46C))
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED)
@ -720,29 +739,29 @@ EvtScript N(handleEvent_8021EDF0) = {
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_BlowAway)
EVT_RETURN
EVT_CASE_EQ(31)
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, PRT_2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim01)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_CASE_EQ(19)
EVT_CASE_EQ(EVENT_STAR_BEAM)
EVT_SET_CONST(LVar0, PRT_2)
EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_EXEC_WAIT(N(8021E46C))
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(healOne) = {
EVT_CALL(SetActorVar, ACTOR_SELF, 10, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 11, 0)
EVT_CALL(AddActorVar, ACTOR_SELF, 4, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_A, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, 0)
EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_Unk_4, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
@ -799,7 +818,7 @@ EvtScript N(healOne) = {
EVT_CALL(PlaySoundAtActor, LVarB, SOUND_206D)
EVT_CALL(PlaySoundAtActor, LVarB, SOUND_HEART_BOUNCE)
EVT_WAIT(30)
EVT_CALL(PlaySoundAtActor, LVarB, SOUND_SRAW_16_A)
EVT_CALL(PlaySoundAtActor, LVarB, SOUND_STAR_BOUNCE_A)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(FreezeBattleState, TRUE)
@ -811,18 +830,18 @@ EvtScript N(healOne) = {
EVT_CALL(MoveBattleCamOver, 10)
EVT_WAIT(10)
EVT_CALL(YieldTurn)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(healAll) = {
EVT_CALL(SetActorVar, ACTOR_SELF, 10, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 11, 1)
EVT_CALL(AddActorVar, ACTOR_SELF, 3, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_A, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, 1)
EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_Unk_3, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
@ -881,7 +900,7 @@ EvtScript N(healAll) = {
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(GetOriginalActorType, LVar0, LVar1)
EVT_IF_EQ(LVar1, 71)
EVT_CALL(GetActorVar, LVar0, 8, LVar1)
EVT_CALL(GetActorVar, LVar0, AVAR_Unk_8, LVar1)
EVT_IF_EQ(LVar1, 1)
EVT_SET(LFlag0, TRUE)
EVT_END_IF
@ -892,7 +911,7 @@ EvtScript N(healAll) = {
EVT_CALL(PlaySoundAtActor, LVar0, SOUND_206D)
EVT_CALL(PlaySoundAtActor, LVar0, SOUND_HEART_BOUNCE)
EVT_WAIT(30)
EVT_CALL(PlaySoundAtActor, LVar0, SOUND_SRAW_16_A)
EVT_CALL(PlaySoundAtActor, LVar0, SOUND_STAR_BOUNCE_A)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(FreezeBattleState, TRUE)
@ -910,20 +929,20 @@ EvtScript N(healAll) = {
EVT_CALL(MoveBattleCamOver, 10)
EVT_WAIT(10)
EVT_CALL(YieldTurn)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(shapeSpell) = {
EVT_CALL(SetActorVar, ACTOR_SELF, 11, 2)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, 2)
EVT_SET(LFlag0, FALSE)
EVT_SET(LFlag1, FALSE)
EVT_CALL(GetActorVar, ACTOR_SELF, 10, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_A, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET(LFlag0, TRUE)
EVT_CALL(GetActorVar, ACTOR_SELF, 9, LVarA)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_9, LVarA)
EVT_END_IF
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING)
@ -1043,7 +1062,7 @@ EvtScript N(shapeSpell) = {
EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30)
EVT_END_IF
EVT_WAIT(50)
EVT_IF_EQ(LVar9, 5)
EVT_IF_EQ(LVar9, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(15)
@ -1196,14 +1215,14 @@ EvtScript N(handleEvent_8022142C) = {
EvtScript N(init_8022143C) = {
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8022142C)))
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 1)
EVT_RETURN
EVT_END
};
EvtScript N(init_80221478) = {
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8022142C)))
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 1)
EVT_RETURN
EVT_END
};
@ -1301,9 +1320,9 @@ ActorPartBlueprint N(ActorParts_80221648)[] = {
ActorBlueprint N(clone) = {
.flags = ACTOR_FLAG_NO_ATTACK,
.type = ACTOR_TYPE_MAGICLONE,
.level = 26,
.level = ACTOR_LEVEL_MAGICLONE,
.maxHP = 11,
.partCount = ARRAY_COUNT( N(ActorParts_80221624)),
.partCount = ARRAY_COUNT(N(ActorParts_80221624)),
.partsData = N(ActorParts_80221624),
.initScript = &N(init_8022143C),
.statusTable = N(StatusTable_802214CC),
@ -1324,9 +1343,9 @@ ActorBlueprint N(clone) = {
ActorBlueprint N(flying_clone) = {
.flags = ACTOR_FLAG_FLYING | ACTOR_FLAG_NO_ATTACK,
.type = ACTOR_TYPE_FLYING_MAGICLONE,
.level = 26,
.level = ACTOR_LEVEL_FLYING_MAGICLONE,
.maxHP = 11,
.partCount = ARRAY_COUNT( N(ActorParts_80221648)),
.partCount = ARRAY_COUNT(N(ActorParts_80221648)),
.partsData = N(ActorParts_80221648),
.initScript = &N(init_80221478),
.statusTable = N(StatusTable_80221578),
@ -1360,8 +1379,8 @@ EvtScript N(makeCopy) = {
EVT_EXEC_WAIT(N(runAway))
EVT_RETURN
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 10, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 11, 3)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_A, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, 3)
EVT_SET(LFlag0, FALSE)
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING)
@ -1372,10 +1391,10 @@ EvtScript N(makeCopy) = {
EVT_ELSE
EVT_CALL(SummonEnemy, EVT_PTR(N(specialFormation_802216E4)), FALSE)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 9, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_9, LVar0)
EVT_SET(LVarA, LVar0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, LVarA, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, LVarA, IDLE_SCRIPT_DISABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(UseIdleAnimation, LVarA, FALSE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
@ -1397,8 +1416,8 @@ EvtScript N(makeCopy) = {
EVT_END_IF
EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 1, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 30, 0)
EVT_WAIT(10)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, LVar9, 1)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, LVar9, IDLE_SCRIPT_ENABLE)
EVT_WAIT(30)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar2, -3)
@ -1488,11 +1507,11 @@ EvtScript N(boostAttack) = {
EVT_EXEC_WAIT(N(shapeSpell))
EVT_RETURN
EVT_LABEL(100)
EVT_CALL(SetActorVar, ACTOR_SELF, 10, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 11, 4)
EVT_CALL(AddActorVar, ACTOR_SELF, 5, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_A, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, 4)
EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_Unk_5, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
@ -1557,7 +1576,7 @@ EvtScript N(boostAttack) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_WAIT(10)
EVT_CALL(YieldTurn)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -1600,11 +1619,11 @@ EvtScript N(boostDefense) = {
EVT_EXEC_WAIT(N(shapeSpell))
EVT_RETURN
EVT_LABEL(100)
EVT_CALL(SetActorVar, ACTOR_SELF, 10, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 11, 5)
EVT_CALL(AddActorVar, ACTOR_SELF, 6, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_A, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, 5)
EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_Unk_6, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
@ -1669,7 +1688,7 @@ EvtScript N(boostDefense) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_WAIT(10)
EVT_CALL(YieldTurn)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -1712,11 +1731,11 @@ EvtScript N(electrify) = {
EVT_EXEC_WAIT(N(shapeSpell))
EVT_RETURN
EVT_LABEL(100)
EVT_CALL(SetActorVar, ACTOR_SELF, 10, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 11, 6)
EVT_CALL(AddActorVar, ACTOR_SELF, 7, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_A, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, 6)
EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_Unk_7, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
@ -1729,7 +1748,7 @@ EvtScript N(electrify) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_FlyingMagikoopa_Anim02)
EVT_END_IF
EVT_WAIT(5)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_02F0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_ELECTRIFY)
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -1771,7 +1790,7 @@ EvtScript N(electrify) = {
EVT_THREAD
EVT_WAIT(10)
EVT_LOOP(4)
EVT_CALL(PlaySoundAtActor, LVar8, SOUND_03D2)
EVT_CALL(PlaySoundAtActor, LVar8, SOUND_ELECTRIC_BUZZ)
EVT_CALL(RandInt, 3, LVar0)
EVT_ADD(LVar0, 3)
EVT_WAIT(LVar0)
@ -1786,7 +1805,7 @@ EvtScript N(electrify) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_WAIT(10)
EVT_CALL(YieldTurn)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -1829,11 +1848,11 @@ EvtScript N(vanish) = {
EVT_EXEC_WAIT(N(shapeSpell))
EVT_RETURN
EVT_LABEL(100)
EVT_CALL(SetActorVar, ACTOR_SELF, 10, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 11, 7)
EVT_CALL(AddActorVar, ACTOR_SELF, 8, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_A, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, 7)
EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_Unk_8, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
@ -1898,7 +1917,7 @@ EvtScript N(vanish) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_WAIT(10)
EVT_CALL(YieldTurn)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -1910,7 +1929,7 @@ EvtScript N(takeTurn_80223B24) = {
EVT_EXEC_WAIT(N(shapeSpell))
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 10, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_A, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_GOTO(20)
EVT_END_IF
@ -1922,7 +1941,7 @@ EvtScript N(takeTurn_80223B24) = {
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(GetOriginalActorType, LVar0, LVar1)
EVT_IF_EQ(LVar1, 71)
EVT_CALL(GetActorVar, LVar0, 8, LVar1)
EVT_CALL(GetActorVar, LVar0, AVAR_Unk_8, LVar1)
EVT_IF_EQ(LVar1, 1)
EVT_SET(LFlag0, TRUE)
EVT_END_IF
@ -1956,7 +1975,7 @@ EvtScript N(takeTurn_80223B24) = {
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(GetOriginalActorType, LVar0, LVar1)
EVT_IF_EQ(LVar1, 71)
EVT_CALL(GetActorVar, LVar0, 8, LVar1)
EVT_CALL(GetActorVar, LVar0, AVAR_Unk_8, LVar1)
EVT_IF_EQ(LVar1, 1)
EVT_SET(LFlag0, TRUE)
EVT_END_IF
@ -1990,7 +2009,7 @@ EvtScript N(takeTurn_80223B24) = {
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(GetOriginalActorType, LVar0, LVar1)
EVT_IF_EQ(LVar1, 71)
EVT_CALL(GetActorVar, LVar0, 8, LVar1)
EVT_CALL(GetActorVar, LVar0, AVAR_Unk_8, LVar1)
EVT_IF_EQ(LVar1, 1)
EVT_SET(LFlag0, TRUE)
EVT_END_IF
@ -2024,7 +2043,7 @@ EvtScript N(takeTurn_80223B24) = {
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(LVarA, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, 4, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_4, LVar0)
EVT_IF_LT(LVar0, 0)
EVT_CALL(RandInt, 1000, LVar0)
EVT_IF_LT(LVar0, 0)
@ -2032,7 +2051,7 @@ EvtScript N(takeTurn_80223B24) = {
EVT_RETURN
EVT_END_IF
EVT_ELSE
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_3, LVar0)
EVT_IF_LT(LVar0, 0)
EVT_CALL(RandInt, 1000, LVar0)
EVT_IF_LT(LVar0, 0)
@ -2042,7 +2061,7 @@ EvtScript N(takeTurn_80223B24) = {
EVT_END_IF
EVT_END_IF
EVT_ELSE
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_3, LVar0)
EVT_IF_LT(LVar0, 0)
EVT_CALL(RandInt, 1000, LVar0)
EVT_IF_LT(LVar0, 0)
@ -2050,7 +2069,7 @@ EvtScript N(takeTurn_80223B24) = {
EVT_RETURN
EVT_END_IF
EVT_ELSE
EVT_CALL(GetActorVar, ACTOR_SELF, 4, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_4, LVar0)
EVT_IF_LT(LVar0, 0)
EVT_SETF(LVar9, EVT_FLOAT(100.0))
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
@ -2060,7 +2079,7 @@ EvtScript N(takeTurn_80223B24) = {
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(GetOriginalActorType, LVar0, LVar1)
EVT_IF_EQ(LVar1, 71)
EVT_CALL(GetActorVar, LVar0, 8, LVar1)
EVT_CALL(GetActorVar, LVar0, AVAR_Unk_8, LVar1)
EVT_IF_EQ(LVar1, 1)
EVT_SET(LFlag0, TRUE)
EVT_END_IF
@ -2094,7 +2113,7 @@ EvtScript N(takeTurn_80223B24) = {
EVT_SET(LVarD, 0)
EVT_SET(LVarE, 0)
EVT_SET(LVarF, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 10, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_A, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET(LVarA, 100)
EVT_SET(LVarB, 0)
@ -2113,10 +2132,10 @@ EvtScript N(takeTurn_80223B24) = {
EVT_IF_NE(LVar0, 0)
EVT_SET(LVarB, 0)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 11, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_B, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(4)
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar1)
EVT_IF_LT(LVar1, 0)
EVT_CALL(RandInt, 99, LVar0)
EVT_ADD(LVar0, 1)
@ -2130,7 +2149,7 @@ EvtScript N(takeTurn_80223B24) = {
EVT_END_IF
EVT_END_IF
EVT_CASE_EQ(5)
EVT_CALL(GetActorVar, ACTOR_SELF, 6, LVar1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_6, LVar1)
EVT_IF_LT(LVar1, 0)
EVT_CALL(RandInt, 99, LVar0)
EVT_ADD(LVar0, 1)
@ -2144,19 +2163,19 @@ EvtScript N(takeTurn_80223B24) = {
EVT_END_IF
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_GE(LVar0, 0)
EVT_SET(LVarC, 0)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 6, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_6, LVar0)
EVT_IF_GE(LVar0, 0)
EVT_SET(LVarD, 0)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 7, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_7, LVar0)
EVT_IF_GE(LVar0, 0)
EVT_SET(LVarE, 0)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_8, LVar0)
EVT_IF_GE(LVar0, 0)
EVT_SET(LVarF, 0)
EVT_END_IF

View File

@ -249,9 +249,9 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_CHOMP,
.level = 14,
.level = ACTOR_LEVEL_CHOMP,
.maxHP = 4,
.partCount = ARRAY_COUNT( N(ActorParts)),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
@ -434,7 +434,7 @@ EvtScript N(EVS_UpdateChain) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SET(LVarF, LVar0)
@ -680,7 +680,7 @@ EvtScript N(EVS_Chomp_SpinSmashHit) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, TRUE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)

View File

@ -237,9 +237,9 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_TUTANKOOPA,
.level = 55,
.level = ACTOR_LEVEL_TUTANKOOPA,
.maxHP = 30,
.partCount = ARRAY_COUNT( N(ActorParts)),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
@ -276,7 +276,7 @@ EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CALL(ForceHomePos, ACTOR_SELF, 97, 70, 15)
EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SHELL_1, 70, 70, 3)
@ -326,7 +326,7 @@ EvtScript N(EVS_Idle) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(GetLastElement, LVarE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
@ -448,7 +448,7 @@ EvtScript N(EVS_HandleEvent) = {
EVT_EXEC_WAIT(EVS_Enemy_Recover)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -528,7 +528,7 @@ EvtScript N(EVS_TemporaryKnockout) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_LABEL(0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Stunned, LVar0)
EVT_IF_EQ(LVar0, FALSE)
@ -537,7 +537,7 @@ EvtScript N(EVS_TakeTurn) = {
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextSummonTime, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_EXEC_WAIT(N(EVS_Move_SummonChomp))
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_ELSE
@ -574,7 +574,7 @@ EvtScript N(EVS_TakeTurn) = {
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextAttack, AVAL_TRY_TOSS_NEXT)
EVT_EXEC_WAIT(N(EVS_Attack_DropDebris))
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_ELSE
@ -584,7 +584,7 @@ EvtScript N(EVS_TakeTurn) = {
EVT_EXEC_WAIT(N(EVS_LevitateToHomePos))
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_RETURN
@ -1023,7 +1023,7 @@ EvtScript N(EVS_Move_SummonChomp) = {
EVT_CALL(SetActorPos, LVarB, LVar0, LVar1, LVar2)
EVT_CALL(SetActorDispOffset, LVarB, 0, 0, 0)
EVT_CALL(UseIdleAnimation, LVarB, FALSE)
EVT_CALL(EnableIdleScript, LVarB, 0)
EVT_CALL(EnableIdleScript, LVarB, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetAnimation, LVarB, 1, ANIM_ChainChomp_SlowBite)
EVT_CALL(SetActorSpeed, LVarB, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, LVarB, EVT_FLOAT(0.8))
@ -1084,7 +1084,7 @@ EvtScript N(EVS_Move_SummonChomp) = {
EVT_CALL(HPBarToHome, LVarB)
EVT_CALL(SetActorSpeed, LVarB, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, LVarB, EVT_FLOAT(0.8))
EVT_CALL(EnableIdleScript, LVarB, 1)
EVT_CALL(EnableIdleScript, LVarB, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, LVarB, TRUE)
// close the gate
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, 60)
@ -1226,7 +1226,7 @@ EvtScript N(EVS_Tutankoopa_Death) = {
EVT_IF_NE(LVar2, 0)
EVT_THREAD
EVT_CALL(HideHealthBar, ACTOR_ENEMY1)
EVT_CALL(EnableIdleScript, ACTOR_ENEMY1, 0)
EVT_CALL(EnableIdleScript, ACTOR_ENEMY1, IDLE_SCRIPT_DISABLE)
EVT_CALL(UseIdleAnimation, ACTOR_ENEMY1, FALSE)
EVT_CALL(SetAnimation, ACTOR_ENEMY1, PRT_MAIN, ANIM_ChainChomp_Hurt)
EVT_WAIT(10)

View File

@ -29,6 +29,17 @@ enum N(ActorPartIDs) {
PRT_5 = 5,
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_1 = 1,
AVAR_Unk_2 = 2,
AVAR_Unk_3 = 3,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
s32 N(IdleAnimations_8021B600)[] = {
STATUS_KEY_NORMAL, ANIM_Buzzar_Anim01,
STATUS_KEY_STONE, ANIM_Buzzar_Anim00,
@ -142,9 +153,9 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_BUZZAR,
.level = 35,
.level = ACTOR_LEVEL_BUZZAR,
.maxHP = 40,
.partCount = ARRAY_COUNT( N(ActorParts)),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
@ -163,14 +174,14 @@ ActorBlueprint NAMESPACE = {
};
EvtScript N(EVS_Init) = {
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_3, 0)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar1, 40)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -224,7 +235,7 @@ EvtScript N(EVS_HandleEvent) = {
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 20)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
EVT_EXEC_WAIT(N(EVS_FlyToHome))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
@ -263,33 +274,33 @@ EvtScript N(EVS_HandleEvent) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 2)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 2)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1)
EVT_EXEC_WAIT(N(EVS_Attack_WindBlast))
EVT_CASE_EQ(2)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 3)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 3)
EVT_EXEC_WAIT(N(EVS_Attack_ClawSwipe))
EVT_CASE_EQ(4)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 5)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 5)
EVT_EXEC_WAIT(N(EVS_Attack_FeatherFling))
EVT_CASE_DEFAULT
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 5)
EVT_SET(LVar0, 0)
EVT_ELSE
EVT_ADD(LVar0, 1)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_EXEC_WAIT(N(EVS_Attack_GrappleDrop))
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -315,7 +326,7 @@ EvtScript N(EVS_Attack_WindBlast) = {
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16)
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17)
EVT_LOOP(0)
EVT_CALL(func_8026DF88, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_BREAK_LOOP
EVT_END_IF
@ -411,7 +422,7 @@ EvtScript N(EVS_Attack_WindBlast) = {
EVT_END_THREAD
EVT_END_IF
EVT_WAIT(90)
EVT_CALL(GetActionResult, LVar1)
EVT_CALL(GetActionQuality, LVar1)
EVT_CALL(ActorExists, ACTOR_PARTNER, LVar0)
EVT_IF_EQ(LVar0, TRUE)
EVT_WAIT(3)
@ -493,7 +504,7 @@ EvtScript N(EVS_Attack_WindBlast) = {
EVT_END_IF
EVT_CALL(FreezeBattleState, TRUE)
EVT_WAIT(90)
EVT_CALL(GetActionResult, LVar1)
EVT_CALL(GetActionQuality, LVar1)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
@ -517,7 +528,7 @@ EvtScript N(EVS_Attack_WindBlast) = {
EvtScript N(EVS_Attack_FeatherFling) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_05)
@ -536,7 +547,7 @@ EvtScript N(EVS_Attack_FeatherFling) = {
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16)
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17)
EVT_LOOP(0)
EVT_CALL(func_8026DF88, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_BREAK_LOOP
EVT_END_IF
@ -566,9 +577,9 @@ EvtScript N(EVS_Attack_FeatherFling) = {
EVT_PLAY_EFFECT(EFFECT_SHINY_FLARE, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.6), 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20F3)
EVT_WAIT(10)
EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_3, ACTOR_SOUND_FLY, 0, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_4, ACTOR_SOUND_FLY, 0, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_5, ACTOR_SOUND_FLY, 0, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_3, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE)
EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_4, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE)
EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_5, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 20)
EVT_THREAD
@ -636,7 +647,7 @@ EvtScript N(EVS_Attack_FeatherFling) = {
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_FlyToHome))
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
@ -717,7 +728,7 @@ EvtScript N(EVS_Attack_FeatherFling) = {
EVT_CALL(YieldTurn)
EVT_EXEC_WAIT(N(EVS_FlyToHome))
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -732,7 +743,7 @@ EvtScript N(EVS_LiftMario) = {
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16)
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17)
EVT_LOOP(0)
EVT_CALL(func_8026DF88, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_BREAK_LOOP
EVT_END_IF
@ -768,7 +779,7 @@ EvtScript N(EVS_LiftMario) = {
EvtScript N(EVS_Attack_GrappleDrop) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
@ -785,7 +796,7 @@ EvtScript N(EVS_Attack_GrappleDrop) = {
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16)
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17)
EVT_LOOP(0)
EVT_CALL(func_8026DF88, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_BREAK_LOOP
EVT_END_IF
@ -824,7 +835,7 @@ EvtScript N(EVS_Attack_GrappleDrop) = {
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_FlyToHome_GrappleFail))
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
@ -858,7 +869,7 @@ EvtScript N(EVS_Attack_GrappleDrop) = {
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16)
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17)
EVT_LOOP(0)
EVT_CALL(func_8026DF88, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_BREAK_LOOP
EVT_END_IF
@ -873,7 +884,7 @@ EvtScript N(EVS_Attack_GrappleDrop) = {
EVT_WAIT(20)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_EXEC_WAIT(N(EVS_FlyToHome))
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_CASE_DEFAULT
@ -954,7 +965,7 @@ EvtScript N(EVS_Attack_GrappleDrop) = {
EVT_WAIT(8)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_EXEC_WAIT(N(EVS_FlyToHome_GrappleFail))
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_IF
@ -991,7 +1002,7 @@ EvtScript N(EVS_Attack_GrappleDrop) = {
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16)
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17)
EVT_LOOP(0)
EVT_CALL(func_8026DF88, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_BREAK_LOOP
EVT_END_IF
@ -1009,7 +1020,7 @@ EvtScript N(EVS_Attack_GrappleDrop) = {
EVT_EXEC_WAIT(N(EVS_FlyToHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -1017,7 +1028,7 @@ EvtScript N(EVS_Attack_GrappleDrop) = {
EvtScript N(EVS_Attack_ClawSwipe) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
@ -1035,7 +1046,7 @@ EvtScript N(EVS_Attack_ClawSwipe) = {
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16)
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17)
EVT_LOOP(0)
EVT_CALL(func_8026DF88, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_BREAK_LOOP
EVT_END_IF
@ -1071,7 +1082,7 @@ EvtScript N(EVS_Attack_ClawSwipe) = {
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_FlyToHome))
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
@ -1104,7 +1115,7 @@ EvtScript N(EVS_Attack_ClawSwipe) = {
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16)
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17)
EVT_LOOP(0)
EVT_CALL(func_8026DF88, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_BREAK_LOOP
EVT_END_IF
@ -1125,7 +1136,7 @@ EvtScript N(EVS_Attack_ClawSwipe) = {
EVT_EXEC_WAIT(N(EVS_FlyToHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -1152,7 +1163,7 @@ EvtScript N(EVS_FlyToHome_Impl) = {
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16)
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17)
EVT_LOOP(0)
EVT_CALL(func_8026DF88, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_BREAK_LOOP
EVT_END_IF
@ -1186,7 +1197,7 @@ EvtScript N(EVS_FlyToHome_GrappleFail_Impl) = {
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16)
EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17)
EVT_LOOP(0)
EVT_CALL(func_8026DF88, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_BREAK_LOOP
EVT_END_IF

View File

@ -3,12 +3,12 @@
#define NAMESPACE A(fuzzipede)
extern EvtScript N(init_80218B70);
extern EvtScript N(takeTurn_8021C1A4);
extern EvtScript N(idle_80218D58);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_Idle);
extern EvtScript N(handleEvent_802197FC);
extern EvtScript N(handleEvent_80219ED4);
extern EvtScript N(nextTurn_80218C58);
extern EvtScript N(EVS_HandlePhase);
extern EvtScript N(8021A2E8);
enum N(ActorPartIDs) {
@ -16,6 +16,16 @@ enum N(ActorPartIDs) {
PRT_2 = 2,
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_1 = 1,
AVAR_Unk_2 = 2,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
s32 N(IdleAnimations_802189B0)[] = {
STATUS_KEY_NORMAL, ANIM_Fuzzipede_Anim04,
STATUS_KEY_STONE, ANIM_Fuzzipede_Anim00,
@ -42,12 +52,12 @@ s32 N(IdleAnimations_802189FC)[] = {
STATUS_END,
};
s32 N(DefenseTable_80218A48)[] = {
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(StatusTable_80218A54)[] = {
s32 N(StatusTable)[] = {
STATUS_KEY_NORMAL, 0,
STATUS_KEY_DEFAULT, 0,
STATUS_KEY_SLEEP, 50,
@ -80,7 +90,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.targetOffset = { 2, 24 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_802189B0),
.defenseTable = N(DefenseTable_80218A48),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { -2, -10 },
@ -92,7 +102,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.targetOffset = { 2, -16 },
.opacity = 255,
.idleAnimations = NULL,
.defenseTable = N(DefenseTable_80218A48),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { -2, -10 },
@ -102,12 +112,12 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_FUZZIPEDE,
.level = 43,
.level = ACTOR_LEVEL_FUZZIPEDE,
.maxHP = 20,
.partCount = ARRAY_COUNT( N(ActorParts)),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init_80218B70),
.statusTable = N(StatusTable_80218A54),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
.hurricaneChance = 0,
@ -124,13 +134,13 @@ ActorBlueprint NAMESPACE = {
#include "common/battle/SetAbsoluteStatusOffsets.inc.c"
EvtScript N(init_80218B70) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021C1A4)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_80218D58)))
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_802197FC)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn_80218C58)))
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 0)
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, 0)
EVT_CALL(SetActorPos, ACTOR_SELF, 125, 33, -15)
EVT_CALL(SetHomePos, ACTOR_SELF, 125, 33, -15)
EVT_CALL(HPBarToHome, ACTOR_SELF)
@ -139,10 +149,10 @@ EvtScript N(init_80218B70) = {
EVT_END
};
EvtScript N(nextTurn_80218C58) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar0)
EvtScript N(EVS_HandlePhase) = {
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_2, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, 1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(SetBattleCamZoom, 200)
@ -158,7 +168,7 @@ EvtScript N(nextTurn_80218C58) = {
EVT_END
};
EvtScript N(idle_80218D58) = {
EvtScript N(EVS_Idle) = {
EVT_RETURN
EVT_END
};
@ -279,20 +289,20 @@ EvtScript N(802191AC) = {
EvtScript N(80219668) = {
EVT_CALL(HideHealthBar, ACTOR_SELF)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1)
EVT_CASE_EQ(1)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 2)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 2)
EVT_CASE_EQ(2)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 3)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 3)
EVT_CASE_EQ(3)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 4)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 4)
EVT_CASE_EQ(4)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
EVT_END_SWITCH
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_EXEC_WAIT(N(80218D68))
@ -311,7 +321,7 @@ EvtScript N(80219668) = {
EvtScript N(handleEvent_802197FC) = {
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
@ -396,7 +406,7 @@ EvtScript N(handleEvent_802197FC) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -417,7 +427,7 @@ EvtScript N(80219D68) = {
EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAGS_IMMOBILIZED)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 3)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 3)
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
EVT_ELSE
EVT_EXEC_WAIT(N(802191AC))
@ -430,7 +440,7 @@ EvtScript N(80219D68) = {
EvtScript N(handleEvent_80219ED4) = {
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(EVENT_HIT_COMBO)
@ -495,14 +505,14 @@ EvtScript N(handleEvent_80219ED4) = {
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8021A2E8) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -561,7 +571,7 @@ EvtScript N(8021A2E8) = {
EvtScript N(8021A6D8) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
@ -619,7 +629,7 @@ EvtScript N(8021A6D8) = {
EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
EVT_EXEC_WAIT(N(80219668))
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_SWITCH
@ -679,7 +689,7 @@ EvtScript N(8021A6D8) = {
EVT_EXEC_WAIT(N(80219668))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -695,7 +705,7 @@ EvtScript N(8021A6D8) = {
EvtScript N(8021B008) = {
EVT_LABEL(0)
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVarA)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_1, LVarA)
EVT_SWITCH(LVarA)
EVT_CASE_EQ(0)
EVT_CASE_EQ(1)
@ -710,13 +720,13 @@ EvtScript N(8021B008) = {
EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 10, EVT_FLOAT(1.0))
EVT_ADD(LVar1, 10)
EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 5, EVT_FLOAT(1.0))
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 0)
EVT_CASE_EQ(2)
EVT_CALL(ShowMessageBox, LVar5, 60)
EVT_SUB(LVar1, 150)
EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 30, EVT_FLOAT(1.0))
EVT_CALL(RemoveItemEntity, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 3)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 3)
EVT_RETURN
EVT_END_SWITCH
EVT_WAIT(1)
@ -727,7 +737,7 @@ EvtScript N(8021B008) = {
EvtScript N(8021B22C) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
@ -796,7 +806,7 @@ EvtScript N(8021B22C) = {
EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
EVT_EXEC_WAIT(N(80219668))
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
@ -841,7 +851,7 @@ EvtScript N(8021B22C) = {
EVT_SET(LFlag0, FALSE)
EVT_END_IF
EVT_IF_EQ(LFlag0, TRUE)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 1)
EVT_EXEC(N(8021B008))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -862,7 +872,7 @@ EvtScript N(8021B22C) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04)
EVT_WAIT(8)
EVT_LABEL(0)
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_1, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_WAIT(1)
EVT_GOTO(0)
@ -874,7 +884,7 @@ EvtScript N(8021B22C) = {
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
EVT_END_LOOP
EVT_WAIT(10)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 2)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 2)
EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 0, 0)
EVT_CALL(N(StartRumbleWithParams), 200, 10)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20DC)
@ -906,7 +916,7 @@ EvtScript N(8021B22C) = {
EVT_EXEC_WAIT(N(80219668))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -914,7 +924,7 @@ EvtScript N(8021B22C) = {
EvtScript N(8021C004) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 20)
@ -927,7 +937,7 @@ EvtScript N(8021C004) = {
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_206D)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE)
EVT_WAIT(30)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SRAW_16_A)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(FreezeBattleState, TRUE)
@ -936,14 +946,14 @@ EvtScript N(8021C004) = {
EVT_END_THREAD
EVT_CALL(WaitForBuffDone)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_8021C1A4) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(3)

View File

@ -6,11 +6,11 @@
#define NAMESPACE A(kammy_koopa)
extern EvtScript N(init);
extern EvtScript N(idle);
extern EvtScript N(takeTurn);
extern EvtScript N(nextTurn);
extern EvtScript N(handleEvent);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandlePhase);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(speakOnHit);
extern EvtScript N(onDeath);
@ -19,6 +19,15 @@ enum N(ActorPartIDs) {
PRT_2 = 2,
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_1 = 1,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
s32 N(IdleAnimations)[] = {
STATUS_KEY_NORMAL, ANIM_BattleKammy_Anim05,
STATUS_END,
@ -89,11 +98,11 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_KAMMY_KOOPA,
.level = 99,
.level = ACTOR_LEVEL_KAMMY_KOOPA,
.maxHP = 10,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
@ -109,14 +118,14 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 10, 20 },
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn)))
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_DONT_STOP_MUSIC, TRUE)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 0)
EVT_RETURN
EVT_END
};
@ -133,7 +142,7 @@ API_CALLABLE(N(unknownFunction)) {
return ApiStatus_DONE2;
}
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_LOOP(0)
EVT_CALL(N(unknownFunction))
EVT_WAIT(1)
@ -142,7 +151,7 @@ EvtScript N(idle) = {
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
@ -254,7 +263,7 @@ API_CALLABLE(N(DropBlock)) {
return ApiStatus_DONE2;
}
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
@ -383,12 +392,12 @@ EvtScript N(takeTurn) = {
EVT_END
};
EvtScript N(nextTurn) = {
EvtScript N(EVS_HandlePhase) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetBattlePhase, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(PHASE_PLAYER_BEGIN)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
@ -416,7 +425,7 @@ EvtScript N(nextTurn) = {
EVT_CALL(ActorSpeak, MSG_CH8_0095, ACTOR_PLAYER, 1, ANIM_BattleParakarry_EnterShell, ANIM_BattleParakarry_ShellFly)
EVT_WAIT(10)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(AddActorVar, ACTOR_SELF, 0, 1)
EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_Unk_0, 1)
EVT_END_SWITCH
EVT_CASE_EQ(12)
EVT_END_SWITCH
@ -428,7 +437,7 @@ EvtScript N(nextTurn) = {
EvtScript N(speakOnHit) = {
EVT_CALL(FreezeBattleState, TRUE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 1)
EVT_CALL(GetActorHP, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(10)
@ -464,7 +473,7 @@ EvtScript N(speakOnHit) = {
EVT_CASE_OR_EQ(3)
EVT_CASE_OR_EQ(2)
EVT_CASE_OR_EQ(1)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_BREAK_SWITCH
EVT_END_IF
@ -479,10 +488,10 @@ EvtScript N(speakOnHit) = {
EVT_WAIT(10)
EVT_CALL(FreezeBattleCam, FALSE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(AddActorVar, ACTOR_SELF, 0, 1)
EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_Unk_0, 1)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 0)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_CALL(FreezeBattleState, FALSE)
EVT_RETURN
@ -490,7 +499,7 @@ EvtScript N(speakOnHit) = {
};
EvtScript N(onDeath) = {
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(HideHealthBar, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
@ -501,7 +510,7 @@ EvtScript N(onDeath) = {
EVT_SUB(LVar2, 1)
EVT_CALL(SetPartPos, ACTOR_SELF, PRT_2, LVar0, LVar1, LVar2)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0301)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))

View File

@ -1,20 +1,37 @@
#include "../area.h"
#include "sprite/npc/GoombaBros.h"
#include "goomba_bros_common.h"
#define NAMESPACE A(blue_goomba_1)
extern s32 N(DefaultAnims)[];
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_TakeTurn_Inner);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_GoombaBros_Death);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
PRT_ZER0 = 0,
PRT_RED_MAIN = 1, // main part for red goomba
PRT_MAIN = 1,
PRT_ZER0 = 0,
};
s32 N(DefenseTable_802198B0)[] = {
enum N(ActorVars) {
AVAR_UsedTaunt = 0,
AVAR_Unused = 1,
};
enum N(ActorParams) {
DMG_HEADBONK = 1,
};
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(StatusTable_802198BC)[] = {
s32 N(StatusTable)[] = {
STATUS_KEY_NORMAL, 0,
STATUS_KEY_DEFAULT, 0,
STATUS_KEY_SLEEP, 100,
@ -39,14 +56,6 @@ s32 N(StatusTable_802198BC)[] = {
STATUS_END,
};
extern s32 N(IdleAnimations_802199B4)[];
extern EvtScript N(init_8021B268);
extern EvtScript N(doDeath_8021B388);
extern EvtScript N(takeTurn_8021A5A0);
extern EvtScript N(idle_80219A98);
extern EvtScript N(handleEvent_80219D74);
extern EvtScript N(takeTurn_8021B2C8);
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
@ -54,8 +63,8 @@ ActorPartBlueprint N(ActorParts)[] = {
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_802199B4),
.defenseTable = N(DefenseTable_802198B0),
.idleAnimations = N(DefaultAnims),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, -3 },
@ -65,12 +74,12 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_BLUE_GOOMBA_BOSS,
.level = 20,
.level = ACTOR_LEVEL_BLUE_GOOMBA_BOSS,
.maxHP = 6,
.partCount = ARRAY_COUNT( N(ActorParts)),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init_8021B268),
.statusTable = N(StatusTable_802198BC),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
.hurricaneChance = 0,
@ -85,7 +94,7 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 8, 25 },
};
s32 N(IdleAnimations_802199B4)[] = {
s32 N(DefaultAnims)[] = {
STATUS_KEY_NORMAL, ANIM_GoombaBros_Blue_Idle,
STATUS_KEY_STONE, ANIM_GoombaBros_Blue_Still,
STATUS_KEY_SLEEP, ANIM_GoombaBros_Blue_Sleep,
@ -98,7 +107,8 @@ s32 N(IdleAnimations_802199B4)[] = {
STATUS_END,
};
s32 N(IdleAnimations_80219A00)[] = {
// while shuffling around during idle
s32 N(ShuffleAnims)[] = {
STATUS_KEY_NORMAL, ANIM_GoombaBros_Blue_Run,
STATUS_KEY_STONE, ANIM_GoombaBros_Blue_Still,
STATUS_KEY_SLEEP, ANIM_GoombaBros_Blue_Sleep,
@ -111,103 +121,103 @@ s32 N(IdleAnimations_80219A00)[] = {
STATUS_END,
};
EvtScript N(init_80219A4C) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021A5A0)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_80219A98)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_80219D74)))
EvtScript N(EVS_Init_Inner) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn_Inner)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_RETURN
EVT_END
};
EvtScript N(idle_80219A98) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(10)
EVT_CALL(RandInt, 80, LVar0)
EVT_ADD(LVar0, 80)
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_CALL(RandInt, 80, LVar0)
EVT_ADD(LVar0, 80)
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_80219A00)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_802199B4)))
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims)))
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_80219A00)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_802199B4)))
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims)))
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_GOTO(10)
EVT_END_LOOP
EVT_GOTO(10)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_80219D74) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(9)
EVT_CASE_OR_EQ(10)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(14)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_GoombaBros_Blue_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_CASE_EQ(36)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_GoombaBros_Blue_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_BurnStill)
EVT_EXEC_WAIT(N(doDeath_8021B388))
EVT_EXEC_WAIT(N(EVS_GoombaBros_Death))
EVT_RETURN
EVT_CASE_EQ(11)
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_CASE_EQ(33)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(N(doDeath_8021B388))
EVT_EXEC_WAIT(N(EVS_GoombaBros_Death))
EVT_RETURN
EVT_CASE_EQ(47)
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
@ -225,32 +235,33 @@ EvtScript N(handleEvent_80219D74) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CASE_EQ(38)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(N(doDeath_8021B388))
EVT_EXEC_WAIT(N(EVS_GoombaBros_Death))
EVT_RETURN
EVT_CASE_EQ(19)
EVT_CASE_OR_EQ(23)
EVT_CASE_OR_EQ(25)
EVT_CASE_OR_EQ(31)
EVT_CASE_EQ(EVENT_STAR_BEAM)
// do nothing
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Idle)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(32)
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(N(doDeath_8021B388))
EVT_EXEC_WAIT(N(EVS_GoombaBros_Death))
EVT_RETURN
EVT_CASE_EQ(53)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Run)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
@ -258,21 +269,21 @@ EvtScript N(handleEvent_80219D74) = {
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(49)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Idle)
EVT_EXEC_WAIT(EVS_Enemy_Recover)
EVT_CASE_EQ(57)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Run)
EVT_SET_CONST(LVar2, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ScareAway)
EVT_RETURN
EVT_CASE_EQ(58)
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Run)
EVT_EXEC_WAIT(EVS_Enemy_AirLift)
EVT_CASE_EQ(22)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_BlowAway)
@ -280,7 +291,7 @@ EvtScript N(handleEvent_80219D74) = {
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -288,9 +299,9 @@ EvtScript N(handleEvent_80219D74) = {
#include "common/CalculateArcsinDeg.inc.c"
EvtScript N(takeTurn_8021A5A0) = {
EvtScript N(EVS_TakeTurn_Inner) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
@ -348,8 +359,8 @@ EvtScript N(takeTurn_8021A5A0) = {
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Hurt)
EVT_WAIT(5)
EVT_IF_EQ(LVarA, 5)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0x80000000, 0, 0, 0)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
@ -388,7 +399,7 @@ EvtScript N(takeTurn_8021A5A0) = {
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
@ -419,7 +430,7 @@ EvtScript N(takeTurn_8021A5A0) = {
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_END_SWITCH
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
@ -454,37 +465,37 @@ EvtScript N(takeTurn_8021A5A0) = {
EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(init_8021B268) = {
EVT_EXEC_WAIT(N(init_80219A4C))
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021B2C8)))
EvtScript N(EVS_Init) = {
EVT_EXEC_WAIT(N(EVS_Init_Inner))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_UsedTaunt, FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused, 0)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_8021B2C8) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 0)
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_UsedTaunt, LVar0)
EVT_IF_EQ(LVar0, FALSE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 30)
EVT_WAIT(30)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_UsedTaunt, TRUE)
EVT_CALL(ActorSpeak, MSG_CH0_00BF, ACTOR_SELF, PRT_MAIN, -1, -1)
EVT_END_IF
EVT_EXEC_WAIT(N(takeTurn_8021A5A0))
EVT_EXEC_WAIT(N(EVS_TakeTurn_Inner))
EVT_RETURN
EVT_END
};
EvtScript N(doDeath_8021B388) = {
EvtScript N(EVS_GoombaBros_Death) = {
EVT_CALL(HideHealthBar, ACTOR_SELF)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_SET(LVar2, 0)
@ -506,24 +517,24 @@ EvtScript N(doDeath_8021B388) = {
EVT_ADD(LVar3, 8)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_ZER0, 1, TRUE)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 4, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_ZER0, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE)
EVT_WAIT(30)
EVT_CALL(ActorExists, ACTOR_ENEMY1, LVar0)
EVT_CALL(ActorExists, ACTOR_RED_GOOMBA, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(GetActorHP, ACTOR_ENEMY1, LVar0)
EVT_CALL(GetActorHP, ACTOR_RED_GOOMBA, LVar0)
EVT_END_IF
EVT_IF_NE(LVar0, 0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_ENEMY1)
EVT_CALL(BattleCamTargetActor, ACTOR_RED_GOOMBA)
EVT_CALL(MoveBattleCamOver, 20)
EVT_WAIT(20)
EVT_CALL(UseIdleAnimation, ACTOR_ENEMY1, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_ENEMY1, 0)
EVT_CALL(SetAnimation, ACTOR_ENEMY1, PRT_RED_MAIN, ANIM_GoombaBros_Red_CryTalk)
EVT_CALL(ActorSpeak, MSG_CH0_00C1, ACTOR_ENEMY1, PRT_RED_MAIN, -1, -1)
EVT_CALL(EnableIdleScript, ACTOR_ENEMY1, 1)
EVT_CALL(UseIdleAnimation, ACTOR_ENEMY1, TRUE)
EVT_CALL(UseIdleAnimation, ACTOR_RED_GOOMBA, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetAnimation, ACTOR_RED_GOOMBA, PRT_RED_MAIN, ANIM_GoombaBros_Red_CryTalk)
EVT_CALL(ActorSpeak, MSG_CH0_00C1, ACTOR_RED_GOOMBA, PRT_RED_MAIN, -1, -1)
EVT_CALL(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_RED_GOOMBA, TRUE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 30)
EVT_WAIT(30)

View File

@ -3,16 +3,26 @@
#define NAMESPACE A(blue_goomba_2)
extern s32 N(DefaultAnims)[];
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
PRT_MAIN = 1,
};
s32 N(DefenseTable_8021D400)[] = {
enum N(ActorParams) {
DMG_HEADBONK = 1,
};
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(StatusTable_8021D40C)[] = {
s32 N(StatusTable)[] = {
STATUS_KEY_NORMAL, 0,
STATUS_KEY_DEFAULT, 0,
STATUS_KEY_SLEEP, 100,
@ -37,12 +47,6 @@ s32 N(StatusTable_8021D40C)[] = {
STATUS_END,
};
extern s32 N(IdleAnimations_8021D504)[];
extern EvtScript N(init_8021EDB8);
extern EvtScript N(takeTurn_8021E0F0);
extern EvtScript N(idle_8021D5E8);
extern EvtScript N(handleEvent_8021D8C4);
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
@ -50,8 +54,8 @@ ActorPartBlueprint N(ActorParts)[] = {
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_8021D504),
.defenseTable = N(DefenseTable_8021D400),
.idleAnimations = N(DefaultAnims),
.defenseTable = N(DefenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, -3 },
@ -61,12 +65,12 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_BLUE_GOOMBA_BOSS,
.level = 20,
.level = ACTOR_LEVEL_BLUE_GOOMBA_BOSS,
.maxHP = 6,
.partCount = ARRAY_COUNT( N(ActorParts)),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init_8021EDB8),
.statusTable = N(StatusTable_8021D40C),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
.hurricaneChance = 0,
@ -81,7 +85,7 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 8, 25 },
};
s32 N(IdleAnimations_8021D504)[] = {
s32 N(DefaultAnims)[] = {
STATUS_KEY_NORMAL, ANIM_GoombaBros_Blue_Idle,
STATUS_KEY_STONE, ANIM_GoombaBros_Blue_Still,
STATUS_KEY_SLEEP, ANIM_GoombaBros_Blue_Sleep,
@ -94,7 +98,8 @@ s32 N(IdleAnimations_8021D504)[] = {
STATUS_END,
};
s32 N(IdleAnimations_8021D550)[] = {
// while shuffling around during idle
s32 N(ShuffleAnims)[] = {
STATUS_KEY_NORMAL, ANIM_GoombaBros_Blue_Run,
STATUS_KEY_STONE, ANIM_GoombaBros_Blue_Still,
STATUS_KEY_SLEEP, ANIM_GoombaBros_Blue_Sleep,
@ -107,82 +112,82 @@ s32 N(IdleAnimations_8021D550)[] = {
STATUS_END,
};
EvtScript N(init_8021D59C) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021E0F0)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021D5E8)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021D8C4)))
EvtScript N(EVS_Init_Inner) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_RETURN
EVT_END
};
EvtScript N(idle_8021D5E8) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(10)
EVT_CALL(RandInt, 80, LVar0)
EVT_ADD(LVar0, 80)
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_CALL(RandInt, 80, LVar0)
EVT_ADD(LVar0, 80)
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021D550)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021D504)))
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims)))
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021D550)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021D504)))
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims)))
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_GOTO(10)
EVT_END_LOOP
EVT_GOTO(10)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_8021D8C4) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(9)
EVT_CASE_OR_EQ(10)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(14)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_GoombaBros_Blue_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_CASE_EQ(36)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_GoombaBros_Blue_BurnStill)
@ -191,11 +196,11 @@ EvtScript N(handleEvent_8021D8C4) = {
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(11)
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_CASE_EQ(33)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
@ -203,7 +208,7 @@ EvtScript N(handleEvent_8021D8C4) = {
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(47)
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
@ -221,7 +226,7 @@ EvtScript N(handleEvent_8021D8C4) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CASE_EQ(38)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
@ -229,15 +234,16 @@ EvtScript N(handleEvent_8021D8C4) = {
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(19)
EVT_CASE_OR_EQ(23)
EVT_CASE_OR_EQ(25)
EVT_CASE_OR_EQ(31)
EVT_CASE_EQ(EVENT_STAR_BEAM)
// do nothing
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Idle)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(32)
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
@ -246,7 +252,7 @@ EvtScript N(handleEvent_8021D8C4) = {
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(53)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Run)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
@ -254,21 +260,21 @@ EvtScript N(handleEvent_8021D8C4) = {
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(49)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Idle)
EVT_EXEC_WAIT(EVS_Enemy_Recover)
EVT_CASE_EQ(57)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Run)
EVT_SET_CONST(LVar2, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ScareAway)
EVT_RETURN
EVT_CASE_EQ(58)
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Run)
EVT_EXEC_WAIT(EVS_Enemy_AirLift)
EVT_CASE_EQ(22)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_BlowAway)
@ -276,7 +282,7 @@ EvtScript N(handleEvent_8021D8C4) = {
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -284,9 +290,9 @@ EvtScript N(handleEvent_8021D8C4) = {
#include "common/CalculateArcsinDeg.inc.c"
EvtScript N(takeTurn_8021E0F0) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
@ -344,8 +350,8 @@ EvtScript N(takeTurn_8021E0F0) = {
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Hurt)
EVT_WAIT(5)
EVT_IF_EQ(LVarA, 5)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0x80000000, 0, 0, 0)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
@ -384,7 +390,7 @@ EvtScript N(takeTurn_8021E0F0) = {
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
@ -415,7 +421,7 @@ EvtScript N(takeTurn_8021E0F0) = {
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_END_SWITCH
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
@ -450,18 +456,23 @@ EvtScript N(takeTurn_8021E0F0) = {
EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
#include "common/DivActorLevel4.inc.c"
API_CALLABLE(N(ReduceLevel)) {
ActorBlueprint* actorData = get_actor(script->owner1.actorID)->actorBlueprint;
EvtScript N(init_8021EDB8) = {
EVT_EXEC_WAIT(N(init_8021D59C))
actorData->level /= 4;
return ApiStatus_DONE2;
}
EvtScript N(EVS_Init) = {
EVT_EXEC_WAIT(N(EVS_Init_Inner))
EVT_CALL(SetEnemyHP, ACTOR_SELF, 2)
EVT_CALL(N(DivActorLevel4))
EVT_CALL(N(ReduceLevel))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,11 @@
#ifndef _GOOMBA_BROS_COMMON_H_
#define _GOOMBA_BROS_COMMON_H_
enum N(BattleCommon) {
ACTOR_BLUE_GOOMBA = ACTOR_ENEMY0,
ACTOR_RED_GOOMBA = ACTOR_ENEMY1,
PRT_BLUE_MAIN = 1,
PRT_RED_MAIN = 1,
};
#endif // _GOOMBA_BROS_COMMON_H_

View File

@ -1,19 +1,41 @@
#include "../area.h"
#include "sprite/npc/GoombaKing.h"
#include "sprite/npc/GoombaBros.h"
#include "sprite/player.h"
#include "goomba_king_common.h"
#define NAMESPACE A(goomba_king)
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_HandlePhase);
extern EvtScript N(EVS_ShakeScreenWhileWalking);
extern EvtScript N(EVS_Attack_GroundStomp);
extern EvtScript N(EVS_Attack_SpinSwipe);
extern EvtScript N(EVS_GoombaKing_Death);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
PRT_2 = 2,
// note: these reference the goomnut tree actor
PRT_TREE_3 = 3,
PRT_TREE_4 = 4,
PRT_TREE_5 = 5,
PRT_MAIN = 1,
PRT_TARGET = 2,
};
s32 N(IdleAnimations_80220800)[] = {
enum N(ActorVars) {
AVAR_Unused_0 = 0,
AVAR_Unused_1 = 1,
AVAR_IncreaseShaking = 2, // when TRUE walking around causes more camera shaking
AVAR_Scene_BeginBattle = 3,
AVAR_ScreenShakingScriptID = 4,
AVAR_Unused_5 = 5,
};
enum N(ActorParams) {
DMG_SPIN = 1,
DMG_STOMP = 2,
};
s32 N(DefaultAnims)[] = {
STATUS_KEY_NORMAL, ANIM_GoombaKing_Idle,
STATUS_KEY_STONE, ANIM_GoombaKing_Still,
STATUS_KEY_SLEEP, ANIM_GoombaKing_Sleep,
@ -25,7 +47,8 @@ s32 N(IdleAnimations_80220800)[] = {
STATUS_END,
};
s32 N(IdleAnimations_80220844)[] = {
// while shuffling around during idle
s32 N(ShuffleAnims)[] = {
STATUS_KEY_NORMAL, ANIM_GoombaKing_Run,
STATUS_KEY_STONE, ANIM_GoombaKing_Still,
STATUS_KEY_SLEEP, ANIM_GoombaKing_Sleep,
@ -37,7 +60,7 @@ s32 N(IdleAnimations_80220844)[] = {
STATUS_END,
};
s32 N(IdleAnimations_80220888)[] = {
s32 N(UnusedDizzyAnims)[] = {
STATUS_KEY_NORMAL, ANIM_GoombaKing_Dizzy,
STATUS_KEY_STONE, ANIM_GoombaKing_Still,
STATUS_KEY_SLEEP, ANIM_GoombaKing_Sleep,
@ -49,7 +72,7 @@ s32 N(IdleAnimations_80220888)[] = {
STATUS_END,
};
s32 N(IdleAnimations_802208CC)[] = {
s32 N(UnusedAngryAnims)[] = {
STATUS_KEY_NORMAL, ANIM_GoombaKing_Angry,
STATUS_KEY_STONE, ANIM_GoombaKing_Still,
STATUS_KEY_SLEEP, ANIM_GoombaKing_Sleep,
@ -61,12 +84,12 @@ s32 N(IdleAnimations_802208CC)[] = {
STATUS_END,
};
s32 N(DefenseTable_80220910)[] = {
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(StatusTable_8022091C)[] = {
s32 N(StatusTable)[] = {
STATUS_KEY_NORMAL, 0,
STATUS_KEY_DEFAULT, 0,
STATUS_KEY_SLEEP, 100,
@ -91,52 +114,42 @@ s32 N(StatusTable_8022091C)[] = {
STATUS_END,
};
ActorPartBlueprint N(ActorParts_802209C8)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_20 | ACTOR_PART_FLAG_NO_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -25, 15 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_80220800),
.defenseTable = N(DefenseTable_80220910),
.idleAnimations = N(DefaultAnims),
.defenseTable = N(DefenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_20 | ACTOR_PART_FLAG_MULTI_TARGET,
.index = PRT_2,
.index = PRT_TARGET,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 80 },
.opacity = 255,
.idleAnimations = NULL,
.defenseTable = N(DefenseTable_80220910),
.defenseTable = N(DefenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, 0 },
},
};
extern EvtScript N(init_80220A38);
extern EvtScript N(takeTurn_80221530);
extern EvtScript N(idle_80220B50);
extern EvtScript N(handleEvent_80220F34);
extern EvtScript N(nextTurn_802229C4);
extern EvtScript N(80222D9C);
extern EvtScript N(80221CD4);
extern EvtScript N(80221680);
extern EvtScript N(doDeath_80222F50);
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_GOOMBA_KING,
.level = 49,
.level = ACTOR_LEVEL_GOOMBA_KING,
.maxHP = 10,
.partCount = ARRAY_COUNT( N(ActorParts_802209C8)),
.partsData = N(ActorParts_802209C8),
.initScript = &N(init_80220A38),
.statusTable = N(StatusTable_8022091C),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
.hurricaneChance = 0,
@ -151,73 +164,74 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 12, 75 },
};
// Unused function
API_CALLABLE(func_80218A60_43A4F0) {
// Unused
API_CALLABLE(N(SpawnImpactDustFX)) {
Bytecode* args = script->ptrReadPos;
s32 var1 = evt_get_variable(script, *args++);
s32 var2 = evt_get_variable(script, *args++);
s32 x = evt_get_variable(script, *args++);
s32 y = evt_get_variable(script, *args++);
s32 z = evt_get_variable(script, *args++);
fx_landing_dust(2, var1, var2, evt_get_variable(script, *args++), 0);
fx_landing_dust(2, x, y, z, 0);
return ApiStatus_DONE2;
}
EvtScript N(init_80220A38) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_80221530)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_80220B50)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_80220F34)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn_802229C4)))
EVT_EXEC_GET_TID(N(80222D9C), LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, 4, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 5, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 6, 0)
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_EXEC_GET_TID(N(EVS_ShakeScreenWhileWalking), LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScreenShakingScriptID, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IncreaseShaking, FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Scene_BeginBattle, FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_5, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TREE_DELAY, 0)
EVT_RETURN
EVT_END
};
EvtScript N(idle_80220B50) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(0)
EVT_CALL(RandInt, 80, LVar0)
EVT_ADD(LVar0, 80)
EVT_WAIT(LVar0)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_80220844)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_80220800)))
EVT_WAIT(20)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_80220844)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_80220800)))
EVT_WAIT(80)
EVT_GOTO(0)
EVT_CALL(RandInt, 80, LVar0)
EVT_ADD(LVar0, 80)
EVT_WAIT(LVar0)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims)))
EVT_WAIT(20)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims)))
EVT_WAIT(80)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80220DB0) = {
EvtScript A(EVS_Lee_ShockKnockback) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -237,89 +251,89 @@ EvtScript N(80220DB0) = {
EVT_END
};
EvtScript N(handleEvent_80220F34) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(9)
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_CASE_EQ(10)
EVT_CASE_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_CASE_EQ(14)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_GoombaKing_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_CASE_EQ(11)
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_CASE_EQ(47)
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead)
EVT_EXEC_WAIT(N(80220DB0))
EVT_EXEC_WAIT(A(EVS_Lee_ShockKnockback))
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_Run)
EVT_EXEC_WAIT(EVS_Enemy_ReturnHome)
EVT_CASE_EQ(38)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
EVT_CALL(GetActorVar, ACTOR_SELF, 4, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScreenShakingScriptID, LVar0)
EVT_KILL_THREAD(LVar0)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead)
EVT_EXEC_WAIT(N(doDeath_80222F50))
EVT_EXEC_WAIT(N(EVS_GoombaKing_Death))
EVT_RETURN
EVT_CASE_OR_EQ(23)
EVT_CASE_OR_EQ(25)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_Idle)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(32)
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_WAIT(10)
EVT_CALL(GetActorVar, ACTOR_SELF, 4, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScreenShakingScriptID, LVar0)
EVT_KILL_THREAD(LVar0)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead)
EVT_EXEC_WAIT(N(doDeath_80222F50))
EVT_EXEC_WAIT(N(EVS_GoombaKing_Death))
EVT_RETURN
EVT_CASE_EQ(36)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_GoombaKing_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_WAIT(10)
EVT_CALL(GetActorVar, ACTOR_SELF, 4, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScreenShakingScriptID, LVar0)
EVT_KILL_THREAD(LVar0)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_BurnStill)
EVT_EXEC_WAIT(N(doDeath_80222F50))
EVT_EXEC_WAIT(N(EVS_GoombaKing_Death))
EVT_RETURN
EVT_CASE_EQ(33)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_CALL(GetActorVar, ACTOR_SELF, 4, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScreenShakingScriptID, LVar0)
EVT_KILL_THREAD(LVar0)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead)
EVT_EXEC_WAIT(N(doDeath_80222F50))
EVT_EXEC_WAIT(N(EVS_GoombaKing_Death))
EVT_RETURN
EVT_CASE_EQ(42)
EVT_CASE_EQ(EVENT_SPIKE_CONTACT)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Dead)
EVT_WAIT(20)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Run)
@ -327,51 +341,51 @@ EvtScript N(handleEvent_80220F34) = {
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle)
EVT_CASE_EQ(53)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_Idle)
EVT_EXEC_WAIT(EVS_Enemy_ReturnHome)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(49)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaKing_Idle)
EVT_EXEC_WAIT(EVS_Enemy_Recover)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_80221530) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x80000)
EVT_CALL(GetActorVar, ACTOR_ENEMY3, 6, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(GetActorVar, ACTOR_TREE, AVAR_TREE_DELAY, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(RandInt, 100, LVar1)
EVT_IF_LT(LVar1, 60)
EVT_SUB(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_ENEMY3, 6, LVar0)
EVT_EXEC_WAIT(N(80221CD4))
EVT_CALL(SetActorVar, ACTOR_TREE, AVAR_TREE_DELAY, LVar0)
EVT_EXEC_WAIT(N(EVS_Attack_GroundStomp))
EVT_RETURN
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_EXEC_WAIT(N(80221680))
EVT_EXEC_WAIT(N(EVS_Attack_SpinSwipe))
EVT_RETURN
EVT_RETURN
EVT_END
};
EvtScript N(80221680) = {
EvtScript N(EVS_Attack_SpinSwipe) = {
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x80000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
EVT_CALL(AddBattleCamZoom, -100)
EVT_CALL(SetBattleCamOffsetZ, 20)
@ -387,7 +401,7 @@ EvtScript N(80221680) = {
EVT_END_IF
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x80000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 32, 0, 0)
EVT_ELSE
@ -416,8 +430,8 @@ EvtScript N(80221680) = {
EVT_SWITCH(LVarA)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_IF_EQ(LVarA, 5)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0x80000000, 0, 0, 0)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Dizzy)
EVT_SET(LVar0, 0)
@ -435,7 +449,7 @@ EvtScript N(80221680) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Run)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
@ -444,7 +458,7 @@ EvtScript N(80221680) = {
EVT_CALL(MoveBattleCamOver, 20)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarA, 0, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarA, 0, 0, 0, DMG_SPIN, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
@ -459,13 +473,13 @@ EvtScript N(80221680) = {
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle)
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(80221CD4) = {
EvtScript N(EVS_Attack_GroundStomp) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_15)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 40)
@ -483,7 +497,7 @@ EvtScript N(80221CD4) = {
EVT_THREAD
EVT_CALL(StartRumble, 11)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x80000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(4.0))
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle)
@ -497,180 +511,180 @@ EvtScript N(80221CD4) = {
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_THREAD
EVT_WAIT(12)
EVT_CALL(PlaySoundAtPart, ACTOR_ENEMY3, PRT_TREE_3, SOUND_0301)
EVT_CALL(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_1, SOUND_FALL_QUICK)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(10)
EVT_CALL(SetPartJumpGravity, ACTOR_ENEMY3, PRT_TREE_3, EVT_FLOAT(1.5))
EVT_CALL(GetPartOffset, ACTOR_ENEMY3, PRT_TREE_3, LVar0, LVar1, LVar2)
EVT_CALL(FallPartTo, ACTOR_ENEMY3, PRT_TREE_3, LVar0, 10, LVar2, 14)
EVT_CALL(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_1, EVT_FLOAT(1.5))
EVT_CALL(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, LVar1, LVar2)
EVT_CALL(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 10, LVar2, 14)
EVT_SUB(LVar0, 12)
EVT_CALL(JumpPartTo, ACTOR_ENEMY3, PRT_TREE_3, LVar0, 10, LVar2, 10, TRUE)
EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 10, LVar2, 10, TRUE)
EVT_SUB(LVar0, 7)
EVT_CALL(JumpPartTo, ACTOR_ENEMY3, PRT_TREE_3, LVar0, 10, LVar2, 7, TRUE)
EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 10, LVar2, 7, TRUE)
EVT_LOOP(20)
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY3, PRT_TREE_3, 1, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_1, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY3, PRT_TREE_3, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_1, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(5)
EVT_CALL(PlaySoundAtPart, ACTOR_ENEMY3, PRT_TREE_4, SOUND_0301)
EVT_CALL(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_2, SOUND_FALL_QUICK)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(3)
EVT_CALL(SetPartJumpGravity, ACTOR_ENEMY3, PRT_TREE_4, EVT_FLOAT(1.5))
EVT_CALL(GetPartOffset, ACTOR_ENEMY3, PRT_TREE_4, LVar0, LVar1, LVar2)
EVT_CALL(FallPartTo, ACTOR_ENEMY3, PRT_TREE_4, LVar0, 10, LVar2, 15)
EVT_CALL(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_2, EVT_FLOAT(1.5))
EVT_CALL(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, LVar1, LVar2)
EVT_CALL(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 15)
EVT_SUB(LVar0, 12)
EVT_CALL(JumpPartTo, ACTOR_ENEMY3, PRT_TREE_4, LVar0, 10, LVar2, 10, TRUE)
EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 10, TRUE)
EVT_SUB(LVar0, 7)
EVT_CALL(JumpPartTo, ACTOR_ENEMY3, PRT_TREE_4, LVar0, 10, LVar2, 7, TRUE)
EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 7, TRUE)
EVT_LOOP(20)
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY3, PRT_TREE_4, 1, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_2, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY3, PRT_TREE_4, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_2, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(17)
EVT_CALL(PlaySoundAtPart, ACTOR_ENEMY3, PRT_TREE_5, SOUND_0301)
EVT_CALL(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_3, SOUND_FALL_QUICK)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(15)
EVT_CALL(SetPartJumpGravity, ACTOR_ENEMY3, PRT_TREE_5, EVT_FLOAT(1.5))
EVT_CALL(GetPartOffset, ACTOR_ENEMY3, PRT_TREE_5, LVar0, LVar1, LVar2)
EVT_CALL(FallPartTo, ACTOR_ENEMY3, PRT_TREE_5, LVar0, 10, LVar2, 17)
EVT_CALL(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_3, EVT_FLOAT(1.5))
EVT_CALL(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, LVar1, LVar2)
EVT_CALL(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 17)
EVT_ADD(LVar0, 12)
EVT_CALL(JumpPartTo, ACTOR_ENEMY3, PRT_TREE_5, LVar0, 10, LVar2, 10, TRUE)
EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 10, TRUE)
EVT_ADD(LVar0, 7)
EVT_CALL(JumpPartTo, ACTOR_ENEMY3, PRT_TREE_5, LVar0, 10, LVar2, 7, TRUE)
EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 7, TRUE)
EVT_LOOP(20)
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY3, PRT_TREE_5, 1, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_3, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY3, PRT_TREE_5, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_3, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_WAIT(15)
EVT_IF_EQ(LVarA, 5)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0x80000000, 0, 0, 0)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_THREAD
EVT_WAIT(12)
EVT_CALL(PlaySoundAtPart, ACTOR_ENEMY3, PRT_TREE_3, SOUND_0301)
EVT_CALL(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_1, SOUND_FALL_QUICK)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(10)
EVT_CALL(SetPartJumpGravity, ACTOR_ENEMY3, PRT_TREE_3, EVT_FLOAT(1.5))
EVT_CALL(GetPartOffset, ACTOR_ENEMY3, PRT_TREE_3, LVar0, LVar1, LVar2)
EVT_CALL(FallPartTo, ACTOR_ENEMY3, PRT_TREE_3, LVar0, 35, LVar2, 14)
EVT_CALL(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_1, EVT_FLOAT(1.5))
EVT_CALL(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, LVar1, LVar2)
EVT_CALL(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 35, LVar2, 14)
EVT_SUB(LVar0, 12)
EVT_CALL(JumpPartTo, ACTOR_ENEMY3, PRT_TREE_3, LVar0, 10, LVar2, 10, TRUE)
EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 10, LVar2, 10, TRUE)
EVT_SUB(LVar0, 7)
EVT_CALL(JumpPartTo, ACTOR_ENEMY3, PRT_TREE_3, LVar0, 10, LVar2, 7, TRUE)
EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 10, LVar2, 7, TRUE)
EVT_LOOP(20)
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY3, PRT_TREE_3, 1, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_1, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY3, PRT_TREE_3, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_1, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(5)
EVT_CALL(PlaySoundAtPart, ACTOR_ENEMY3, PRT_TREE_4, SOUND_0301)
EVT_CALL(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_2, SOUND_FALL_QUICK)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(3)
EVT_CALL(SetPartJumpGravity, ACTOR_ENEMY3, PRT_TREE_4, EVT_FLOAT(1.5))
EVT_CALL(GetPartOffset, ACTOR_ENEMY3, PRT_TREE_4, LVar0, LVar1, LVar2)
EVT_CALL(FallPartTo, ACTOR_ENEMY3, PRT_TREE_4, LVar0, 10, LVar2, 15)
EVT_CALL(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_2, EVT_FLOAT(1.5))
EVT_CALL(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, LVar1, LVar2)
EVT_CALL(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 15)
EVT_SUB(LVar0, 12)
EVT_CALL(JumpPartTo, ACTOR_ENEMY3, PRT_TREE_4, LVar0, 10, LVar2, 10, TRUE)
EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 10, TRUE)
EVT_SUB(LVar0, 7)
EVT_CALL(JumpPartTo, ACTOR_ENEMY3, PRT_TREE_4, LVar0, 10, LVar2, 7, TRUE)
EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 7, TRUE)
EVT_LOOP(20)
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY3, PRT_TREE_4, 1, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_2, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY3, PRT_TREE_4, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_2, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(17)
EVT_CALL(PlaySoundAtPart, ACTOR_ENEMY3, PRT_TREE_5, SOUND_0301)
EVT_CALL(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_3, SOUND_FALL_QUICK)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(15)
EVT_CALL(SetPartJumpGravity, ACTOR_ENEMY3, PRT_TREE_5, EVT_FLOAT(1.5))
EVT_CALL(GetPartOffset, ACTOR_ENEMY3, PRT_TREE_5, LVar0, LVar1, LVar2)
EVT_CALL(FallPartTo, ACTOR_ENEMY3, PRT_TREE_5, LVar0, 10, LVar2, 17)
EVT_CALL(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_3, EVT_FLOAT(1.5))
EVT_CALL(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, LVar1, LVar2)
EVT_CALL(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 17)
EVT_ADD(LVar0, 12)
EVT_CALL(JumpPartTo, ACTOR_ENEMY3, PRT_TREE_5, LVar0, 10, LVar2, 10, TRUE)
EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 10, TRUE)
EVT_ADD(LVar0, 7)
EVT_CALL(JumpPartTo, ACTOR_ENEMY3, PRT_TREE_5, LVar0, 10, LVar2, 7, TRUE)
EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 7, TRUE)
EVT_LOOP(20)
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY3, PRT_TREE_5, 1, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_3, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY3, PRT_TREE_5, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_3, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_WAIT(24)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_STOMP, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(10)
EVT_CASE_EQ(HIT_RESULT_10)
EVT_RETURN
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(nextTurn_802229C4) = {
EvtScript N(EVS_HandlePhase) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetBattlePhase, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(10)
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CASE_EQ(PHASE_PLAYER_BEGIN)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Scene_BeginBattle, LVar0)
EVT_IF_EQ(LVar0, FALSE)
EVT_CALL(EnableBattleStatusBar, FALSE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13)
EVT_CALL(BattleCamTargetActor, ACTOR_ENEMY1)
EVT_CALL(BattleCamTargetActor, ACTOR_RED_GOOMBA)
EVT_CALL(MoveBattleCamOver, 20)
EVT_WAIT(20)
EVT_CALL(UseIdleAnimation, ACTOR_ENEMY1, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_ENEMY1, 0)
EVT_CALL(ActorSpeak, MSG_CH0_00CB, ACTOR_ENEMY1, PRT_MAIN, 0x0062000A, 0x0062000A)
EVT_CALL(EnableIdleScript, ACTOR_ENEMY1, 1)
EVT_CALL(UseIdleAnimation, ACTOR_ENEMY1, TRUE)
EVT_CALL(UseIdleAnimation, ACTOR_RED_GOOMBA, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_DISABLE)
EVT_CALL(ActorSpeak, MSG_CH0_00CB, ACTOR_RED_GOOMBA, PRT_MAIN, ANIM_GoombaBros_Red_Talk, ANIM_GoombaBros_Red_Talk)
EVT_CALL(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_RED_GOOMBA, TRUE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13)
EVT_CALL(BattleCamTargetActor, ACTOR_ENEMY2)
EVT_CALL(BattleCamTargetActor, ACTOR_BLUE_GOOMBA)
EVT_CALL(MoveBattleCamOver, 10)
EVT_WAIT(10)
EVT_CALL(UseIdleAnimation, ACTOR_ENEMY2, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_ENEMY2, 0)
EVT_CALL(ActorSpeak, MSG_CH0_00CC, ACTOR_ENEMY2, PRT_MAIN, 0x0062010A, 0x0062010A)
EVT_CALL(EnableIdleScript, ACTOR_ENEMY2, 1)
EVT_CALL(UseIdleAnimation, ACTOR_ENEMY2, TRUE)
EVT_CALL(UseIdleAnimation, ACTOR_BLUE_GOOMBA, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_DISABLE)
EVT_CALL(ActorSpeak, MSG_CH0_00CC, ACTOR_BLUE_GOOMBA, PRT_MAIN, ANIM_GoombaBros_Blue_Talk, ANIM_GoombaBros_Blue_Talk)
EVT_CALL(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_BLUE_GOOMBA, TRUE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_ENEMY0)
EVT_CALL(BattleCamTargetActor, ACTOR_KING)
EVT_CALL(MoveBattleCamOver, 20)
EVT_WAIT(20)
EVT_CALL(ActorSpeak, MSG_CH0_00CD, ACTOR_ENEMY0, PRT_MAIN, 0x00630009, 0x00630009)
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 1)
EVT_CALL(ActorSpeak, MSG_CH0_00CD, ACTOR_KING, PRT_MAIN, ANIM_GoombaKing_Angry, ANIM_GoombaKing_Angry)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Scene_BeginBattle, TRUE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_PLAYER)
EVT_CALL(MoveBattleCamOver, 10)
@ -690,45 +704,45 @@ EvtScript N(nextTurn_802229C4) = {
EVT_CALL(EnableBattleStatusBar, TRUE)
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(80222D9C) = {
EvtScript N(EVS_ShakeScreenWhileWalking) = {
EVT_LABEL(0)
EVT_WAIT(1)
EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_IF_NE(LVar0, 6488068)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_IF_NE(LVar0, 6488068)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(StartRumble, 1)
EVT_CALL(func_8026DF88, ACTOR_SELF, 1, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x80000)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2))
EVT_END_IF
EVT_ELSE
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x80000)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.7))
EVT_WAIT(1)
EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_IF_NE(LVar0, ANIM_GoombaKing_Run)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_IF_NE(LVar0, ANIM_GoombaKing_Run)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(StartRumble, 1)
EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IncreaseShaking, LVar0)
EVT_IF_EQ(LVar0, FALSE)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2))
EVT_END_IF
EVT_ELSE
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.7))
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_GOTO(0)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(doDeath_80222F50) = {
EvtScript N(EVS_GoombaKing_Death) = {
EVT_CALL(HideHealthBar, ACTOR_SELF)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_SET(LVar2, 0)
@ -750,30 +764,30 @@ EvtScript N(doDeath_80222F50) = {
EVT_ADD(LVar3, 8)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, 1, TRUE)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 4, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE)
EVT_WAIT(30)
EVT_CALL(ActorExists, ACTOR_ENEMY1, LVar0)
EVT_CALL(ActorExists, ACTOR_RED_GOOMBA, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(GetActorHP, ACTOR_ENEMY1, LVar0)
EVT_CALL(GetActorHP, ACTOR_RED_GOOMBA, LVar0)
EVT_END_IF
EVT_IF_NE(LVar0, 0)
EVT_CALL(UseIdleAnimation, ACTOR_ENEMY1, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_ENEMY1, 0)
EVT_CALL(ActorSpeak, MSG_CH0_00CF, ACTOR_ENEMY1, PRT_MAIN, 0x0062000B, 0x0062000B)
EVT_CALL(EnableIdleScript, ACTOR_ENEMY1, 1)
EVT_CALL(UseIdleAnimation, ACTOR_ENEMY1, TRUE)
EVT_CALL(UseIdleAnimation, ACTOR_RED_GOOMBA, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_DISABLE)
EVT_CALL(ActorSpeak, MSG_CH0_00CF, ACTOR_RED_GOOMBA, PRT_MAIN, ANIM_GoombaBros_Red_CryTalk, ANIM_GoombaBros_Red_CryTalk)
EVT_CALL(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_RED_GOOMBA, TRUE)
EVT_END_IF
EVT_CALL(ActorExists, ACTOR_ENEMY2, LVar0)
EVT_CALL(ActorExists, ACTOR_BLUE_GOOMBA, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(GetActorHP, ACTOR_ENEMY2, LVar0)
EVT_CALL(GetActorHP, ACTOR_BLUE_GOOMBA, LVar0)
EVT_END_IF
EVT_IF_NE(LVar0, 0)
EVT_CALL(UseIdleAnimation, ACTOR_ENEMY2, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_ENEMY2, 0)
EVT_CALL(ActorSpeak, MSG_CH0_00D0, ACTOR_ENEMY2, PRT_MAIN, 0x0062010B, 0x0062010B)
EVT_CALL(EnableIdleScript, ACTOR_ENEMY2, 1)
EVT_CALL(UseIdleAnimation, ACTOR_ENEMY2, TRUE)
EVT_CALL(UseIdleAnimation, ACTOR_BLUE_GOOMBA, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_DISABLE)
EVT_CALL(ActorSpeak, MSG_CH0_00D0, ACTOR_BLUE_GOOMBA, PRT_MAIN, ANIM_GoombaBros_Blue_CryTalk, ANIM_GoombaBros_Blue_CryTalk)
EVT_CALL(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_BLUE_GOOMBA, TRUE)
EVT_END_IF
EVT_CALL(RemoveActor, ACTOR_SELF)
EVT_RETURN

View File

@ -0,0 +1,15 @@
#ifndef _GOOMBA_KING_COMMON_H_
#define _GOOMBA_KING_COMMON_H_
enum N(BattleCommon) {
ACTOR_KING = ACTOR_ENEMY0,
ACTOR_RED_GOOMBA = ACTOR_ENEMY1,
ACTOR_BLUE_GOOMBA = ACTOR_ENEMY2,
ACTOR_TREE = ACTOR_ENEMY3,
PRT_TREE_NUT_1 = 3,
PRT_TREE_NUT_2 = 4,
PRT_TREE_NUT_3 = 5,
AVAR_TREE_DELAY = 6,
};
#endif // _GOOMBA_BROS_COMMON_H_

View File

@ -1,28 +1,51 @@
#include "../area.h"
#include "sprite/npc/SpikyGoomnut.h"
#include "mapfs/kmr_bt06_shape.h"
#include "goomba_king_common.h"
#define NAMESPACE A(goomnut_tree)
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_TriggerTreeShake);
extern EvtScript N(EVS_DropNutOnGoombas);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
PRT_2 = 2,
PRT_3 = 3,
PRT_4 = 4,
PRT_5 = 5,
PRT_MAIN = 1,
PRT_BIG_NUT = 2,
// more parts listed in goomba_king_common.h
};
s32 N(IdleAnimations_802232D0)[] = {
enum N(ActorVars) {
AVAR_Unused_0 = 0,
AVAR_Unused_1 = 1,
AVAR_Unused_2 = 2,
AVAR_Unused_3 = 3,
AVAR_Unused_4 = 4,
AVAR_BigNutDropped = 5,
// another var listed in goomba_king_common.h
};
enum N(ActorParams) {
DMG_TO_KING = 3,
DMG_TO_RED_GOOMBA = 3,
DMG_TO_BLUE_GOOMBA = 3,
};
s32 N(DefaultAnims)[] = {
STATUS_KEY_NORMAL, ANIM_SpikyGoomnut_Still,
STATUS_END,
};
s32 N(DefenseTable_802232DC)[] = {
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_SMASH, 0,
ELEMENT_END,
};
s32 N(StatusTable_802232F0)[] = {
s32 N(StatusTable)[] = {
STATUS_KEY_NORMAL, 0,
STATUS_KEY_DEFAULT, 0,
STATUS_KEY_SLEEP, 0,
@ -47,14 +70,7 @@ s32 N(StatusTable_802232F0)[] = {
STATUS_END,
};
extern EvtScript N(init_80223488);
extern EvtScript N(takeTurn_80223804);
extern EvtScript N(idle_80223678);
extern EvtScript N(handleEvent_80223688);
extern EvtScript N(shake_goomnut_tree);
extern EvtScript N(80223DBC);
ActorPartBlueprint N(ActorParts_8022339C)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = PRT_MAIN,
@ -62,55 +78,55 @@ ActorPartBlueprint N(ActorParts_8022339C)[] = {
.targetOffset = { 0, 10 },
.opacity = 255,
.idleAnimations = NULL,
.defenseTable = N(DefenseTable_802232DC),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_2,
.index = PRT_BIG_NUT,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 10 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_802232D0),
.defenseTable = N(DefenseTable_802232DC),
.idleAnimations = N(DefaultAnims),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_3,
.index = PRT_TREE_NUT_1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 10 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_802232D0),
.defenseTable = N(DefenseTable_802232DC),
.idleAnimations = N(DefaultAnims),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_4,
.index = PRT_TREE_NUT_2,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 10 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_802232D0),
.defenseTable = N(DefenseTable_802232DC),
.idleAnimations = N(DefaultAnims),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_5,
.index = PRT_TREE_NUT_3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 10 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_802232D0),
.defenseTable = N(DefenseTable_802232DC),
.idleAnimations = N(DefaultAnims),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, 0 },
@ -120,12 +136,12 @@ ActorPartBlueprint N(ActorParts_8022339C)[] = {
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_TARGET_ONLY | ACTOR_FLAG_NO_DMG_POPUP,
.type = ACTOR_TYPE_GOOMNUT_TREE,
.level = 1,
.level = ACTOR_LEVEL_GOOMNUT_TREE,
.maxHP = 255,
.partCount = ARRAY_COUNT( N(ActorParts_8022339C)),
.partsData = N(ActorParts_8022339C),
.initScript = &N(init_80223488),
.statusTable = N(StatusTable_802232F0),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
.hurricaneChance = 0,
@ -140,74 +156,74 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 0, 0 },
};
// Perhaps a status table
s32 N(unk_missing_80223478)[] = {
2, 0,
1, 0,
EvtScript N(EVS_UnusedStub) = {
EVT_RETURN
EVT_END
};
EvtScript N(init_80223488) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_80223804)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_80223678)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_80223688)))
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 4, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 5, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 6, 1)
EVT_CALL(SetPartPos, ACTOR_SELF, PRT_2, 10, 140, 10)
EVT_CALL(SetPartPos, ACTOR_SELF, PRT_3, -95, 140, 10)
EVT_CALL(SetPartPos, ACTOR_SELF, PRT_4, -115, 130, 0)
EVT_CALL(SetPartPos, ACTOR_SELF, PRT_5, -65, 118, 5)
EVT_CALL(SetPartScale, ACTOR_SELF, PRT_3, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_CALL(SetPartScale, ACTOR_SELF, PRT_4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_CALL(SetPartScale, ACTOR_SELF, PRT_5, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_2, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_3, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_4, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BigNutDropped, FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TREE_DELAY, 1)
EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BIG_NUT, 10, 140, 10)
EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TREE_NUT_1, -95, 140, 10)
EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TREE_NUT_2, -115, 130, 0)
EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TREE_NUT_3, -65, 118, 5)
EVT_CALL(SetPartScale, ACTOR_SELF, PRT_TREE_NUT_1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_CALL(SetPartScale, ACTOR_SELF, PRT_TREE_NUT_2, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_CALL(SetPartScale, ACTOR_SELF, PRT_TREE_NUT_3, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_TARGET_FLAG_4, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(idle_80223678) = {
EvtScript N(EVS_Idle) = {
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_80223688) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetLastElement, LVarE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(9)
EVT_CASE_OR_EQ(23)
EVT_EXEC_WAIT(N(shake_goomnut_tree))
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_EXEC_WAIT(N(EVS_TriggerTreeShake))
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(10)
EVT_CASE_OR_EQ(25)
EVT_EXEC_WAIT(N(shake_goomnut_tree))
EVT_EXEC_WAIT(N(80223DBC))
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_EXEC_WAIT(N(EVS_TriggerTreeShake))
EVT_EXEC_WAIT(N(EVS_DropNutOnGoombas))
EVT_END_CASE_GROUP
EVT_CASE_EQ(11)
EVT_EXEC_WAIT(N(shake_goomnut_tree))
EVT_EXEC_WAIT(N(80223DBC))
EVT_CASE_EQ(32)
EVT_EXEC_WAIT(N(shake_goomnut_tree))
EVT_CASE_EQ(33)
EVT_EXEC_WAIT(N(shake_goomnut_tree))
EVT_CASE_EQ(42)
EVT_CASE_EQ(47)
EVT_CASE_EQ(53)
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_EXEC_WAIT(N(EVS_TriggerTreeShake))
EVT_EXEC_WAIT(N(EVS_DropNutOnGoombas))
EVT_CASE_EQ(EVENT_DEATH)
EVT_EXEC_WAIT(N(EVS_TriggerTreeShake))
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_EXEC_WAIT(N(EVS_TriggerTreeShake))
EVT_CASE_EQ(EVENT_SPIKE_CONTACT)
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_80223804) = {
// unclear what values LVar0 could have here
EvtScript N(EVS_TakeTurn) = {
EVT_SWITCH(LVar0)
EVT_CASE_EQ(6)
EVT_RETURN
@ -216,7 +232,7 @@ EvtScript N(takeTurn_80223804) = {
EVT_CASE_EQ(0)
EVT_CASE_EQ(10)
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -230,8 +246,8 @@ EvtScript N(EVS_ShakeTree) = {
EVT_BUF_READ4(LVar1, LVar2, LVar3, LVar4)
EVT_BUF_READ1(LVar5)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar6, LVarF, LVar8)
EVT_CALL(PlaySound, SOUND_SMASH_GOOMNUT_TREE)
EVT_CALL(PlaySound, SOUND_SHAKE_TREE)
EVT_CALL(PlaySound, SOUND_SMACK_TREE)
EVT_CALL(PlaySound, SOUND_SHAKE_TREE_LEAVES)
EVT_THREAD
EVT_SET(LFlag0, FALSE)
EVT_IF_NE(LVar1, 0)
@ -244,7 +260,7 @@ EvtScript N(EVS_ShakeTree) = {
EVT_CALL(N(TransformFoliage), LVar3, EVT_FLOAT(0.1), EVT_FLOAT(0.2), LVarF, 0)
EVT_IF_EQ(LFlag0, FALSE)
EVT_SET(LFlag0, TRUE)
EVT_CALL(PlaySoundAtModel, LVar3, SOUND_SHAKE_TREE, SOUND_SPACE_MODE_0)
EVT_CALL(PlaySoundAtModel, LVar3, SOUND_SHAKE_TREE_LEAVES, SOUND_SPACE_DEFAULT)
EVT_END_IF
EVT_END_LOOP
EVT_WAIT(1)
@ -276,7 +292,7 @@ EvtScript N(EVS_ShakeTree) = {
EVT_CALL(N(TransformFoliage), LVar4, EVT_FLOAT(0.1), EVT_FLOAT(0.2), LVarF, 0)
EVT_IF_EQ(LFlag0, FALSE)
EVT_SET(LFlag0, TRUE)
EVT_CALL(PlaySoundAtModel, LVar4, SOUND_SMASH_GOOMNUT_TREE, SOUND_SPACE_MODE_0)
EVT_CALL(PlaySoundAtModel, LVar4, SOUND_SMACK_TREE, SOUND_SPACE_DEFAULT)
EVT_END_IF
EVT_END_LOOP
EVT_WAIT(1)
@ -312,10 +328,10 @@ EvtScript N(EVS_ShakeTree) = {
EVT_END
};
FoliageModelList N(tree_leaves) = FOLIAGE_MODEL_LIST(33, 36 );
FoliageModelList N(tree_trunk) = FOLIAGE_MODEL_LIST(38, 39, 40 );
FoliageModelList N(TreeLeaves) = FOLIAGE_MODEL_LIST(MODEL_ha3, MODEL_o306);
FoliageModelList N(TreeTrunk) = FOLIAGE_MODEL_LIST(MODEL_o307, MODEL_o308, MODEL_o309);
FoliageVectorList N(D_80223D60_41D7F0) = {
FoliageVectorList N(EffectPositions) = {
.count = 2,
.vectors = {
{ -10, 140, 0 },
@ -323,130 +339,130 @@ FoliageVectorList N(D_80223D60_41D7F0) = {
},
};
ShakeTreeConfig N(tree) = {
.leaves = &N(tree_leaves),
.trunk = &N(tree_trunk),
.vectors = &N(D_80223D60_41D7F0),
ShakeTreeConfig N(Tree) = {
.leaves = &N(TreeLeaves),
.trunk = &N(TreeTrunk),
.vectors = &N(EffectPositions),
};
EvtScript N(shake_goomnut_tree) = {
EVT_SET(LVar0, EVT_PTR(N(tree)))
EvtScript N(EVS_TriggerTreeShake) = {
EVT_SET(LVar0, EVT_PTR(N(Tree)))
EVT_EXEC_WAIT(N(EVS_ShakeTree))
EVT_RETURN
EVT_END
};
EvtScript N(80223DBC) = {
EvtScript N(EVS_DropNutOnGoombas) = {
EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, -25, 120, 0, 90, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_BigNutDropped, LVar0)
EVT_IF_NE(LVar0, FALSE)
EVT_RETURN
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_15)
EVT_CALL(BattleCamTargetActor, ACTOR_ENEMY0)
EVT_CALL(BattleCamTargetActor, ACTOR_KING)
EVT_WAIT(20)
EVT_CALL(SetActorVar, ACTOR_SELF, 5, 1)
EVT_CALL(ActorExists, ACTOR_ENEMY0, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BigNutDropped, TRUE)
EVT_CALL(ActorExists, ACTOR_KING, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, 10, 0, 10)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, 1, FALSE)
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_2, SOUND_0301)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_2, EVT_FLOAT(0.8))
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_2, EVT_FLOAT(4.0))
EVT_CALL(FallPartTo, ACTOR_SELF, PRT_2, 10, 20, 10, 20)
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_2, 30, 20, 10, 10, TRUE)
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_2, 40, 20, 10, 5, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_BIG_NUT, SOUND_FALL_QUICK)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(0.8))
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(4.0))
EVT_CALL(FallPartTo, ACTOR_SELF, PRT_BIG_NUT, 10, 20, 10, 20)
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, 30, 20, 10, 10, TRUE)
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, 40, 20, 10, 5, TRUE)
EVT_LOOP(20)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, 1, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END_IF
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_2, SOUND_0301)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_2, EVT_FLOAT(0.8))
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_2, EVT_FLOAT(4.0))
EVT_CALL(GetStatusFlags, ACTOR_ENEMY0, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x80000)
EVT_CALL(FallPartTo, ACTOR_SELF, PRT_2, 10, 80, 10, 10)
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_BIG_NUT, SOUND_FALL_QUICK)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(0.8))
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(4.0))
EVT_CALL(GetStatusFlags, ACTOR_KING, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(FallPartTo, ACTOR_SELF, PRT_BIG_NUT, 10, 80, 10, 10)
EVT_ELSE
EVT_CALL(FallPartTo, ACTOR_SELF, PRT_2, 10, 32, 10, 10)
EVT_CALL(FallPartTo, ACTOR_SELF, PRT_BIG_NUT, 10, 32, 10, 10)
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 30)
EVT_CALL(SetOwnerTarget, ACTOR_ENEMY0, PRT_2)
EVT_CALL(SetOwnerTarget, ACTOR_KING, PRT_BIG_NUT)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(ActorExists, ACTOR_ENEMY1, LVar0)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, DMG_TO_KING, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(ActorExists, ACTOR_RED_GOOMBA, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_2, LVar0, LVar1, LVar2)
EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 65)
EVT_SET(LVar1, 20)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_2, EVT_FLOAT(0.7))
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_2, LVar0, LVar1, LVar2, 20, TRUE)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(0.7))
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 20, TRUE)
EVT_ADD(LVar0, 12)
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_2, LVar0, LVar1, LVar2, 8, TRUE)
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 8, TRUE)
EVT_LOOP(20)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, 1, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorPos, ACTOR_ENEMY1, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_ENEMY1, LVar3)
EVT_IF_NOT_FLAG(LVar3, 0x80000)
EVT_CALL(GetActorPos, ACTOR_RED_GOOMBA, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_RED_GOOMBA, LVar3)
EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK)
EVT_ADD(LVar1, 50)
EVT_ELSE
EVT_ADD(LVar1, 20)
EVT_END_IF
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_2, EVT_FLOAT(0.7))
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_2, LVar0, LVar1, LVar2, 20, TRUE)
EVT_CALL(SetOwnerTarget, ACTOR_ENEMY1, PRT_MAIN)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(0.7))
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 20, TRUE)
EVT_CALL(SetOwnerTarget, ACTOR_RED_GOOMBA, PRT_MAIN)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(ActorExists, ACTOR_ENEMY2, LVar0)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, DMG_TO_RED_GOOMBA, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(ActorExists, ACTOR_BLUE_GOOMBA, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_2, LVar0, LVar1, LVar2)
EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 35)
EVT_SET(LVar1, 20)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_2, EVT_FLOAT(0.7))
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_2, LVar0, LVar1, LVar2, 20, TRUE)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(0.7))
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 20, TRUE)
EVT_ADD(LVar0, 12)
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_2, LVar0, LVar1, LVar2, 8, TRUE)
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 8, TRUE)
EVT_LOOP(20)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, 1, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorPos, ACTOR_ENEMY2, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_ENEMY2, LVar3)
EVT_IF_NOT_FLAG(LVar3, 0x80000)
EVT_CALL(GetActorPos, ACTOR_BLUE_GOOMBA, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_BLUE_GOOMBA, LVar3)
EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK)
EVT_ADD(LVar1, 50)
EVT_ELSE
EVT_ADD(LVar1, 20)
EVT_END_IF
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_2, EVT_FLOAT(0.7))
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_2, LVar0, LVar1, LVar2, 20, TRUE)
EVT_CALL(SetOwnerTarget, ACTOR_ENEMY2, PRT_MAIN)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(0.7))
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 20, TRUE)
EVT_CALL(SetOwnerTarget, ACTOR_BLUE_GOOMBA, PRT_MAIN)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_2, LVar0, LVar1, LVar2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, DMG_TO_BLUE_GOOMBA, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_SET(LVar1, 20)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_2, EVT_FLOAT(0.7))
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_2, LVar0, LVar1, LVar2, 20, TRUE)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(0.7))
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 20, TRUE)
EVT_ADD(LVar0, 12)
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_2, LVar0, LVar1, LVar2, 8, TRUE)
EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 8, TRUE)
EVT_LOOP(20)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, 1, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN

View File

@ -1,20 +1,36 @@
#include "../area.h"
#include "sprite/npc/GoombaBros.h"
#include "goomba_bros_common.h"
#define NAMESPACE A(red_goomba_1)
extern s32 N(DefaultAnims)[];
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_GoombaBros_Death);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
PRT_ZERO = 0,
PRT_BLUE_MAIN = 1, // main part for blue goomba
PRT_MAIN = 1,
PRT_ZERO = 0,
};
s32 N(DefenseTable_8021B6C0)[] = {
enum N(ActorVars) {
AVAR_Unused_0 = 0,
AVAR_Unused_1 = 1,
};
enum N(ActorParams) {
DMG_HEADBONK = 1,
};
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(StatusTable_8021B6CC)[] = {
s32 N(StatusTable)[] = {
STATUS_KEY_NORMAL, 0,
STATUS_KEY_DEFAULT, 0,
STATUS_KEY_SLEEP, 100,
@ -39,14 +55,6 @@ s32 N(StatusTable_8021B6CC)[] = {
STATUS_END,
};
extern s32 N(IdleAnimations_8021B7C4)[];
extern EvtScript N(idle_8021B8A8);
extern EvtScript N(handleEvent_8021BB84);
extern EvtScript N(takeTurn_8021C3B0);
extern EvtScript N(init_8021D078);
extern EvtScript N(doDeath_8021D0C4);
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
@ -54,8 +62,8 @@ ActorPartBlueprint N(ActorParts)[] = {
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_8021B7C4),
.defenseTable = N(DefenseTable_8021B6C0),
.idleAnimations = N(DefaultAnims),
.defenseTable = N(DefenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, -3 },
@ -65,12 +73,12 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_RED_GOOMBA_BOSS,
.level = 20,
.level = ACTOR_LEVEL_RED_GOOMBA_BOSS,
.maxHP = 7,
.partCount = ARRAY_COUNT( N(ActorParts)),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init_8021D078),
.statusTable = N(StatusTable_8021B6CC),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
.hurricaneChance = 0,
@ -85,7 +93,7 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 8, 25 },
};
s32 N(IdleAnimations_8021B7C4)[] = {
s32 N(DefaultAnims)[] = {
STATUS_KEY_NORMAL, ANIM_GoombaBros_Red_Idle,
STATUS_KEY_STONE, ANIM_GoombaBros_Red_Still,
STATUS_KEY_SLEEP, ANIM_GoombaBros_Red_Sleep,
@ -111,15 +119,15 @@ s32 N(IdleAnimations_8021B810)[] = {
STATUS_END,
};
EvtScript N(init_8021B85C) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021C3B0)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021B8A8)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021BB84)))
EvtScript N(EVS_Init_Inner) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_RETURN
EVT_END
};
EvtScript N(idle_8021B8A8) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(10)
EVT_CALL(RandInt, 80, LVar0)
EVT_ADD(LVar0, 80)
@ -138,7 +146,7 @@ EvtScript N(idle_8021B8A8) = {
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021B810)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021B7C4)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims)))
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
@ -154,7 +162,7 @@ EvtScript N(idle_8021B8A8) = {
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021B810)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021B7C4)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims)))
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
@ -169,45 +177,45 @@ EvtScript N(idle_8021B8A8) = {
EVT_END
};
EvtScript N(handleEvent_8021BB84) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(9)
EVT_CASE_OR_EQ(10)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(14)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_GoombaBros_Red_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_CASE_EQ(36)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_GoombaBros_Red_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_BurnStill)
EVT_EXEC_WAIT(N(doDeath_8021D0C4))
EVT_EXEC_WAIT(N(EVS_GoombaBros_Death))
EVT_RETURN
EVT_CASE_EQ(11)
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_CASE_EQ(33)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(N(doDeath_8021D0C4))
EVT_EXEC_WAIT(N(EVS_GoombaBros_Death))
EVT_RETURN
EVT_CASE_EQ(47)
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
@ -225,32 +233,33 @@ EvtScript N(handleEvent_8021BB84) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CASE_EQ(38)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(N(doDeath_8021D0C4))
EVT_EXEC_WAIT(N(EVS_GoombaBros_Death))
EVT_RETURN
EVT_CASE_EQ(19)
EVT_CASE_OR_EQ(23)
EVT_CASE_OR_EQ(25)
EVT_CASE_OR_EQ(31)
EVT_CASE_EQ(EVENT_STAR_BEAM)
// do nothing
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Idle)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(32)
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(N(doDeath_8021D0C4))
EVT_EXEC_WAIT(N(EVS_GoombaBros_Death))
EVT_RETURN
EVT_CASE_EQ(53)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Run)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
@ -258,21 +267,21 @@ EvtScript N(handleEvent_8021BB84) = {
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(49)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Idle)
EVT_EXEC_WAIT(EVS_Enemy_Recover)
EVT_CASE_EQ(57)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Run)
EVT_SET_CONST(LVar2, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ScareAway)
EVT_RETURN
EVT_CASE_EQ(58)
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Run)
EVT_EXEC_WAIT(EVS_Enemy_AirLift)
EVT_CASE_EQ(22)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_BlowAway)
@ -280,7 +289,7 @@ EvtScript N(handleEvent_8021BB84) = {
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -288,9 +297,9 @@ EvtScript N(handleEvent_8021BB84) = {
#include "common/CalculateArcsinDeg.inc.c"
EvtScript N(takeTurn_8021C3B0) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
@ -348,8 +357,8 @@ EvtScript N(takeTurn_8021C3B0) = {
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Hurt)
EVT_WAIT(5)
EVT_IF_EQ(LVarA, 5)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0x80000000, 0, 0, 0)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
@ -388,7 +397,7 @@ EvtScript N(takeTurn_8021C3B0) = {
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
@ -419,7 +428,7 @@ EvtScript N(takeTurn_8021C3B0) = {
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_END_SWITCH
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
@ -454,21 +463,21 @@ EvtScript N(takeTurn_8021C3B0) = {
EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(init_8021D078) = {
EVT_EXEC_WAIT(N(init_8021B85C))
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EvtScript N(EVS_Init) = {
EVT_EXEC_WAIT(N(EVS_Init_Inner))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(doDeath_8021D0C4) = {
EvtScript N(EVS_GoombaBros_Death) = {
EVT_CALL(HideHealthBar, ACTOR_SELF)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_SET(LVar2, 0)
@ -490,24 +499,24 @@ EvtScript N(doDeath_8021D0C4) = {
EVT_ADD(LVar3, 8)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_ZERO, 1, TRUE)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 4, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_ZERO, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE)
EVT_WAIT(30)
EVT_CALL(ActorExists, ACTOR_ENEMY0, LVar0)
EVT_CALL(ActorExists, ACTOR_BLUE_GOOMBA, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(GetActorHP, ACTOR_ENEMY0, LVar0)
EVT_CALL(GetActorHP, ACTOR_BLUE_GOOMBA, LVar0)
EVT_END_IF
EVT_IF_NE(LVar0, 0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_ENEMY0)
EVT_CALL(BattleCamTargetActor, ACTOR_BLUE_GOOMBA)
EVT_CALL(MoveBattleCamOver, 20)
EVT_WAIT(20)
EVT_CALL(UseIdleAnimation, ACTOR_ENEMY0, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_ENEMY0, 0)
EVT_CALL(SetAnimation, ACTOR_ENEMY0, PRT_BLUE_MAIN, ANIM_GoombaBros_Blue_CryTalk)
EVT_CALL(ActorSpeak, MSG_CH0_00C0, ACTOR_ENEMY0, PRT_BLUE_MAIN, -1, -1)
EVT_CALL(EnableIdleScript, ACTOR_ENEMY0, 1)
EVT_CALL(UseIdleAnimation, ACTOR_ENEMY0, TRUE)
EVT_CALL(UseIdleAnimation, ACTOR_BLUE_GOOMBA, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetAnimation, ACTOR_BLUE_GOOMBA, PRT_BLUE_MAIN, ANIM_GoombaBros_Blue_CryTalk)
EVT_CALL(ActorSpeak, MSG_CH0_00C0, ACTOR_BLUE_GOOMBA, PRT_BLUE_MAIN, -1, -1)
EVT_CALL(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_BLUE_GOOMBA, TRUE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 30)
EVT_WAIT(30)

View File

@ -3,16 +3,26 @@
#define NAMESPACE A(red_goomba_2)
extern s32 N(DefaultAnims)[];
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
PRT_MAIN = 1,
};
s32 N(DefenseTable_8021EE00)[] = {
enum N(ActorParams) {
DMG_HEADBONK = 1,
};
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(StatusTable_8021EE0C)[] = {
s32 N(StatusTable)[] = {
STATUS_KEY_NORMAL, 0,
STATUS_KEY_DEFAULT, 0,
STATUS_KEY_SLEEP, 100,
@ -37,12 +47,6 @@ s32 N(StatusTable_8021EE0C)[] = {
STATUS_END,
};
extern s32 N(IdleAnimations_8021EF04)[];
extern EvtScript N(init_802207B8);
extern EvtScript N(takeTurn_8021FAF0);
extern EvtScript N(idle_8021EFE8);
extern EvtScript N(handleEvent_8021F2C4);
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
@ -50,8 +54,8 @@ ActorPartBlueprint N(ActorParts)[] = {
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_8021EF04),
.defenseTable = N(DefenseTable_8021EE00),
.idleAnimations = N(DefaultAnims),
.defenseTable = N(DefenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, -3 },
@ -61,12 +65,12 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_RED_GOOMBA_BOSS,
.level = 20,
.level = ACTOR_LEVEL_RED_GOOMBA_BOSS,
.maxHP = 7,
.partCount = ARRAY_COUNT( N(ActorParts)),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init_802207B8),
.statusTable = N(StatusTable_8021EE0C),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
.hurricaneChance = 0,
@ -81,7 +85,7 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 8, 25 },
};
s32 N(IdleAnimations_8021EF04)[] = {
s32 N(DefaultAnims)[] = {
STATUS_KEY_NORMAL, ANIM_GoombaBros_Red_Idle,
STATUS_KEY_STONE, ANIM_GoombaBros_Red_Still,
STATUS_KEY_SLEEP, ANIM_GoombaBros_Red_Sleep,
@ -94,7 +98,8 @@ s32 N(IdleAnimations_8021EF04)[] = {
STATUS_END,
};
s32 N(IdleAnimations_8021EF50)[] = {
// while shuffling around during idle
s32 N(ShuffleAnims)[] = {
STATUS_KEY_NORMAL, ANIM_GoombaBros_Red_Run,
STATUS_KEY_STONE, ANIM_GoombaBros_Red_Still,
STATUS_KEY_SLEEP, ANIM_GoombaBros_Red_Sleep,
@ -107,82 +112,82 @@ s32 N(IdleAnimations_8021EF50)[] = {
STATUS_END,
};
EvtScript N(init_8021EF9C) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021FAF0)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021EFE8)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021F2C4)))
EvtScript N(EVS_Init_Inner) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_RETURN
EVT_END
};
EvtScript N(idle_8021EFE8) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(10)
EVT_CALL(RandInt, 80, LVar0)
EVT_ADD(LVar0, 80)
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_CALL(RandInt, 80, LVar0)
EVT_ADD(LVar0, 80)
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021EF50)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021EF04)))
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims)))
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021EF50)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021EF04)))
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims)))
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_GOTO(10)
EVT_END_LOOP
EVT_GOTO(10)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_8021F2C4) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(9)
EVT_CASE_OR_EQ(10)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(14)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_GoombaBros_Red_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_CASE_EQ(36)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_BurnHurt)
EVT_SET_CONST(LVar2, ANIM_GoombaBros_Red_BurnStill)
@ -191,11 +196,11 @@ EvtScript N(handleEvent_8021F2C4) = {
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(11)
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_CASE_EQ(33)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
@ -203,7 +208,7 @@ EvtScript N(handleEvent_8021F2C4) = {
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(47)
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
@ -221,7 +226,7 @@ EvtScript N(handleEvent_8021F2C4) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CASE_EQ(38)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
@ -229,15 +234,16 @@ EvtScript N(handleEvent_8021F2C4) = {
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(19)
EVT_CASE_OR_EQ(23)
EVT_CASE_OR_EQ(25)
EVT_CASE_OR_EQ(31)
EVT_CASE_EQ(EVENT_STAR_BEAM)
// do nothing
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Idle)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(32)
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
@ -246,7 +252,7 @@ EvtScript N(handleEvent_8021F2C4) = {
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(53)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Run)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
@ -254,21 +260,21 @@ EvtScript N(handleEvent_8021F2C4) = {
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(49)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Idle)
EVT_EXEC_WAIT(EVS_Enemy_Recover)
EVT_CASE_EQ(57)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Run)
EVT_SET_CONST(LVar2, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ScareAway)
EVT_RETURN
EVT_CASE_EQ(58)
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Run)
EVT_EXEC_WAIT(EVS_Enemy_AirLift)
EVT_CASE_EQ(22)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_BlowAway)
@ -276,7 +282,7 @@ EvtScript N(handleEvent_8021F2C4) = {
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -284,9 +290,9 @@ EvtScript N(handleEvent_8021F2C4) = {
#include "common/CalculateArcsinDeg.inc.c"
EvtScript N(takeTurn_8021FAF0) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
@ -344,8 +350,8 @@ EvtScript N(takeTurn_8021FAF0) = {
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Hurt)
EVT_WAIT(5)
EVT_IF_EQ(LVarA, 5)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0x80000000, 0, 0, 0)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
@ -384,7 +390,7 @@ EvtScript N(takeTurn_8021FAF0) = {
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
@ -415,7 +421,7 @@ EvtScript N(takeTurn_8021FAF0) = {
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_END_SWITCH
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
@ -450,18 +456,23 @@ EvtScript N(takeTurn_8021FAF0) = {
EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
#include "common/DivActorLevel4.inc.c"
API_CALLABLE(N(ReduceLevel)) {
ActorBlueprint* actorData = get_actor(script->owner1.actorID)->actorBlueprint;
EvtScript N(init_802207B8) = {
EVT_EXEC_WAIT(N(init_8021EF9C))
actorData->level /= 4;
return ApiStatus_DONE2;
}
EvtScript N(EVS_Init) = {
EVT_EXEC_WAIT(N(EVS_Init_Inner))
EVT_CALL(SetEnemyHP, ACTOR_SELF, 2)
EVT_CALL(N(DivActorLevel4))
EVT_CALL(N(ReduceLevel))
EVT_RETURN
EVT_END
};

View File

@ -3,11 +3,31 @@
#define NAMESPACE A(egg_jr_troopa)
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_HandlePhase);
extern EvtScript N(EVS_SetupHitReaction);
extern EvtScript N(EVS_TryHitReaction);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
PRT_MAIN = 1,
};
s32 N(IdleAnimations_80224380)[] = {
enum N(ActorVars) {
AVAR_ShowedNewPower = 0,
AVAR_HitReact_State = 1,
AVAL_HitReact_None = 0,
AVAL_HitReact_Ready = 1,
AVAL_HitReact_Done = 2,
};
enum N(ActorParams) {
DMG_LEAP = 2,
};
s32 N(DefaultAnims)[] = {
STATUS_KEY_NORMAL, ANIM_JrTroopa_Idle,
STATUS_KEY_SLEEP, ANIM_JrTroopa_Sleep,
STATUS_KEY_STONE, ANIM_JrTroopa_Still,
@ -18,7 +38,7 @@ s32 N(IdleAnimations_80224380)[] = {
STATUS_END,
};
s32 N(IdleAnimations_802243BC)[] = {
s32 N(UnusedAnims)[] = {
STATUS_KEY_NORMAL, ANIM_JrTroopa_Idle,
STATUS_KEY_SLEEP, ANIM_JrTroopa_Still,
STATUS_KEY_STONE, ANIM_JrTroopa_Still,
@ -29,18 +49,18 @@ s32 N(IdleAnimations_802243BC)[] = {
STATUS_END,
};
s32 N(IdleAnimations_802243F8)[] = {
s32 N(EggAnims)[] = {
STATUS_KEY_NORMAL, ANIM_JrTroopa_EggIdle,
STATUS_KEY_STOP, ANIM_JrTroopa_EggStill,
STATUS_END,
};
s32 N(DefenseTable_8022440C)[] = {
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 1,
ELEMENT_END,
};
s32 N(StatusTable_80224418)[] = {
s32 N(StatusTable)[] = {
STATUS_KEY_NORMAL, 100,
STATUS_KEY_DEFAULT, 100,
STATUS_KEY_SLEEP, 80,
@ -65,32 +85,30 @@ s32 N(StatusTable_80224418)[] = {
STATUS_END,
};
ActorPartBlueprint N(ActorParts_802244C4)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -6, 18 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_80224380),
.defenseTable = N(DefenseTable_8022440C),
.idleAnimations = N(DefaultAnims),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 5, -4 },
},
};
extern EvtScript N(init_80224A94);
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_JR_TROOPA2,
.level = 44,
.type = ACTOR_TYPE_JR_TROOPA_2,
.level = ACTOR_LEVEL_JR_TROOPA_2,
.maxHP = 15,
.partCount = ARRAY_COUNT( N(ActorParts_802244C4)),
.partsData = N(ActorParts_802244C4),
.initScript = &N(init_80224A94),
.statusTable = N(StatusTable_80224418),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
.hurricaneChance = 0,
@ -105,7 +123,7 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 10, 20 },
};
EvtScript N(80224510) = {
EvtScript N(EVS_Cam_FocusOnJrTroopa) = {
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07)
@ -117,7 +135,7 @@ EvtScript N(80224510) = {
EVT_END
};
EvtScript N(802245A8) = {
EvtScript N(EVS_Cam_ResetFocus) = {
EVT_CALL(EnableBattleStatusBar, TRUE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 12)
@ -125,7 +143,7 @@ EvtScript N(802245A8) = {
EVT_END
};
EvtScript N(802245E8) = {
EvtScript N(EVS_Cam_FocusOnGoompa) = {
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_55)
@ -135,12 +153,12 @@ EvtScript N(802245E8) = {
EVT_END
};
s32 N(IdleAnimations_8022464C)[] = {
s32 N(DefeatedAnims)[] = {
STATUS_KEY_NORMAL, ANIM_JrTroopa_Defeated,
STATUS_END,
};
EvtScript N(80224658) = {
EvtScript N(EVS_JrTroopa_Death) = {
EVT_SET(LVarA, LVar0)
EVT_CALL(HideHealthBar, ACTOR_SELF)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
@ -184,14 +202,14 @@ EvtScript N(80224658) = {
EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, ANIM_JrTroopa_Collapse)
EVT_WAIT(12)
EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, ANIM_JrTroopa_Defeated)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, LVarA, EVT_PTR(N(IdleAnimations_8022464C)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, LVarA, EVT_PTR(N(DefeatedAnims)))
EVT_WAIT(60)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(80224964) = {
EvtScript N(EVS_ReenterEgg) = {
EVT_WAIT(10)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CLOSE_SHELL)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -200,94 +218,86 @@ EvtScript N(80224964) = {
EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 0, 0)
EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_EnterEgg)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_802243F8)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(EggAnims)))
EVT_WAIT(10)
EVT_RETURN
EVT_END
};
extern EvtScript N(takeTurn_80225314);
extern EvtScript N(idle_80224B24);
extern EvtScript N(handleEvent_80224B58);
extern EvtScript N(nextTurn_80225B4C);
EvtScript N(init_80224A94) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_80225314)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_80224B24)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_80224B58)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn_80225B4C)))
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShowedNewPower, FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_None)
EVT_RETURN
EVT_END
};
EvtScript N(idle_80224B24) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(0)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
extern EvtScript N(802250E4);
extern EvtScript N(802251CC);
EvtScript N(handleEvent_80224B58) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(9)
EVT_EXEC_WAIT(N(802250E4))
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_EXEC_WAIT(N(EVS_SetupHitReaction))
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_CASE_EQ(10)
EVT_EXEC_WAIT(N(802250E4))
EVT_CASE_EQ(EVENT_HIT)
EVT_EXEC_WAIT(N(EVS_SetupHitReaction))
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_EXEC_WAIT(N(802251CC))
EVT_CASE_EQ(32)
EVT_EXEC_WAIT(N(EVS_TryHitReaction))
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Panic)
EVT_EXEC_WAIT(N(80224658))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_EQ(14)
EVT_SET(LVar0, 1)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET(LVar0, PRT_MAIN)
EVT_SET(LVar1, ANIM_JrTroopa_BurnHurt)
EVT_SET(LVar2, ANIM_JrTroopa_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_CASE_EQ(36)
EVT_SET(LVar0, 1)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET(LVar0, PRT_MAIN)
EVT_SET(LVar1, ANIM_JrTroopa_BurnHurt)
EVT_SET(LVar2, ANIM_JrTroopa_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_BurnStill)
EVT_EXEC_WAIT(N(80224658))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_EQ(11)
EVT_EXEC_WAIT(N(802250E4))
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_EXEC_WAIT(N(EVS_SetupHitReaction))
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_EXEC_WAIT(N(802251CC))
EVT_CASE_EQ(33)
EVT_EXEC_WAIT(N(EVS_TryHitReaction))
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Panic)
EVT_EXEC_WAIT(N(80224658))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_EQ(47)
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
@ -298,8 +308,8 @@ EvtScript N(handleEvent_80224B58) = {
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Run)
EVT_EXEC_WAIT(EVS_Enemy_ReturnHome)
EVT_EXEC_WAIT(N(80224964))
EVT_CASE_EQ(38)
EVT_EXEC_WAIT(N(EVS_ReenterEgg))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
@ -310,42 +320,42 @@ EvtScript N(handleEvent_80224B58) = {
EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Panic)
EVT_EXEC_WAIT(N(80224658))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_OR_EQ(23)
EVT_CASE_OR_EQ(25)
EVT_CASE_OR_EQ(31)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_EggIdle)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(53)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Idle)
EVT_EXEC_WAIT(EVS_Enemy_ReturnHome)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(49)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Idle)
EVT_EXEC_WAIT(EVS_Enemy_Recover)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(802250E4) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_IF_EQ(LVar0, 0)
EvtScript N(EVS_SetupHitReaction) = {
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0)
EVT_IF_EQ(LVar0, AVAL_HitReact_None)
EVT_CALL(GetLastDamage, ACTOR_SELF, LVar1)
EVT_CALL(GetBattleFlags, LVar2)
EVT_IF_NOT_FLAG(LVar2, BS_FLAGS1_PARTNER_ACTING)
EVT_IF_NE(LVar1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Ready)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x351000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_DOJO)
EVT_CALL(FreezeBattleCam, TRUE)
EVT_END_IF
EVT_END_IF
@ -355,22 +365,22 @@ EvtScript N(802250E4) = {
EVT_END
};
EvtScript N(802251CC) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_IF_EQ(LVar0, 1)
EvtScript N(EVS_TryHitReaction) = {
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0)
EVT_IF_EQ(LVar0, AVAL_HitReact_Ready)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x351000)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 2)
EVT_EXEC_WAIT(N(80224510))
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_DOJO)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Done)
EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa))
EVT_CALL(MoveBattleCamOver, 30)
EVT_WAIT(30)
EVT_CALL(ActorSpeak, MSG_CH1_012A, ACTOR_SELF, PRT_MAIN, 0x0021001D, 0x0021001D)
EVT_CALL(ActorSpeak, MSG_CH1_012A, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Dizzy, ANIM_JrTroopa_Dizzy)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_PointTalk)
EVT_CALL(EndActorSpeech, ACTOR_SELF, PRT_MAIN, -1, -1)
EVT_EXEC_WAIT(N(80224964))
EVT_EXEC_WAIT(N(802245A8))
EVT_EXEC_WAIT(N(EVS_ReenterEgg))
EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus))
EVT_ELSE
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_None)
EVT_END_IF
EVT_END_IF
EVT_CALL(FreezeBattleCam, FALSE)
@ -378,9 +388,9 @@ EvtScript N(802251CC) = {
EVT_END
};
EvtScript N(takeTurn_80225314) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_OPEN_SHELL)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle)
EVT_WAIT(20)
@ -419,7 +429,7 @@ EvtScript N(takeTurn_80225314) = {
EVT_ADD(LVar2, 5)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_IF_EQ(LVarA, 5)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(2)
@ -442,7 +452,7 @@ EvtScript N(takeTurn_80225314) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_EXEC_WAIT(N(80224964))
EVT_EXEC_WAIT(N(EVS_ReenterEgg))
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
@ -457,7 +467,7 @@ EvtScript N(takeTurn_80225314) = {
EVT_END_THREAD
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_LEAP, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_DEFAULT
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
@ -481,27 +491,27 @@ EvtScript N(takeTurn_80225314) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Run)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle)
EVT_EXEC_WAIT(N(80224964))
EVT_EXEC_WAIT(N(EVS_ReenterEgg))
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(nextTurn_80225B4C) = {
EvtScript N(EVS_HandlePhase) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetBattlePhase, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(10)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_CASE_EQ(PHASE_PLAYER_BEGIN)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ShowedNewPower, LVar0)
EVT_IF_FALSE(LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShowedNewPower, TRUE)
EVT_WAIT(15)
EVT_EXEC_WAIT(N(80224510))
EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa))
EVT_WAIT(10)
EVT_CALL(ActorSpeak, MSG_CH1_0128, ACTOR_SELF, PRT_MAIN, 0x0021001A, 0x0021001B)
EVT_CALL(ActorSpeak, MSG_CH1_0128, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_ChargeArmsUp)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20B9)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -509,16 +519,16 @@ EvtScript N(nextTurn_80225B4C) = {
EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 30, 0)
EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, 1, 30, 0)
EVT_WAIT(30)
EVT_EXEC_WAIT(N(80224964))
EVT_EXEC_WAIT(N(EVS_ReenterEgg))
EVT_WAIT(30)
EVT_CALL(ActorSpeak, MSG_CH1_0129, ACTOR_SELF, PRT_MAIN, 0x00210017, 0x00210004)
EVT_CALL(ActorSpeak, MSG_CH1_0129, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_EggTalk, ANIM_JrTroopa_EggIdle)
EVT_WAIT(10)
EVT_EXEC_WAIT(N(802245A8))
EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus))
EVT_ELSE
EVT_END_IF
EVT_CASE_EQ(12)
EVT_CASE_EQ(PHASE_ENEMY_BEGIN)
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END

File diff suppressed because it is too large Load Diff

View File

@ -6,11 +6,33 @@
#define NAMESPACE A(jr_troopa)
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_HandlePhase);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
};
s32 N(IdleAnimations_802229F0)[] = {
enum N(ActorVars) {
AVAR_TurnCount = 0,
AVAR_Goompa_Introduction_Done = 1,
AVAR_HitReact_State = 2,
AVAL_HitReact_Init = 0,
AVAL_HitReact_Hit = 1,
AVAL_HitReact_Done = 2,
AVAR_JrTroopa_PoweredUp = 3,
AVAR_AttackDamage = 4,
AVAR_JustGettingStarted = 5,
};
enum N(ActorParams) {
DMG_INITIAL = 1,
DMG_FULL_POWER = 2,
};
s32 N(DefaultAnims)[] = {
STATUS_KEY_NORMAL, ANIM_JrTroopa_Idle,
STATUS_KEY_STONE, ANIM_JrTroopa_Still,
STATUS_KEY_SLEEP, ANIM_JrTroopa_Still,
@ -21,12 +43,12 @@ s32 N(IdleAnimations_802229F0)[] = {
STATUS_END,
};
s32 N(DefenseTable_80222A2C)[] = {
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(StatusTable_80222A38)[] = {
s32 N(StatusTable)[] = {
STATUS_KEY_NORMAL, 100,
STATUS_KEY_DEFAULT, 100,
STATUS_KEY_SLEEP, 100,
@ -51,32 +73,30 @@ s32 N(StatusTable_80222A38)[] = {
STATUS_END,
};
ActorPartBlueprint N(ActorParts_80222AE4)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 30 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_802229F0),
.defenseTable = N(DefenseTable_80222A2C),
.idleAnimations = N(DefaultAnims),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, 0 },
},
};
extern EvtScript N(init_80223180);
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_JR_TROOPA1,
.level = 41,
.type = ACTOR_TYPE_JR_TROOPA_1,
.level = ACTOR_LEVEL_JR_TROOPA_1,
.maxHP = 5,
.partCount = ARRAY_COUNT( N(ActorParts_80222AE4)),
.partsData = N(ActorParts_80222AE4),
.initScript = &N(init_80223180),
.statusTable = N(StatusTable_80222A38),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
.hurricaneChance = 0,
@ -91,7 +111,7 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 10, 20 },
};
EvtScript N(80222B30) = {
EvtScript N(EVS_Cam_FocusOnJrTroopa) = {
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07)
@ -103,7 +123,7 @@ EvtScript N(80222B30) = {
EVT_END
};
EvtScript N(80222BC8) = {
EvtScript N(EVS_Cam_ResetFocus) = {
EVT_CALL(EnableBattleStatusBar, TRUE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 12)
@ -111,7 +131,7 @@ EvtScript N(80222BC8) = {
EVT_END
};
EvtScript N(80222C08) = {
EvtScript N(EVS_Cam_FocusOnGoompa) = {
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_55)
@ -121,12 +141,12 @@ EvtScript N(80222C08) = {
EVT_END
};
s32 N(IdleAnimations_80222C6C)[] = {
s32 N(DefeatedAnims)[] = {
STATUS_KEY_NORMAL, ANIM_JrTroopa_Defeated,
STATUS_END,
};
EvtScript N(80222C78) = {
EvtScript N(EVS_JrTroopa_Death) = {
EVT_SET(LVarA, LVar0)
EVT_CALL(HideHealthBar, ACTOR_SELF)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
@ -170,7 +190,7 @@ EvtScript N(80222C78) = {
EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, ANIM_JrTroopa_Collapse)
EVT_WAIT(12)
EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, ANIM_JrTroopa_Defeated)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, LVarA, EVT_PTR(N(IdleAnimations_80222C6C)))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, LVarA, EVT_PTR(N(DefeatedAnims)))
EVT_WAIT(30)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
@ -202,95 +222,92 @@ EvtScript N(80222C78) = {
EVT_WAIT(1)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0)
EVT_WAIT(5)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 0x00400000, TRUE)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE)
EVT_RETURN
EVT_END
};
extern EvtScript N(takeTurn_802234A4);
extern EvtScript N(handleEvent_80223290);
extern EvtScript N(nextTurn_80223D2C);
EvtScript N(init_80223180) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_802234A4)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_80223290)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn_80223D2C)))
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 4, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 5, 0)
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnCount, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Goompa_Introduction_Done, FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Init)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_JrTroopa_PoweredUp, FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_AttackDamage, DMG_INITIAL)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_JustGettingStarted, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(8022325C) = {
// unused
EvtScript N(EVS_Idle) = {
EVT_LABEL(0)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_80223290) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0)
EVT_IF_EQ(LVar0, AVAL_HitReact_Init)
EVT_CALL(GetLastDamage, ACTOR_SELF, LVar1)
EVT_IF_NE(LVar1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Hit)
EVT_END_IF
EVT_END_IF
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(9)
EVT_CASE_OR_EQ(10)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(32)
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Panic)
EVT_EXEC_WAIT(N(80222C78))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_OR_EQ(23)
EVT_CASE_OR_EQ(25)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_JrTroopa_Idle)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_802234A4) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(AddActorVar, ACTOR_SELF, 0, 1)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnCount, 1)
EVT_CALL(GetActorHP, ACTOR_SELF, LVar0)
EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1)
EVT_SUB(LVar1, LVar0)
EVT_IF_EQ(LVar1, 3)
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 5, 1)
EVT_EXEC_WAIT(N(80222B30))
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_JustGettingStarted, LVar0)
EVT_IF_FALSE(LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_JustGettingStarted, TRUE)
EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa))
EVT_CALL(MoveBattleCamOver, 20)
EVT_WAIT(20)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(ActorSpeak, MSG_CH0_00B1, ACTOR_SELF, PRT_MAIN, 0x00210016, 0x00210003)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(ActorSpeak, MSG_CH0_00B1, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle)
EVT_END_IF
EVT_END_IF
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
@ -312,7 +329,7 @@ EvtScript N(takeTurn_802234A4) = {
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Jump)
EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_20E2, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 4, LVar1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_AttackDamage, LVar1)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, LVar1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(6)
@ -352,7 +369,7 @@ EvtScript N(takeTurn_802234A4) = {
EVT_END_THREAD
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_WAIT(2)
EVT_CALL(GetActorVar, ACTOR_SELF, 4, LVar1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_AttackDamage, LVar1)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
@ -380,21 +397,22 @@ EvtScript N(takeTurn_802234A4) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(nextTurn_80223D2C) = {
EvtScript N(EVS_HandlePhase) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetBattlePhase, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(10)
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
EVT_CASE_EQ(PHASE_PLAYER_BEGIN)
// trying showing the scene where Goompa introduces the player to Jr Troopa
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Goompa_Introduction_Done, LVar0)
EVT_IF_FALSE(LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Goompa_Introduction_Done, TRUE)
EVT_WAIT(15)
EVT_CALL(EnableBattleStatusBar, FALSE)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
@ -426,57 +444,59 @@ EvtScript N(nextTurn_80223D2C) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 4)
EVT_END_IF
EVT_END_IF
EVT_CASE_EQ(12)
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 2)
EVT_EXEC_WAIT(N(80222C08))
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
EVT_THREAD
EVT_SET(LVar1, 0)
EVT_LOOP(5)
EVT_WAIT(1)
EVT_SUB(LVar1, 36)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar1)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, MSG_CH0_00B0, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp)
EVT_WAIT(20)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0)
EVT_WAIT(4)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetActorHP, ACTOR_SELF, LVar0)
EVT_IF_LE(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 1)
EVT_END_IF // @bug END_IF with no IF
EVT_CASE_EQ(PHASE_ENEMY_BEGIN)
// trying showing the scene where Goompa congratulates the player for dealing damage to Jr Troopa
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0)
EVT_IF_EQ(LVar0, AVAL_HitReact_Hit)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Done)
EVT_EXEC_WAIT(N(EVS_Cam_FocusOnGoompa))
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
EVT_THREAD
EVT_SET(LVar1, 0)
EVT_LOOP(5)
EVT_WAIT(1)
EVT_SUB(LVar1, 36)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar1)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, MSG_CH0_00B2, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle)
EVT_CALL(ActorSpeak, MSG_CH0_00B0, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_EXEC_WAIT(N(80222B30))
EVT_CALL(ActorSpeak, MSG_CH0_00B3, ACTOR_SELF, PRT_MAIN, 0x00210016, 0x00210003)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20B9)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_ChargeArmsUp)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 16)
EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 30, 0)
EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, 1, 30, 0)
EVT_WAIT(30)
EVT_WAIT(20)
EVT_CALL(SetActorVar, ACTOR_SELF, 4, 2)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp)
EVT_WAIT(20)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0)
EVT_WAIT(4)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE)
EVT_END_IF
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
// trying showing the scene where Jr Troopa powers up
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_JrTroopa_PoweredUp, LVar0)
EVT_IF_FALSE(LVar0)
EVT_CALL(GetActorHP, ACTOR_SELF, LVar0)
EVT_IF_LE(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_JrTroopa_PoweredUp, TRUE)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, MSG_CH0_00B2, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa))
EVT_CALL(ActorSpeak, MSG_CH0_00B3, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20B9)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_ChargeArmsUp)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 16)
EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 30, 0)
EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, 1, 30, 0)
EVT_WAIT(30)
EVT_WAIT(20)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_AttackDamage, DMG_FULL_POWER)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle)
EVT_WAIT(20)
EVT_END_IF
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};

View File

@ -4,12 +4,41 @@
#define NAMESPACE A(mage_jr_troopa)
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_HandlePhase);
extern EvtScript N(EVS_TryFearReaction);
extern EvtScript N(EVS_JrTroopa_Death);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
PRT_2 = 2,
PRT_BASE = 1,
PRT_MAGE = 2,
};
s32 N(IdleAnimations_8022A550)[] = {
enum N(ActorVars) {
// 'you wont like this!' brag before attacking
AVAR_MagicBrag_State = 0,
AVAL_MagicBrag_None = 0,
AVAL_MagicBrag_Ready = 1,
AVAL_MagicBrag_Done = 2,
// 'that felt fantastic!' brag after dealing damage
AVAR_DamageBrag_State = 1,
AVAL_DamageBrag_None = 0,
AVAL_DamageBrag_Ready = 1,
AVAL_DamageBrag_Done = 2,
AVAR_Unused = 2,
AVAR_SpookReact = 3,
AVAL_SpookReact_None = 0,
AVAL_SpookReact_Ready = 1,
};
enum N(ActorParams) {
DMG_SPELL = 8,
};
s32 N(MageAnims)[] = {
STATUS_KEY_NORMAL, ANIM_MageJrTroopa_Idle,
STATUS_KEY_SLEEP, ANIM_MageJrTroopa_Sleep,
STATUS_KEY_STONE, ANIM_MageJrTroopa_Still,
@ -21,7 +50,7 @@ s32 N(IdleAnimations_8022A550)[] = {
STATUS_END,
};
s32 N(IdleAnimations_8022A594)[] = {
s32 N(UnusedAnims)[] = {
STATUS_KEY_NORMAL, ANIM_MageJrTroopa_Idle,
STATUS_KEY_SLEEP, ANIM_MageJrTroopa_Still,
STATUS_KEY_STONE, ANIM_MageJrTroopa_Still,
@ -33,7 +62,7 @@ s32 N(IdleAnimations_8022A594)[] = {
STATUS_END,
};
s32 N(IdleAnimations_8022A5D8)[] = {
s32 N(BaseAnims)[] = {
STATUS_KEY_NORMAL, ANIM_JrTroopa_Idle,
STATUS_KEY_SLEEP, ANIM_JrTroopa_Sleep,
STATUS_KEY_STONE, ANIM_JrTroopa_Still,
@ -45,17 +74,17 @@ s32 N(IdleAnimations_8022A5D8)[] = {
STATUS_END,
};
s32 N(IdleAnimations_8022A61C)[] = {
s32 N(DefeatedAnims)[] = {
STATUS_KEY_NORMAL, ANIM_JrTroopa_Defeated,
STATUS_END,
};
s32 N(DefenseTable_8022A628)[] = {
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 1,
ELEMENT_END,
};
s32 N(StatusTable_8022A634)[] = {
s32 N(StatusTable)[] = {
STATUS_KEY_NORMAL, 100,
STATUS_KEY_DEFAULT, 100,
STATUS_KEY_SLEEP, 35,
@ -80,44 +109,42 @@ s32 N(StatusTable_8022A634)[] = {
STATUS_END,
};
ActorPartBlueprint N(ActorParts_8022A6E0)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET,
.index = PRT_MAIN,
.index = PRT_BASE,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 28 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_8022A550),
.defenseTable = N(DefenseTable_8022A628),
.idleAnimations = N(MageAnims),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { -2, -7 },
},
{
.flags = ACTOR_PART_FLAG_NO_TARGET,
.index = PRT_2,
.index = PRT_MAGE,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 30 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_8022A5D8),
.defenseTable = N(DefenseTable_8022A628),
.idleAnimations = N(BaseAnims),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, 0 },
},
};
extern EvtScript N(init_8022ACE4);
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_JR_TROOPA5,
.level = 65,
.type = ACTOR_TYPE_JR_TROOPA_5,
.level = ACTOR_LEVEL_JR_TROOPA_5,
.maxHP = 50,
.partCount = ARRAY_COUNT( N(ActorParts_8022A6E0)),
.partsData = N(ActorParts_8022A6E0),
.initScript = &N(init_8022ACE4),
.statusTable = N(StatusTable_8022A634),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
.hurricaneChance = 0,
@ -132,7 +159,7 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 10, 25 },
};
EvtScript N(8022A750) = {
EvtScript N(EVS_SetupFearReaction) = {
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar2)
EVT_IF_FLAG(LVar2, STATUS_FLAGS_IMMOBILIZED)
EVT_RETURN
@ -141,7 +168,7 @@ EvtScript N(8022A750) = {
EVT_IF_FLAG(LVar2, BS_FLAGS1_PARTNER_ACTING)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar2, MOVE_SPOOK)
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_Ready)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0263)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 30)
@ -153,11 +180,11 @@ EvtScript N(8022A750) = {
EVT_END
};
EvtScript N(8022A880) = {
EvtScript N(EVS_Transform) = {
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20B9)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3)
EVT_IF_NOT_FLAG(LVar3, 0x80000)
EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK)
EVT_ADD(LVar1, 16)
EVT_ELSE
EVT_ADD(LVar1, 6)
@ -173,7 +200,7 @@ EvtScript N(8022A880) = {
EVT_END_LOOP
EVT_END_THREAD
EVT_WAIT(32)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0300)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_TRANSFORM)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 15)
EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 40, 0)
@ -185,7 +212,7 @@ EvtScript N(8022A880) = {
EVT_END
};
EvtScript N(8022ABA8) = {
EvtScript N(EVS_Cam_FocusOnJrTroopa) = {
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07)
@ -197,7 +224,7 @@ EvtScript N(8022ABA8) = {
EVT_END
};
EvtScript N(8022AC40) = {
EvtScript N(EVS_Cam_ResetFocus) = {
EVT_CALL(EnableBattleStatusBar, TRUE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 12)
@ -205,7 +232,7 @@ EvtScript N(8022AC40) = {
EVT_END
};
EvtScript N(8022AC80) = {
EvtScript N(EVS_Cam_FocusOnGoompa) = {
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_55)
@ -215,170 +242,162 @@ EvtScript N(8022AC80) = {
EVT_END
};
extern EvtScript N(takeTurn_8022B4F0);
extern EvtScript N(idle_8022ADA4);
extern EvtScript N(handleEvent_8022ADD8);
extern EvtScript N(nextTurn_8022BB44);
EvtScript N(init_8022ACE4) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8022B4F0)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8022ADA4)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8022ADD8)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn_8022BB44)))
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 0)
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, AVAL_MagicBrag_None)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DamageBrag_State, AVAL_DamageBrag_None)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None)
EVT_RETURN
EVT_END
};
EvtScript N(idle_8022ADA4) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(0)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
extern EvtScript N(8022C2A4);
extern EvtScript N(8022BF1C);
EvtScript N(handleEvent_8022ADD8) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(9)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_CASE_EQ(10)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_EXEC_WAIT(N(8022A750))
EVT_EXEC_WAIT(N(8022C2A4))
EVT_CASE_EQ(32)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_EXEC_WAIT(N(EVS_SetupFearReaction))
EVT_EXEC_WAIT(N(EVS_TryFearReaction))
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Still)
EVT_EXEC_WAIT(N(8022BF1C))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_EQ(14)
EVT_SET(LVar0, 1)
EVT_SET(LVar1, 2359306)
EVT_SET(LVar2, 2359307)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET(LVar0, PRT_BASE)
EVT_SET(LVar1, ANIM_MageJrTroopa_BurnHurt)
EVT_SET(LVar2, ANIM_MageJrTroopa_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_CASE_EQ(36)
EVT_SET(LVar0, 1)
EVT_SET(LVar1, 2359306)
EVT_SET(LVar2, 2359307)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET(LVar0, PRT_BASE)
EVT_SET(LVar1, ANIM_MageJrTroopa_BurnHurt)
EVT_SET(LVar2, ANIM_MageJrTroopa_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_BurnStill)
EVT_EXEC_WAIT(N(8022BF1C))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_EQ(11)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_CASE_EQ(33)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt)
EVT_EXEC_WAIT(N(8022BF1C))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_EQ(47)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_JumpBack)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Run)
EVT_EXEC_WAIT(EVS_Enemy_ReturnHome)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CASE_EQ(38)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_JumpBack)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Still)
EVT_EXEC_WAIT(N(8022BF1C))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_OR_EQ(23)
EVT_CASE_OR_EQ(25)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Idle)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_EXEC_WAIT(N(8022A750))
EVT_EXEC_WAIT(N(8022C2A4))
EVT_EXEC_WAIT(N(EVS_SetupFearReaction))
EVT_EXEC_WAIT(N(EVS_TryFearReaction))
EVT_END_CASE_GROUP
EVT_CASE_EQ(58)
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MageJrTroopa_Flail)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Flail)
EVT_WAIT(1000)
EVT_END_IF
EVT_CASE_EQ(31)
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MageJrTroopa_Flail)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Flail)
EVT_WAIT(20)
EVT_EXEC_WAIT(N(8022ABA8))
EVT_CALL(ActorSpeak, MSG_Menus_019B, ACTOR_SELF, PRT_MAIN, 0x0024000E, 0x00240003)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MageJrTroopa_Idle)
EVT_EXEC_WAIT(N(8022AC40))
EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa))
EVT_CALL(ActorSpeak, MSG_Menus_019B, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle)
EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus))
EVT_END_IF
EVT_CASE_EQ(42)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MageJrTroopa_Hurt)
EVT_CASE_EQ(EVENT_SPIKE_CONTACT)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Hurt)
EVT_WAIT(20)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MageJrTroopa_Run)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Run)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MageJrTroopa_Idle)
EVT_CASE_EQ(53)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Idle)
EVT_EXEC_WAIT(EVS_Enemy_ReturnHome)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(49)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, PRT_BASE)
EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Idle)
EVT_EXEC_WAIT(EVS_Enemy_Recover)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_8022B4F0) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MageJrTroopa_RaiseStaff)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_RaiseStaff)
EVT_WAIT(8)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x80000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_SET(LVar3, 0)
EVT_SET(LVar4, 36)
EVT_SETF(LVar5, EVT_FLOAT(1.0))
@ -392,7 +411,7 @@ EvtScript N(takeTurn_8022B4F0) = {
EVT_ADD(LVar1, LVar4)
EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, LVar5, 30, 0)
EVT_WAIT(30)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MageJrTroopa_SwingStaff)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_SwingStaff)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVarA)
@ -403,7 +422,7 @@ EvtScript N(takeTurn_8022B4F0) = {
EVT_SUB(LVar3, 120)
EVT_ADD(LVar4, 20)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x80000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_SET(LVar6, -8)
EVT_SET(LVar7, 20)
EVT_SETF(LVar8, EVT_FLOAT(1.0))
@ -417,10 +436,10 @@ EvtScript N(takeTurn_8022B4F0) = {
EVT_ADD(LVar1, LVar7)
EVT_PLAY_EFFECT(EFFECT_SHAPE_SPELL, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 30, 0)
EVT_WAIT(35)
EVT_IF_EQ(LVarA, 5)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
@ -429,7 +448,7 @@ EvtScript N(takeTurn_8022B4F0) = {
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5)
EVT_ADD(LVar4, 20)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x80000)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_SET(LVar6, -8)
EVT_SET(LVar7, 20)
EVT_SETF(LVar8, EVT_FLOAT(1.0))
@ -443,87 +462,90 @@ EvtScript N(takeTurn_8022B4F0) = {
EVT_ADD(LVar1, LVar7)
EVT_PLAY_EFFECT(EFFECT_SHAPE_SPELL, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 15, 0)
EVT_WAIT(15)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT), 0, 0, 8, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT), 0, 0, DMG_SPELL, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DamageBrag_State, LVar0)
EVT_IF_EQ(LVar0, AVAL_DamageBrag_None)
EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar1)
EVT_IF_NE(LVar1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DamageBrag_State, AVAL_DamageBrag_Ready)
EVT_END_IF
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(nextTurn_8022BB44) = {
EvtScript N(EVS_HandlePhase) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetBattlePhase, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(12)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CASE_EQ(PHASE_ENEMY_BEGIN)
// trying showing the scene where Jr Troopa brags about his new skills
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, LVar0)
EVT_IF_EQ(LVar0, AVAL_MagicBrag_Ready)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_NOT_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 2)
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_EXEC_WAIT(N(8022ABA8))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, AVAL_MagicBrag_Done)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_SpookReact, LVar0)
EVT_IF_EQ(LVar0, AVAL_SpookReact_None)
EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa))
EVT_WAIT(20)
EVT_END_IF
EVT_CALL(ActorSpeak, MSG_CH7_00DD, ACTOR_SELF, PRT_MAIN, 0x0024000E, 0x00240003)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MageJrTroopa_Idle)
EVT_EXEC_WAIT(N(8022AC40))
EVT_CALL(ActorSpeak, MSG_CH7_00DD, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle)
EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus))
EVT_WAIT(20)
EVT_END_IF
EVT_ELSE
EVT_WAIT(20)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 3, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None)
EVT_RETURN
EVT_CASE_EQ(11)
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 2)
EVT_EXEC_WAIT(N(8022ABA8))
EVT_CASE_EQ(PHASE_ENEMY_END)
// trying showing the scene where Jr Troopa brgas about dealing damage
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DamageBrag_State, LVar0)
EVT_IF_EQ(LVar0, AVAL_DamageBrag_Ready)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DamageBrag_State, AVAL_DamageBrag_Done)
EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa))
EVT_WAIT(20)
EVT_CALL(ActorSpeak, MSG_CH7_00DE, ACTOR_SELF, PRT_MAIN, 0x0024000E, 0x00240003)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MageJrTroopa_Idle)
EVT_EXEC_WAIT(N(8022AC40))
EVT_CALL(ActorSpeak, MSG_CH7_00DE, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle)
EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus))
EVT_WAIT(10)
EVT_END_IF
EVT_RETURN
EVT_CASE_EQ(10)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_CASE_EQ(PHASE_PLAYER_BEGIN)
// trying showing the scene where Jr Troopa transforms
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, LVar0)
EVT_IF_EQ(LVar0, AVAL_MagicBrag_None)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, AVAL_MagicBrag_Ready)
EVT_WAIT(15)
EVT_EXEC_WAIT(N(8022ABA8))
EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa))
EVT_WAIT(10)
EVT_CALL(ActorSpeak, MSG_CH7_00DB, ACTOR_SELF, PRT_2, 0x0021001A, 0x0021001B)
EVT_CALL(ActorSpeak, MSG_CH7_00DB, ACTOR_SELF, PRT_MAGE, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot)
EVT_WAIT(8)
EVT_EXEC_WAIT(N(8022A880))
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, 1, FALSE)
EVT_EXEC_WAIT(N(EVS_Transform))
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAGE, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_WAIT(15)
EVT_CALL(ActorSpeak, MSG_CH7_00DC, ACTOR_SELF, PRT_MAIN, 0x0024000E, 0x00240003)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MageJrTroopa_Idle)
EVT_CALL(ActorSpeak, MSG_CH7_00DC, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle)
EVT_WAIT(10)
EVT_EXEC_WAIT(N(8022AC40))
EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus))
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8022BF1C) = {
EvtScript N(EVS_JrTroopa_Death) = {
EVT_CALL(HideHealthBar, ACTOR_SELF)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetDamageSource, LVar5)
@ -557,9 +579,9 @@ EvtScript N(8022BF1C) = {
EVT_WAIT(3)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, 1, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_JrTroopa_DefeatedBegin)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAGE, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_JrTroopa_DefeatedBegin)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -573,24 +595,24 @@ EvtScript N(8022BF1C) = {
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 30)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20E5)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_JrTroopa_Defeated)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_2, EVT_PTR(N(IdleAnimations_8022A61C)))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_JrTroopa_Defeated)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAGE, EVT_PTR(N(DefeatedAnims)))
EVT_WAIT(60)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8022C2A4) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LVar0)
EVT_IF_EQ(LVar0, 1)
EvtScript N(EVS_TryFearReaction) = {
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_SpookReact, LVar0)
EVT_IF_EQ(LVar0, AVAL_SpookReact_Ready)
EVT_WAIT(10)
EVT_EXEC_WAIT(N(8022ABA8))
EVT_CALL(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_MAIN, 0x0024000E, 0x00240003)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MageJrTroopa_Idle)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_NE(LVar0, 1)
EVT_EXEC_WAIT(N(8022AC40))
EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa))
EVT_CALL(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, LVar0)
EVT_IF_NE(LVar0, AVAL_MagicBrag_Ready)
EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus))
EVT_END_IF
EVT_END_IF
EVT_RETURN

View File

@ -4,12 +4,32 @@
#define NAMESPACE A(para_jr_troopa)
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_HandlePhase);
extern EvtScript N(EVS_JrTroopa_Death);
extern EvtScript N(EVS_JrTroopa_FlyHome);
extern EvtScript N(EVS_TryFearReaction);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
PRT_2 = 2,
PRT_GROUND = 1,
PRT_FLYING = 2,
};
s32 N(IdleAnimations_80225DC0)[] = {
enum N(ActorVars) {
AVAR_Transformed = 0,
AVAR_SpookReact = 1,
AVAL_SpookReact_None = 0,
AVAL_SpookReact_Ready = 1,
};
enum N(ActorParams) {
DMG_DIVE = 5,
};
s32 N(FlyingAnims)[] = {
STATUS_KEY_NORMAL, ANIM_ParaJrTroopa_Idle,
STATUS_KEY_SLEEP, ANIM_ParaJrTroopa_Sleep,
STATUS_KEY_STONE, ANIM_ParaJrTroopa_Still,
@ -21,7 +41,7 @@ s32 N(IdleAnimations_80225DC0)[] = {
STATUS_END,
};
s32 N(IdleAnimations_80225E04)[] = {
s32 N(BaseAnims)[] = {
STATUS_KEY_NORMAL, ANIM_JrTroopa_Idle,
STATUS_KEY_SLEEP, ANIM_JrTroopa_Sleep,
STATUS_KEY_STONE, ANIM_JrTroopa_Still,
@ -33,17 +53,17 @@ s32 N(IdleAnimations_80225E04)[] = {
STATUS_END,
};
s32 N(IdleAnimations_80225E48)[] = {
s32 N(DefeatedAnims)[] = {
STATUS_KEY_NORMAL, ANIM_JrTroopa_Defeated,
STATUS_END,
};
s32 N(DefenseTable_80225E54)[] = {
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 1,
ELEMENT_END,
};
s32 N(StatusTable_80225E60)[] = {
s32 N(StatusTable)[] = {
STATUS_KEY_NORMAL, 100,
STATUS_KEY_DEFAULT, 100,
STATUS_KEY_SLEEP, 50,
@ -68,44 +88,42 @@ s32 N(StatusTable_80225E60)[] = {
STATUS_END,
};
ActorPartBlueprint N(ActorParts_80225F0C)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET,
.index = PRT_MAIN,
.index = PRT_GROUND,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 35 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_80225DC0),
.defenseTable = N(DefenseTable_80225E54),
.idleAnimations = N(FlyingAnims),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, -6 },
},
{
.flags = ACTOR_PART_FLAG_NO_TARGET,
.index = PRT_2,
.index = PRT_FLYING,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 30 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_80225E04),
.defenseTable = N(DefenseTable_80225E54),
.idleAnimations = N(BaseAnims),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, 0 },
},
};
extern EvtScript N(init_80226510);
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_JR_TROOPA3,
.level = 52,
.type = ACTOR_TYPE_JR_TROOPA_3,
.level = ACTOR_LEVEL_JR_TROOPA_3,
.maxHP = 40,
.partCount = ARRAY_COUNT( N(ActorParts_80225F0C)),
.partsData = N(ActorParts_80225F0C),
.initScript = &N(init_80226510),
.statusTable = N(StatusTable_80225E60),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
.hurricaneChance = 0,
@ -120,7 +138,7 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 10, 25 },
};
EvtScript N(80225F7C) = {
EvtScript N(EVS_SetupFearReaction) = {
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar2)
EVT_IF_FLAG(LVar2, STATUS_FLAGS_IMMOBILIZED)
EVT_RETURN
@ -129,7 +147,7 @@ EvtScript N(80225F7C) = {
EVT_IF_FLAG(LVar2, BS_FLAGS1_PARTNER_ACTING)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar2, MOVE_SPOOK)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_Ready)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0263)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 30)
@ -141,11 +159,11 @@ EvtScript N(80225F7C) = {
EVT_END
};
EvtScript N(802260AC) = {
EvtScript N(EVS_Transform) = {
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20B9)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3)
EVT_IF_NOT_FLAG(LVar3, 0x80000)
EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK)
EVT_ADD(LVar1, 16)
EVT_ELSE
EVT_ADD(LVar1, 6)
@ -161,7 +179,7 @@ EvtScript N(802260AC) = {
EVT_END_LOOP
EVT_END_THREAD
EVT_WAIT(32)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0300)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_TRANSFORM)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 15)
EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 40, 0)
@ -173,7 +191,7 @@ EvtScript N(802260AC) = {
EVT_END
};
EvtScript N(802263D4) = {
EvtScript N(EVS_Cam_FocusOnJrTroopa) = {
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07)
@ -185,7 +203,7 @@ EvtScript N(802263D4) = {
EVT_END
};
EvtScript N(8022646C) = {
EvtScript N(EVS_Cam_ResetFocus) = {
EVT_CALL(EnableBattleStatusBar, TRUE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 12)
@ -193,7 +211,7 @@ EvtScript N(8022646C) = {
EVT_END
};
EvtScript N(802264AC) = {
EvtScript N(EVS_Cam_FocusOnGoompa) = {
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_55)
@ -203,167 +221,158 @@ EvtScript N(802264AC) = {
EVT_END
};
extern EvtScript N(takeTurn_80226F58);
extern EvtScript N(idle_802265A0);
extern EvtScript N(handleEvent_802266B0);
extern EvtScript N(nextTurn_80227724);
EvtScript N(init_80226510) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_80226F58)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_802265A0)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_802266B0)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn_80227724)))
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Transformed, FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None)
EVT_RETURN
EVT_END
};
#include "common/battle/SetAbsoluteStatusOffsets.inc.c"
EvtScript N(idle_802265A0) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP)
EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -12, 28)
EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 4, -6)
EVT_CALL(N(SetAbsoluteStatusOffsets), -25, 27, -1, 27)
EVT_ELSE
EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 33)
EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -6)
EVT_CALL(N(SetAbsoluteStatusOffsets), -22, 30, 2, 28)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP)
EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_GROUND, -12, 28)
EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_GROUND, 4, -6)
EVT_CALL(N(SetAbsoluteStatusOffsets), -25, 27, -1, 27)
EVT_ELSE
EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_GROUND, -5, 33)
EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_GROUND, 0, -6)
EVT_CALL(N(SetAbsoluteStatusOffsets), -22, 30, 2, 28)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
extern EvtScript N(802279B0);
extern EvtScript N(80227D38);
extern EvtScript N(80227E1C);
EvtScript N(handleEvent_802266B0) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(9)
EVT_CASE_OR_EQ(10)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_EXEC_WAIT(N(80225F7C))
EVT_EXEC_WAIT(N(80227E1C))
EVT_EXEC_WAIT(N(EVS_SetupFearReaction))
EVT_EXEC_WAIT(N(EVS_TryFearReaction))
EVT_END_CASE_GROUP
EVT_CASE_EQ(32)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt)
EVT_EXEC_WAIT(N(802279B0))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_EQ(14)
EVT_SET(LVar0, 1)
EVT_SET(LVar1, 2424840)
EVT_SET(LVar2, 2424841)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET(LVar0, PRT_GROUND)
EVT_SET(LVar1, ANIM_ParaJrTroopa_BurnHurt)
EVT_SET(LVar2, ANIM_ParaJrTroopa_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_CASE_EQ(36)
EVT_SET(LVar0, 1)
EVT_SET(LVar1, 2424840)
EVT_SET(LVar2, 2424841)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET(LVar0, PRT_GROUND)
EVT_SET(LVar1, ANIM_ParaJrTroopa_BurnHurt)
EVT_SET(LVar2, ANIM_ParaJrTroopa_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_BurnStill)
EVT_EXEC_WAIT(N(802279B0))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_EQ(11)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_CASE_EQ(33)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt)
EVT_EXEC_WAIT(N(802279B0))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_EQ(47)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_JumpBack)
EVT_EXEC_WAIT(N(80227D38))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_Idle)
EVT_CASE_EQ(38)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_EXEC_WAIT(N(EVS_JrTroopa_FlyHome))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_JumpBack)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Idle)
EVT_EXEC_WAIT(N(802279B0))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_EQ(23)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_ZERO_DAMAGE)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Idle)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_CASE_EQ(25)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Idle)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_EXEC_WAIT(N(80225F7C))
EVT_EXEC_WAIT(N(80227E1C))
EVT_CASE_EQ(42)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_Hurt)
EVT_EXEC_WAIT(N(EVS_SetupFearReaction))
EVT_EXEC_WAIT(N(EVS_TryFearReaction))
EVT_CASE_EQ(EVENT_SPIKE_CONTACT)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Hurt)
EVT_WAIT(20)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_Idle)
EVT_CASE_EQ(58)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle)
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_Flail)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Flail)
EVT_WAIT(1000)
EVT_END_IF
EVT_CASE_EQ(31)
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Flail)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_EXEC_WAIT(N(802263D4))
EVT_CALL(ActorSpeak, MSG_Menus_019B, ACTOR_SELF, PRT_MAIN, 0x0025000C, 0x0025000C)
EVT_EXEC_WAIT(N(8022646C))
EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa))
EVT_CALL(ActorSpeak, MSG_Menus_019B, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Talk, ANIM_ParaJrTroopa_Talk)
EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus))
EVT_END_IF
EVT_CASE_EQ(53)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Idle)
EVT_EXEC_WAIT(EVS_Enemy_ReturnHome)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(49)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Idle)
EVT_EXEC_WAIT(EVS_Enemy_Recover)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(80226D4C) = {
EvtScript N(EVS_Overshoot_Unused) = {
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
EVT_SET(LVar1, 0)
@ -378,28 +387,28 @@ EvtScript N(80226D4C) = {
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
EVT_SUB(LVar0, 10)
EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_Idle)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle)
EVT_WAIT(8)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_Idle)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_Idle)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_80226F58) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
@ -415,7 +424,7 @@ EvtScript N(takeTurn_80226F58) = {
EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_PARAGOOMBA_PREDIVE, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
@ -426,23 +435,23 @@ EvtScript N(takeTurn_80226F58) = {
EVT_SET(LVar1, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_Dive)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Dive)
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR)
EVT_IF_EQ(LVarA, 5)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(10)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 20)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_GROUND, 0, ACTOR_DECORATION_SWEAT)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_Idle)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_GROUND, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_RETURN
EVT_END_CASE_GROUP
@ -454,7 +463,7 @@ EvtScript N(takeTurn_80226F58) = {
EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_PARAGOOMBA_PREDIVE, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
@ -462,58 +471,59 @@ EvtScript N(takeTurn_80226F58) = {
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_Dive)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Dive)
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR)
EVT_END_SWITCH
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_DIVE, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SET(LVarF, LVar0)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(10)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR)
EVT_WAIT(10)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(YieldTurn)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_Idle)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(nextTurn_80227724) = {
EvtScript N(EVS_HandlePhase) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetBattlePhase, LVarF)
EVT_SWITCH(LVarF)
EVT_CASE_EQ(10)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_CASE_EQ(PHASE_PLAYER_BEGIN)
// trying showing the scene where Jr Troopa transforms
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Transformed, LVar0)
EVT_IF_FALSE(LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Transformed, TRUE)
EVT_WAIT(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(SetBattleCamOffsetZ, 35)
EVT_CALL(MoveBattleCamOver, 30)
EVT_WAIT(30)
EVT_CALL(ActorSpeak, MSG_CH3_0020, ACTOR_SELF, PRT_2, 0x0021001A, 0x0021001B)
EVT_CALL(ActorSpeak, MSG_CH3_0020, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot)
EVT_WAIT(8)
EVT_EXEC_WAIT(N(802260AC))
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, 1, FALSE)
EVT_EXEC_WAIT(N(EVS_Transform))
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_WAIT(30)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
@ -522,25 +532,25 @@ EvtScript N(nextTurn_80227724) = {
EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, 60, LVar2)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_WAIT(8)
EVT_CALL(ActorSpeak, MSG_CH3_0021, ACTOR_SELF, PRT_MAIN, 0x0025000C, 0x00250002)
EVT_CALL(ActorSpeak, MSG_CH3_0021, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Talk, ANIM_ParaJrTroopa_Idle)
EVT_WAIT(10)
EVT_EXEC_WAIT(N(8022646C))
EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus))
EVT_END_IF
EVT_CASE_EQ(12)
EVT_CASE_EQ(PHASE_ENEMY_BEGIN)
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(802279B0) = {
EvtScript N(EVS_JrTroopa_Death) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar1, 0)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0301)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK)
EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0)
EVT_CALL(HideHealthBar, ACTOR_SELF)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2)
@ -560,9 +570,9 @@ EvtScript N(802279B0) = {
EVT_WAIT(3)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, 1, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_JrTroopa_DefeatedBegin)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_DefeatedBegin)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -576,17 +586,17 @@ EvtScript N(802279B0) = {
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 30)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20E5)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_JrTroopa_Defeated)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_2, EVT_PTR(N(IdleAnimations_80225E48)))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_Defeated)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(DefeatedAnims)))
EVT_WAIT(60)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 0x00400000, TRUE)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(80227D38) = {
EvtScript N(EVS_JrTroopa_FlyHome) = {
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_CALL(SetGoalToHome, ACTOR_SELF)
@ -599,18 +609,18 @@ EvtScript N(80227D38) = {
EVT_END
};
EvtScript N(80227E1C) = {
EvtScript N(EVS_TryFearReaction) = {
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED)
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_SpookReact, LVar0)
EVT_IF_EQ(LVar0, AVAL_SpookReact_Ready)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None)
EVT_WAIT(15)
EVT_EXEC_WAIT(N(802263D4))
EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa))
EVT_WAIT(10)
EVT_CALL(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_MAIN, 0x0025000C, 0x00250002)
EVT_CALL(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Talk, ANIM_ParaJrTroopa_Idle)
EVT_WAIT(10)
EVT_EXEC_WAIT(N(8022646C))
EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus))
EVT_END_IF
EVT_END_IF
EVT_RETURN

View File

@ -4,12 +4,38 @@
#define NAMESPACE A(spiked_para_jr_troopa)
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_HandlePhase);
extern EvtScript N(EVS_SetupHitReaction);
extern EvtScript N(EVS_TryFearReaction);
extern EvtScript N(EVS_TryHitReaction);
extern EvtScript N(EVS_JrTroopa_Death);
extern EvtScript N(EVS_JrTroopa_FlyHome);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
PRT_2 = 2,
PRT_GROUND = 1,
PRT_FLYING = 2,
};
s32 N(IdleAnimations_80227F00)[] = {
enum N(ActorVars) {
AVAR_LostHalfHP = 0,
AVAR_HitReact_State = 1,
AVAL_HitReact_None = 0,
AVAL_HitReact_Ready = 1,
AVAL_HitReact_Done = 2,
AVAR_SpookReact = 2,
AVAL_SpookReact_None = 0,
AVAL_SpookReact_Ready = 1,
};
enum N(ActorParams) {
DMG_DIVE = 6,
};
s32 N(DefaultAnims)[] = {
STATUS_KEY_NORMAL, ANIM_SpikedParaJrTroopa_Idle,
STATUS_KEY_SLEEP, ANIM_SpikedParaJrTroopa_Sleep,
STATUS_KEY_STONE, ANIM_SpikedParaJrTroopa_Still,
@ -21,22 +47,22 @@ s32 N(IdleAnimations_80227F00)[] = {
STATUS_END,
};
s32 N(IdleAnimations_80227F44)[] = {
s32 N(WindedAnims)[] = {
STATUS_KEY_NORMAL, ANIM_JrTroopa_OutOfBreath,
STATUS_END,
};
s32 N(IdleAnimations_80227F50)[] = {
s32 N(DefeatedAnims)[] = {
STATUS_KEY_NORMAL, ANIM_JrTroopa_Defeated,
STATUS_END,
};
s32 N(DefenseTable_80227F5C)[] = {
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 1,
ELEMENT_END,
};
s32 N(StatusTable_80227F68)[] = {
s32 N(StatusTable)[] = {
STATUS_KEY_NORMAL, 100,
STATUS_KEY_DEFAULT, 100,
STATUS_KEY_SLEEP, 40,
@ -61,44 +87,42 @@ s32 N(StatusTable_80227F68)[] = {
STATUS_END,
};
ActorPartBlueprint N(ActorParts_80228014)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET,
.index = PRT_MAIN,
.index = PRT_GROUND,
.posOffset = { 0, 0, 0 },
.targetOffset = { -5, 32 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_80227F00),
.defenseTable = N(DefenseTable_80227F5C),
.idleAnimations = N(DefaultAnims),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAG_SPIKY_TOP,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, -11 },
},
{
.flags = ACTOR_PART_FLAG_NO_TARGET,
.index = PRT_2,
.index = PRT_FLYING,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 30 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_80227F44),
.defenseTable = N(DefenseTable_80227F5C),
.idleAnimations = N(WindedAnims),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAG_SPIKY_TOP,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, 0 },
},
};
extern EvtScript N(init_80228618);
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_JR_TROOPA4,
.level = 59,
.type = ACTOR_TYPE_JR_TROOPA_4,
.level = ACTOR_LEVEL_JR_TROOPA_4,
.maxHP = 40,
.partCount = ARRAY_COUNT( N(ActorParts_80228014)),
.partsData = N(ActorParts_80228014),
.initScript = &N(init_80228618),
.statusTable = N(StatusTable_80227F68),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
.hurricaneChance = 0,
@ -113,7 +137,7 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 10, 25 },
};
EvtScript N(80228084) = {
EvtScript N(EVS_SetupFearReaction) = {
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar2)
EVT_IF_FLAG(LVar2, STATUS_FLAGS_IMMOBILIZED)
EVT_RETURN
@ -122,7 +146,7 @@ EvtScript N(80228084) = {
EVT_IF_FLAG(LVar2, BS_FLAGS1_PARTNER_ACTING)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar2, MOVE_SPOOK)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_Ready)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0263)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 30)
@ -134,11 +158,11 @@ EvtScript N(80228084) = {
EVT_END
};
EvtScript N(802281B4) = {
EvtScript N(EVS_Transform) = {
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20B9)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3)
EVT_IF_NOT_FLAG(LVar3, 0x80000)
EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK)
EVT_ADD(LVar1, 16)
EVT_ELSE
EVT_ADD(LVar1, 6)
@ -154,7 +178,7 @@ EvtScript N(802281B4) = {
EVT_END_LOOP
EVT_END_THREAD
EVT_WAIT(32)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0300)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_TRANSFORM)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 15)
EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 40, 0)
@ -166,7 +190,7 @@ EvtScript N(802281B4) = {
EVT_END
};
EvtScript N(802284DC) = {
EvtScript N(EVS_Cam_FocusOnJrTroopa) = {
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07)
@ -178,7 +202,7 @@ EvtScript N(802284DC) = {
EVT_END
};
EvtScript N(80228574) = {
EvtScript N(EVS_Cam_ResetFocus) = {
EVT_CALL(EnableBattleStatusBar, TRUE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 12)
@ -186,7 +210,7 @@ EvtScript N(80228574) = {
EVT_END
};
EvtScript N(802285B4) = {
EvtScript N(EVS_Cam_FocusOnGoompa) = {
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_55)
@ -196,145 +220,134 @@ EvtScript N(802285B4) = {
EVT_END
};
extern EvtScript N(takeTurn_8022936C);
extern EvtScript N(idle_802286C0);
extern EvtScript N(handleEvent_802287D0);
extern EvtScript N(nextTurn_80229B38);
EvtScript N(init_80228618) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8022936C)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_802286C0)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_802287D0)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn_80229B38)))
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 0)
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LostHalfHP, FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_None)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None)
EVT_RETURN
EVT_END
};
#include "common/battle/SetAbsoluteStatusOffsets.inc.c"
EvtScript N(idle_802286C0) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP)
EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -15, 28)
EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 4, -6)
EVT_CALL(N(SetAbsoluteStatusOffsets), -25, 27, -1, 27)
EVT_ELSE
EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -8, 33)
EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -6)
EVT_CALL(N(SetAbsoluteStatusOffsets), -22, 30, 2, 28)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP)
EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_GROUND, -15, 28)
EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_GROUND, 4, -6)
EVT_CALL(N(SetAbsoluteStatusOffsets), -25, 27, -1, 27)
EVT_ELSE
EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_GROUND, -8, 33)
EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_GROUND, 0, -6)
EVT_CALL(N(SetAbsoluteStatusOffsets), -22, 30, 2, 28)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
extern EvtScript N(80228FE8);
extern EvtScript N(8022906C);
extern EvtScript N(8022A018);
extern EvtScript N(8022A39C);
extern EvtScript N(8022A480);
EvtScript N(handleEvent_802287D0) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(9)
EVT_EXEC_WAIT(N(80228FE8))
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_EXEC_WAIT(N(EVS_SetupHitReaction))
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_CASE_EQ(10)
EVT_EXEC_WAIT(N(80228FE8))
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_HIT)
EVT_EXEC_WAIT(N(EVS_SetupHitReaction))
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_EXEC_WAIT(N(8022906C))
EVT_EXEC_WAIT(N(80228084))
EVT_EXEC_WAIT(N(8022A480))
EVT_CASE_EQ(32)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_EXEC_WAIT(N(EVS_TryHitReaction))
EVT_EXEC_WAIT(N(EVS_SetupFearReaction))
EVT_EXEC_WAIT(N(EVS_TryFearReaction))
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt)
EVT_EXEC_WAIT(N(8022A018))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_EQ(14)
EVT_EXEC_WAIT(N(80228FE8))
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_EXEC_WAIT(N(EVS_SetupHitReaction))
EVT_SET(LVar0, 1)
EVT_SET(LVar1, 2293770)
EVT_SET(LVar2, 2293771)
EVT_SET(LVar1, ANIM_SpikedParaJrTroopa_BurnHurt)
EVT_SET(LVar2, ANIM_SpikedParaJrTroopa_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_EXEC_WAIT(N(8022906C))
EVT_CASE_EQ(36)
EVT_EXEC_WAIT(N(80228FE8))
EVT_SET(LVar0, 1)
EVT_SET(LVar1, 2293770)
EVT_SET(LVar2, 2293771)
EVT_EXEC_WAIT(N(EVS_TryHitReaction))
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_EXEC_WAIT(N(EVS_SetupHitReaction))
EVT_SET(LVar0, PRT_GROUND)
EVT_SET(LVar1, ANIM_SpikedParaJrTroopa_BurnHurt)
EVT_SET(LVar2, ANIM_SpikedParaJrTroopa_BurnStill)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_BurnStill)
EVT_EXEC_WAIT(N(8022A018))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_EQ(11)
EVT_EXEC_WAIT(N(80228FE8))
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_EXEC_WAIT(N(EVS_SetupHitReaction))
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_EXEC_WAIT(N(8022906C))
EVT_CASE_EQ(33)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_EXEC_WAIT(N(EVS_TryHitReaction))
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt)
EVT_EXEC_WAIT(N(8022A018))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_EQ(47)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_JumpBack)
EVT_EXEC_WAIT(N(8022A39C))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_Idle)
EVT_CASE_EQ(38)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_EXEC_WAIT(N(EVS_JrTroopa_FlyHome))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_JumpBack)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Still)
EVT_EXEC_WAIT(N(8022A018))
EVT_EXEC_WAIT(N(EVS_JrTroopa_Death))
EVT_RETURN
EVT_CASE_OR_EQ(23)
EVT_CASE_OR_EQ(25)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Idle)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_EXEC_WAIT(N(80228084))
EVT_EXEC_WAIT(N(8022A480))
EVT_EXEC_WAIT(N(EVS_SetupFearReaction))
EVT_EXEC_WAIT(N(EVS_TryFearReaction))
EVT_END_CASE_GROUP
EVT_CASE_EQ(27)
EVT_CASE_EQ(EVENT_SPIKE_TAUNT)
EVT_WAIT(10)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3)
EVT_SWITCH(LVar3)
EVT_CASE_FLAG(266240)
EVT_CASE_FLAG(STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP)
EVT_ADD(LVar0, -13)
EVT_ADD(LVar1, 37)
EVT_CASE_FLAG(524288)
EVT_CASE_FLAG(STATUS_FLAG_SHRINK)
EVT_ADD(LVar0, -1)
EVT_ADD(LVar1, 14)
EVT_CASE_DEFAULT
@ -343,76 +356,76 @@ EvtScript N(handleEvent_802287D0) = {
EVT_END_SWITCH
EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0)
EVT_WAIT(20)
EVT_CASE_EQ(58)
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_Flail)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Flail)
EVT_WAIT(1000)
EVT_END_IF
EVT_CASE_EQ(31)
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_Flail)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Flail)
EVT_WAIT(20)
EVT_EXEC_WAIT(N(802284DC))
EVT_CALL(ActorSpeak, MSG_Menus_019B, ACTOR_SELF, PRT_MAIN, 0x0023000F, 0x0023000F)
EVT_EXEC_WAIT(N(80228574))
EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa))
EVT_CALL(ActorSpeak, MSG_Menus_019B, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Talk, ANIM_SpikedParaJrTroopa_Talk)
EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus))
EVT_END_IF
EVT_CASE_EQ(42)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_Hurt)
EVT_CASE_EQ(EVENT_SPIKE_CONTACT)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Hurt)
EVT_WAIT(20)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_Idle)
EVT_CASE_EQ(53)
EVT_EXEC_WAIT(N(8022A39C))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_Idle)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_EXEC_WAIT(N(EVS_JrTroopa_FlyHome))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(49)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, PRT_GROUND)
EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Idle)
EVT_EXEC_WAIT(EVS_Enemy_Recover)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(80228FE8) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_IF_EQ(LVar0, 0)
EvtScript N(EVS_SetupHitReaction) = {
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0)
EVT_IF_EQ(LVar0, AVAL_HitReact_None)
EVT_CALL(GetLastDamage, ACTOR_SELF, LVar1)
EVT_IF_NE(LVar1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Ready)
EVT_END_IF
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(8022906C) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_IF_EQ(LVar0, 1)
EvtScript N(EVS_TryHitReaction) = {
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0)
EVT_IF_EQ(LVar0, AVAL_HitReact_Ready)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x351000)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 2)
EVT_EXEC_WAIT(N(802284DC))
EVT_CALL(ActorSpeak, MSG_MAC_Port_00BC, ACTOR_SELF, PRT_MAIN, -1, -1)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_Idle)
EVT_EXEC_WAIT(N(80228574))
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_DOJO)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Done)
EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa))
EVT_CALL(ActorSpeak, MSG_MAC_Port_00BC, ACTOR_SELF, PRT_GROUND, -1, -1)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle)
EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus))
EVT_ELSE
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_None)
EVT_END_IF
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(80229160) = {
EvtScript N(EVS_Overshoot_Unused) = {
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
EVT_SET(LVar1, 0)
@ -427,28 +440,28 @@ EvtScript N(80229160) = {
EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
EVT_SUB(LVar0, 10)
EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_Idle)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle)
EVT_WAIT(8)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_Idle)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_Idle)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_8022936C) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
@ -464,7 +477,7 @@ EvtScript N(takeTurn_8022936C) = {
EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_PARAGOOMBA_PREDIVE, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
@ -475,23 +488,23 @@ EvtScript N(takeTurn_8022936C) = {
EVT_SET(LVar1, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_Dive)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Dive)
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR)
EVT_IF_EQ(LVarA, 5)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(10)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 20)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_GROUND, 0, ACTOR_DECORATION_SWEAT)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_Idle)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_GROUND, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_RETURN
EVT_END_CASE_GROUP
@ -503,7 +516,7 @@ EvtScript N(takeTurn_8022936C) = {
EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_PARAGOOMBA_PREDIVE, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
@ -511,107 +524,114 @@ EvtScript N(takeTurn_8022936C) = {
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_Dive)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Dive)
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR)
EVT_END_SWITCH
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 6, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_DIVE, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SET(LVarF, LVar0)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(10)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR)
EVT_WAIT(10)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(YieldTurn)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_Idle)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
API_CALLABLE(func_802189DC_447E1C) {
API_CALLABLE(N(ShowPointerHudElem)) {
Bytecode* args = script->ptrReadPos;
f32 posX = evt_get_float_variable(script, *args++);
f32 posY = evt_get_float_variable(script, *args++);
s32 icon = hud_element_create(&HES_AnimatedHandPointer);
s32 iconIdx = hud_element_create(&HES_AnimatedHandPointer);
hud_element_set_render_pos(icon, posX, posY);
hud_element_set_scale(icon, 1.5f);
hud_element_clear_flags(icon, HUD_ELEMENT_FLAG_200000 | HUD_ELEMENT_FLAG_DISABLED);
evt_set_variable(script, *args++, icon);
load_tattle_flags(ACTOR_TYPE_JR_TROOPA4);
hud_element_set_render_pos(iconIdx, posX, posY);
hud_element_set_scale(iconIdx, 1.5f);
hud_element_clear_flags(iconIdx, HUD_ELEMENT_FLAG_200000 | HUD_ELEMENT_FLAG_DISABLED);
evt_set_variable(script, *args++, iconIdx);
load_tattle_flags(ACTOR_TYPE_JR_TROOPA_4);
return ApiStatus_DONE2;
}
#include "common/FreeIcon.inc.c"
API_CALLABLE(N(FreePointerHudElem)) {
Bytecode* args = script->ptrReadPos;
s32 iconIdx = evt_get_variable(script, *args++);
EvtScript N(nextTurn_80229B38) = {
hud_element_free(iconIdx);
return ApiStatus_DONE2;
}
EvtScript N(EVS_HandlePhase) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetBattlePhase, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(10)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_CASE_EQ(PHASE_PLAYER_BEGIN)
// trying showing the scene where Jr Troopa loses half his HP
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_LostHalfHP, LVar0)
EVT_IF_FALSE(LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LostHalfHP, TRUE)
EVT_WAIT(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(SetBattleCamOffsetZ, 35)
EVT_CALL(MoveBattleCamOver, 30)
EVT_WAIT(20)
EVT_CALL(ActorSpeak, MSG_MAC_Port_00B8, ACTOR_SELF, PRT_2, 0x00210005, 0x00210005)
EVT_CALL(ActorSpeak, MSG_MAC_Port_00B8, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_OutOfBreath, ANIM_JrTroopa_OutOfBreath)
EVT_WAIT(10)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 0x00001000, TRUE)
EVT_CALL(func_8026D940, ACTOR_SELF, -20, 40)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE)
EVT_CALL(SetHPBarOffset, ACTOR_SELF, -20, 40)
EVT_CALL(ShowHealthBar, ACTOR_SELF)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar0, 115)
EVT_SET(LVar1, 150)
EVT_CALL(func_802189DC_447E1C, LVar0, LVar1, LVarA)
EVT_CALL(N(ShowPointerHudElem), LVar0, LVar1, LVarA)
EVT_WAIT(10)
EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0)
EVT_LABEL(0)
EVT_SUB(LVar0, 1)
EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0)
EVT_WAIT(1)
EVT_IF_GT(LVar0, 20)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_JrTroopa_Panic)
EVT_SUB(LVar0, 1)
EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0)
EVT_WAIT(1)
EVT_IF_GT(LVar0, 20)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_Panic)
EVT_WAIT(15)
EVT_LOOP(2)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 0x00001000, FALSE)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, FALSE)
EVT_WAIT(15)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 0x00001000, TRUE)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE)
EVT_WAIT(15)
EVT_END_LOOP
EVT_CALL(ActorSpeak, MSG_MAC_Port_00B9, ACTOR_SELF, PRT_2, 0x00210013, 0x00210013)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 0x00001000, FALSE)
EVT_CALL(N(FreeIcon), LVarA)
EVT_CALL(ActorSpeak, MSG_MAC_Port_00B9, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_Panic, ANIM_JrTroopa_Panic)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, FALSE)
EVT_CALL(N(FreePointerHudElem), LVarA)
EVT_CALL(HideHealthBar, ACTOR_SELF)
EVT_CALL(func_8026D940, ACTOR_SELF, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_JrTroopa_OutOfBreath)
EVT_CALL(SetHPBarOffset, ACTOR_SELF, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_OutOfBreath)
EVT_WAIT(25)
EVT_CALL(ActorSpeak, MSG_MAC_Port_00BA, ACTOR_SELF, PRT_2, 0x00210016, 0x00210003)
EVT_CALL(ActorSpeak, MSG_MAC_Port_00BA, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle)
EVT_WAIT(10)
EVT_EXEC_WAIT(N(802281B4))
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, 1, FALSE)
EVT_EXEC_WAIT(N(EVS_Transform))
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_WAIT(20)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 80, 0)
@ -620,25 +640,25 @@ EvtScript N(nextTurn_80229B38) = {
EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_WAIT(10)
EVT_CALL(ActorSpeak, MSG_MAC_Port_00BB, ACTOR_SELF, PRT_MAIN, 0x0023000F, 0x00230003)
EVT_CALL(ActorSpeak, MSG_MAC_Port_00BB, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Talk, ANIM_SpikedParaJrTroopa_Idle)
EVT_WAIT(10)
EVT_EXEC_WAIT(N(80228574))
EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus))
EVT_END_IF
EVT_CASE_EQ(12)
EVT_CASE_EQ(PHASE_ENEMY_BEGIN)
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8022A018) = {
EvtScript N(EVS_JrTroopa_Death) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar1, 0)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0301)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK)
EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0)
EVT_CALL(HideHealthBar, ACTOR_SELF)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2)
@ -658,9 +678,9 @@ EvtScript N(8022A018) = {
EVT_WAIT(3)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, 1, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, 1, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_JrTroopa_DefeatedBegin)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_DefeatedBegin)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -674,17 +694,17 @@ EvtScript N(8022A018) = {
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 30)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20E5)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_JrTroopa_Defeated)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_2, EVT_PTR(N(IdleAnimations_80227F50)))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_Defeated)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(DefeatedAnims)))
EVT_WAIT(60)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, 0x00400000, TRUE)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8022A39C) = {
EvtScript N(EVS_JrTroopa_FlyHome) = {
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
EVT_CALL(SetGoalToHome, ACTOR_SELF)
@ -697,16 +717,16 @@ EvtScript N(8022A39C) = {
EVT_END
};
EvtScript N(8022A480) = {
EvtScript N(EVS_TryFearReaction) = {
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED)
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_SpookReact, LVar0)
EVT_IF_EQ(LVar0, AVAL_SpookReact_Ready)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None)
EVT_WAIT(10)
EVT_EXEC_WAIT(N(802284DC))
EVT_CALL(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_MAIN, 0x0023000F, 0x00230003)
EVT_EXEC_WAIT(N(80228574))
EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa))
EVT_CALL(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Talk, ANIM_SpikedParaJrTroopa_Idle)
EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus))
EVT_END_IF
EVT_END_IF
EVT_RETURN

File diff suppressed because it is too large Load Diff

View File

@ -4,22 +4,27 @@
#define NAMESPACE A(tutorial_spiked_goomba)
extern s32 N(IdleAnimations_8021A494)[];
extern EvtScript N(init_8021BEBC);
extern EvtScript N(takeTurn_8021B19C);
extern EvtScript N(idle_8021A578);
extern EvtScript N(handleEvent_8021A854);
extern s32 N(DefaultAnims)[];
extern EvtScript N(EVS_Init_Tutorial);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_HandlePhase);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
};
s32 N(DefenseTable_8021A390)[] = {
enum N(ActorParams) {
DMG_SPIKEBONK = 2,
};
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(StatusTable_8021A39C)[] = {
s32 N(StatusTable)[] = {
STATUS_KEY_NORMAL, 0,
STATUS_KEY_DEFAULT, 0,
STATUS_KEY_SLEEP, 100,
@ -51,8 +56,8 @@ ActorPartBlueprint N(ActorParts)[] = {
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(IdleAnimations_8021A494),
.defenseTable = N(DefenseTable_8021A390),
.idleAnimations = N(DefaultAnims),
.defenseTable = N(DefenseTable),
.eventFlags = ACTOR_EVENT_FLAG_SPIKY_TOP,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, -12 },
@ -62,12 +67,12 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_SPIKED_GOOMBA,
.level = 6,
.level = ACTOR_LEVEL_SPIKED_GOOMBA,
.maxHP = 2,
.partCount = ARRAY_COUNT( N(ActorParts)),
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init_8021BEBC),
.statusTable = N(StatusTable_8021A39C),
.initScript = &N(EVS_Init_Tutorial),
.statusTable = N(StatusTable),
.escapeChance = 90,
.airLiftChance = 95,
.hurricaneChance = 90,
@ -82,7 +87,7 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 10, 20 },
};
s32 N(IdleAnimations_8021A494)[] = {
s32 N(DefaultAnims)[] = {
STATUS_KEY_NORMAL, ANIM_SpikedGoomba_Idle,
STATUS_KEY_STONE, ANIM_SpikedGoomba_Still,
STATUS_KEY_SLEEP, ANIM_SpikedGoomba_Sleep,
@ -95,7 +100,7 @@ s32 N(IdleAnimations_8021A494)[] = {
STATUS_END,
};
s32 N(IdleAnimations_8021A4E0)[] = {
s32 N(ShuffleAnims)[] = {
STATUS_KEY_NORMAL, ANIM_SpikedGoomba_Run,
STATUS_KEY_STONE, ANIM_SpikedGoomba_Still,
STATUS_KEY_SLEEP, ANIM_SpikedGoomba_Sleep,
@ -108,82 +113,82 @@ s32 N(IdleAnimations_8021A4E0)[] = {
STATUS_END,
};
EvtScript N(8021A52C) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021B19C)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021A578)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021A854)))
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_RETURN
EVT_END
};
EvtScript N(idle_8021A578) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(10)
EVT_CALL(RandInt, 80, LVar0)
EVT_ADD(LVar0, 80)
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_CALL(RandInt, 80, LVar0)
EVT_ADD(LVar0, 80)
EVT_LOOP(LVar0)
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021A4E0)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021A494)))
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims)))
EVT_LOOP(20)
EVT_LABEL(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021A4E0)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021A494)))
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_END_LOOP
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims)))
EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims)))
EVT_LOOP(80)
EVT_LABEL(2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED)
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(2)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_GOTO(10)
EVT_END_LOOP
EVT_GOTO(10)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_8021A854) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(9)
EVT_CASE_OR_EQ(10)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(14)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_BurnEyesClosed)
EVT_SET_CONST(LVar2, ANIM_SpikedGoomba_BurnEyesOpen)
EVT_EXEC_WAIT(EVS_Enemy_BurnHit)
EVT_CASE_EQ(36)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_BurnEyesClosed)
EVT_SET_CONST(LVar2, ANIM_SpikedGoomba_BurnEyesOpen)
@ -192,11 +197,11 @@ EvtScript N(handleEvent_8021A854) = {
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_BurnEyesOpen)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(11)
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
EVT_CASE_EQ(33)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit)
@ -204,7 +209,7 @@ EvtScript N(handleEvent_8021A854) = {
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_HurtStill)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(47)
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Electrocute)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
@ -222,7 +227,7 @@ EvtScript N(handleEvent_8021A854) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CASE_EQ(38)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Electrocute)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
@ -230,15 +235,15 @@ EvtScript N(handleEvent_8021A854) = {
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_HurtStill)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(19)
EVT_CASE_OR_EQ(23)
EVT_CASE_OR_EQ(25)
EVT_CASE_OR_EQ(31)
EVT_CASE_EQ(EVENT_STAR_BEAM)
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Idle)
EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(32)
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
@ -247,7 +252,7 @@ EvtScript N(handleEvent_8021A854) = {
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_HurtStill)
EVT_EXEC_WAIT(EVS_Enemy_Death)
EVT_RETURN
EVT_CASE_EQ(53)
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Run)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
@ -255,26 +260,26 @@ EvtScript N(handleEvent_8021A854) = {
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(49)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Idle)
EVT_EXEC_WAIT(EVS_Enemy_Recover)
EVT_CASE_EQ(57)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Run)
EVT_SET_CONST(LVar2, ANIM_SpikedGoomba_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_ScareAway)
EVT_RETURN
EVT_CASE_EQ(58)
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Run)
EVT_EXEC_WAIT(EVS_Enemy_AirLift)
EVT_CASE_EQ(22)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt)
EVT_EXEC_WAIT(EVS_Enemy_BlowAway)
EVT_RETURN
EVT_CASE_EQ(27)
EVT_CASE_EQ(EVENT_SPIKE_TAUNT)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Laugh)
@ -292,7 +297,7 @@ EvtScript N(handleEvent_8021A854) = {
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -300,9 +305,9 @@ EvtScript N(handleEvent_8021A854) = {
#include "common/CalculateArcsinDeg.inc.c"
EvtScript N(takeTurn_8021B19C) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
@ -319,7 +324,7 @@ EvtScript N(takeTurn_8021B19C) = {
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, ((0)), 0, 1, BS_FLAGS1_10)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
@ -360,8 +365,8 @@ EvtScript N(takeTurn_8021B19C) = {
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Hurt)
EVT_WAIT(5)
EVT_IF_EQ(LVarA, 5)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0x80000000, 0, 0, 0)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
@ -400,7 +405,7 @@ EvtScript N(takeTurn_8021B19C) = {
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
@ -431,7 +436,7 @@ EvtScript N(takeTurn_8021B19C) = {
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_END_SWITCH
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((0)), 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SPIKEBONK, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
@ -472,24 +477,24 @@ EvtScript N(takeTurn_8021B19C) = {
EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
extern EvtScript N(nextTurn_8021C0FC);
// everything above this point is identical to spiked_goomba
EvtScript N(init_8021BEBC) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021B19C)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021A578)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021A854)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn_8021C0FC)))
EvtScript N(EVS_Init_Tutorial) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_RETURN
EVT_END
};
EvtScript N(8021BF1C) = {
EvtScript N(EVS_TutorialScene) = {
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30)
EVT_WAIT(1)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60)
@ -505,7 +510,7 @@ EvtScript N(8021BF1C) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 10)
EVT_CALL(ActorSpeak, MSG_CH0_00B9, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle)
EVT_SET(GF_Tutorial_SpikyEnemy, 1)
EVT_SET(GF_Tutorial_SpikyEnemy, TRUE)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150)
EVT_WAIT(1)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120)
@ -522,17 +527,17 @@ EvtScript N(8021BF1C) = {
EVT_END
};
EvtScript N(nextTurn_8021C0FC) = {
EvtScript N(EVS_HandlePhase) = {
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_PARTNER, 0)
EVT_CALL(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetBattlePhase, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(10)
EVT_IF_EQ(GF_Tutorial_SpikyEnemy, 0)
EVT_EXEC_WAIT(N(8021BF1C))
EVT_CASE_EQ(PHASE_PLAYER_BEGIN)
EVT_IF_EQ(GF_Tutorial_SpikyEnemy, FALSE)
EVT_EXEC_WAIT(N(EVS_TutorialScene))
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_PARTNER, 1)
EVT_CALL(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_RETURN
EVT_END

View File

@ -3,10 +3,10 @@
#define NAMESPACE A(bowser)
extern EvtScript N(init);
extern EvtScript N(idle);
extern EvtScript N(takeTurn);
extern EvtScript N(handleEvent);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(onHit);
extern EvtScript N(onDeath);
extern EvtScript N(normalAttack);
@ -14,7 +14,7 @@ extern EvtScript N(attackShockwaveDrain);
extern EvtScript N(attackFlameBreath);
extern EvtScript N(attackClawSwipe);
extern EvtScript N(attackHeavyJump);
extern EvtScript N(returnHome);
extern EvtScript N(EVS_ReturnHome);
extern EvtScript N(recover);
enum N(ActorPartIDs) {
@ -89,11 +89,11 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_BOWSER_PHASE_1,
.level = 100,
.level = ACTOR_LEVEL_BOWSER_PHASE_1,
.maxHP = 50,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
@ -109,10 +109,10 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 10, 60 },
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURN_COUNTER), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_AFTER_SHOCKWAVE), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_3), 1)
@ -120,7 +120,7 @@ EvtScript N(init) = {
EVT_END
};
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(0)
EVT_WAIT(1)
EVT_GOTO(0)
@ -128,7 +128,7 @@ EvtScript N(idle) = {
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastElement, LVarE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
@ -207,7 +207,7 @@ EvtScript N(onDeath) = {
EVT_END
};
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_TURN_COUNTER), LVar0)
EVT_ADD(LVar0, 1)
EVT_IF_LT(LVar0, 5)
@ -294,7 +294,7 @@ EvtScript N(attackClawSwipe) = {
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
@ -315,7 +315,7 @@ EvtScript N(attackClawSwipe) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
@ -372,7 +372,7 @@ EvtScript N(attackHeavyJump) = {
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
@ -409,7 +409,7 @@ EvtScript N(attackHeavyJump) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
@ -573,7 +573,7 @@ EvtScript N(attackShockwaveDrain) = {
EVT_END
};
EvtScript N(returnHome) = {
EvtScript N(EVS_ReturnHome) = {
EVT_SET(LVar0, 1)
EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_CALL(SetGoalToHome, ACTOR_SELF)

View File

@ -6,11 +6,11 @@
#define NAMESPACE A(bowser_intro)
extern EvtScript N(init);
extern EvtScript N(idle);
extern EvtScript N(takeTurn);
extern EvtScript N(handleEvent);
extern EvtScript N(nextTurn);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_HandlePhase);
extern EvtScript N(unkDecorationScript);
extern EvtScript N(makeWalkingSounds);
extern EvtScript N(onHit);
@ -18,7 +18,7 @@ extern EvtScript N(onDeath);
extern EvtScript N(attackClawSwipe);
extern EvtScript N(powerUp);
extern EvtScript N(attackFireBreath);
extern EvtScript N(returnHome);
extern EvtScript N(EVS_ReturnHome);
extern EvtScript N(useStarRod);
enum N(ActorPartIDs) {
@ -26,6 +26,16 @@ enum N(ActorPartIDs) {
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_1 = 1,
AVAR_Unk_E = 14,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
enum N(OldActorVars) {
N(VAR_TURN_COUNTER) = 0,
N(VAR_PEACH_SPOKE) = 1,
};
@ -122,11 +132,11 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_INTRO_BOWSER,
.level = 0,
.level = ACTOR_LEVEL_INTRO_BOWSER,
.maxHP = 10,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
@ -151,19 +161,19 @@ ActorBlueprint NAMESPACE = {
#include "common/StarRodAppearEffect.inc.c"
#include "common/StarRodPowerUpEffect.inc.c"
EvtScript N(init) = {
EvtScript N(EVS_Init) = {
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURN_COUNTER), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_PEACH_SPOKE), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 14, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_E, 0)
EVT_CALL(SetBattleMenuEnabledFlags, BTL_MENU_ENABLED_JUMP)
EVT_CALL(CreateNpc, NPC_BTL_COMPANION, ANIM_ParadePeach_IdleRaisedArms)
EVT_CALL(SetNpcYaw, NPC_BTL_COMPANION, 90)
EVT_CALL(SetNpcPos, NPC_BTL_COMPANION, -130, 0, -12)
EVT_CALL(EnableNpcShadow, NPC_BTL_COMPANION, TRUE)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 100, 0, 0, 0)
EVT_EXEC(N(unkDecorationScript))
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_NO_GAME_OVER, TRUE)
@ -172,7 +182,7 @@ EvtScript N(init) = {
EVT_END
};
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_LABEL(0)
EVT_EXEC_WAIT(N(makeWalkingSounds))
@ -182,7 +192,7 @@ EvtScript N(idle) = {
EVT_END
};
EvtScript N(nextTurn) = {
EvtScript N(EVS_HandlePhase) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetBattlePhase, LVar0)
EVT_SWITCH(LVar0)
@ -220,7 +230,7 @@ EvtScript N(nextTurn) = {
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastElement, LVarE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
@ -306,7 +316,7 @@ EvtScript N(onDeath) = {
EVT_END
};
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_TURN_COUNTER), LVar0)
EVT_ADD(LVar0, 1)
@ -382,7 +392,7 @@ EvtScript N(attackClawSwipe) = {
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
@ -501,7 +511,7 @@ EvtScript N(powerUp) = {
EVT_END
};
EvtScript N(returnHome) = {
EvtScript N(EVS_ReturnHome) = {
EVT_SET(LVar0, 1)
EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_CALL(SetGoalToHome, ACTOR_SELF)

View File

@ -3,11 +3,11 @@
#define NAMESPACE A(bowser_phase_1)
extern EvtScript N(init);
extern EvtScript N(idle);
extern EvtScript N(takeTurn);
extern EvtScript N(handleEvent);
extern EvtScript N(nextTurn);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_HandlePhase);
extern EvtScript N(unkDecorationScript);
extern EvtScript N(attackFlameBreath);
extern EvtScript N(attackClawSwipe);
@ -21,7 +21,7 @@ extern EvtScript N(onHit);
extern EvtScript N(onImmune);
extern EvtScript N(onDeath);
extern EvtScript N(jumpHome);
extern EvtScript N(returnHome);
extern EvtScript N(EVS_ReturnHome);
extern EvtScript N(onSpinSmashOrNormalHit);
extern EvtScript N(onBurnHit);
extern EvtScript N(makeWalkingSounds);
@ -31,6 +31,25 @@ enum N(ActorPartIDs) {
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_1 = 1,
AVAR_Unk_2 = 2,
AVAR_Unk_3 = 3,
AVAR_Unk_4 = 4,
AVAR_Unk_5 = 5,
AVAR_Unk_6 = 6,
AVAR_Unk_7 = 7,
AVAR_Unk_8 = 8,
AVAR_Unk_9 = 9,
AVAR_Unk_A = 10,
AVAR_Unk_E = 14,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
enum N(OldActorVars) {
N(VAR_TURN_COUNTER) = 0,
N(VAR_FLAGS) = 1,
N(VAR_TURNS_SINCE_LAST_SHOCKWAVE_DRAIN) = 2,
@ -135,11 +154,11 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_BOWSER_PHASE_1,
.level = 100,
.level = ACTOR_LEVEL_BOWSER_PHASE_1,
.maxHP = 50,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
@ -167,7 +186,7 @@ ActorBlueprint NAMESPACE = {
#include "common/ItemEntityJumpToPos.inc.c"
#include "common/GetItemEntityPosition.inc.c"
EvtScript N(init) = {
EvtScript N(EVS_Init) = {
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURN_COUNTER), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_SINCE_LAST_SHOCKWAVE_DRAIN), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_SINCE_LAST_CLAW_SWIPE), 3)
@ -177,18 +196,18 @@ EvtScript N(init) = {
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_SINCE_LAST_STAR_BEAM), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_SINCE_LAST_RECOVER), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_RECOVERS_LEFT), 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 14, 0)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn)))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_E, 0)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 100, 0, 0, 0)
EVT_EXEC(N(unkDecorationScript))
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar3)
EVT_LABEL(0)
@ -209,7 +228,7 @@ EvtScript N(idle) = {
EVT_END
};
EvtScript N(nextTurn) = {
EvtScript N(EVS_HandlePhase) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetBattlePhase, LVar0)
EVT_SWITCH(LVar0)
@ -232,13 +251,13 @@ EvtScript N(nextTurn) = {
EVT_CALL(EnableBattleStatusBar, TRUE)
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastElement, LVarE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
@ -312,7 +331,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(N(jumpHome))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
@ -526,7 +545,7 @@ EvtScript N(onImmune) = {
EVT_END
};
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_EXEC_WAIT(N(doTakeTurn))
@ -557,7 +576,7 @@ EvtScript N(powerUp) = {
EVT_END
};
EvtScript N(returnHome) = {
EvtScript N(EVS_ReturnHome) = {
EVT_SET(LVar0, 1)
EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
@ -787,7 +806,7 @@ EvtScript N(recover) = {
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_206D)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE)
EVT_WAIT(30)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SRAW_16_A)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(FreezeBattleState, TRUE)
@ -1052,7 +1071,7 @@ EvtScript N(attackHeavyJump) = {
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
@ -1190,7 +1209,7 @@ EvtScript N(attackHeavyJump) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_RETURN
EVT_END
};
@ -1259,7 +1278,7 @@ EvtScript N(attackClawSwipe) = {
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
@ -1290,7 +1309,7 @@ EvtScript N(attackClawSwipe) = {
EVT_CALL(MoveBattleCamOver, 20)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_RETURN

View File

@ -3,10 +3,10 @@
#define NAMESPACE A(bowser_phase_2)
extern EvtScript N(init);
extern EvtScript N(idle);
extern EvtScript N(takeTurn);
extern EvtScript N(handleEvent);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(attackFlameBreath);
extern EvtScript N(attackLightningBlast);
extern EvtScript N(attackShockwaveDrain);
@ -19,7 +19,7 @@ extern EvtScript N(doTakeTurn);
extern EvtScript N(doOnHit);
extern EvtScript N(onHit);
extern EvtScript N(onImmune);
extern EvtScript N(returnHome);
extern EvtScript N(EVS_ReturnHome);
extern EvtScript N(jumpHome);
extern EvtScript N(onBurnHit);
extern EvtScript N(makeWalkingSounds);
@ -30,6 +30,25 @@ enum N(ActorPartIDs) {
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_1 = 1,
AVAR_Unk_2 = 2,
AVAR_Unk_3 = 3,
AVAR_Unk_4 = 4,
AVAR_Unk_5 = 5,
AVAR_Unk_6 = 6,
AVAR_Unk_7 = 7,
AVAR_Unk_8 = 8,
AVAR_Unk_9 = 9,
AVAR_Unk_A = 10,
AVAR_Unk_E = 14,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
enum N(OldActorVars) {
N(VAR_TURN_COUNTER) = 0,
N(VAR_TURNS_SINCE_LAST_SHOCKWAVE_DRAIN) = 2,
N(VAR_TURNS_SINCE_LAST_STAR_BEAM) = 3,
@ -133,11 +152,11 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_BOWSER_PHASE_2,
.level = 0,
.level = ACTOR_LEVEL_BOWSER_PHASE_2,
.maxHP = 99,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
@ -166,7 +185,7 @@ ActorBlueprint NAMESPACE = {
#include "common/ItemEntityJumpToPos.inc.c"
#include "common/GetItemEntityPosition.inc.c"
EvtScript N(init) = {
EvtScript N(EVS_Init) = {
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURN_COUNTER), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_SINCE_LAST_SHOCKWAVE_DRAIN), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_SINCE_LAST_CLAW_SWIPE), 3)
@ -174,7 +193,7 @@ EvtScript N(init) = {
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_SINCE_LAST_STAR_BEAM), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_SINCE_LAST_RECOVER), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_RECOVERS_LEFT), 3)
EVT_CALL(SetActorVar, ACTOR_SELF, 14, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_E, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_COMMAND_LOSS_STATE), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_LOST_ABILITY_ITEM), 0)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.5), EVT_FLOAT(1.5), EVT_FLOAT(1.0))
@ -182,15 +201,15 @@ EvtScript N(init) = {
EVT_EXEC(N(unkDecorationScript))
EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 150, 150, 0, 0)
EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_A)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_400 | BS_FLAGS2_DONT_STOP_MUSIC, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar3)
EVT_LABEL(0)
@ -213,7 +232,7 @@ EvtScript N(idle) = {
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastElement, LVarE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
@ -253,7 +272,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(N(jumpHome))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
@ -263,7 +282,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(N(jumpHome))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(GetDamageSource, LVar2)
@ -393,7 +412,7 @@ EvtScript N(onImmune) = {
EVT_END
};
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_EXEC_WAIT(N(doTakeTurn))
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
@ -408,7 +427,7 @@ EvtScript N(powerUp) = {
EVT_END
};
EvtScript N(returnHome) = {
EvtScript N(EVS_ReturnHome) = {
EVT_SET(LVar0, 1)
EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
@ -638,7 +657,7 @@ EvtScript N(recover) = {
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_206D)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE)
EVT_WAIT(30)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SRAW_16_A)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(FreezeBattleState, TRUE)
@ -905,7 +924,7 @@ EvtScript N(attackHeavyJump) = {
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
@ -1043,7 +1062,7 @@ EvtScript N(attackHeavyJump) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_RETURN
EVT_END
};
@ -1112,7 +1131,7 @@ EvtScript N(attackClawSwipe) = {
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
@ -1141,7 +1160,7 @@ EvtScript N(attackClawSwipe) = {
EVT_CALL(MoveBattleCamOver, 20)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_RETURN
@ -1572,7 +1591,7 @@ EvtScript N(attackLightningBlast) = {
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
@ -1598,7 +1617,7 @@ EvtScript N(attackLightningBlast) = {
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_RETURN

View File

@ -3,11 +3,11 @@
#define NAMESPACE A(bowser_phase_3)
extern EvtScript N(init);
extern EvtScript N(idle);
extern EvtScript N(takeTurn);
extern EvtScript N(handleEvent);
extern EvtScript N(nextTurn);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_HandlePhase);
extern EvtScript N(attackFlameBreath);
extern EvtScript N(attackClawSwipe);
extern EvtScript N(attackHeavyJump);
@ -21,7 +21,7 @@ extern EvtScript N(doOnHit);
extern EvtScript N(onImmune);
extern EvtScript N(onDeath);
extern EvtScript N(jumpHome);
extern EvtScript N(returnHome);
extern EvtScript N(EVS_ReturnHome);
extern EvtScript N(onHit);
extern EvtScript N(onBurnHit);
extern EvtScript N(makeWalkingSounds);
@ -32,6 +32,25 @@ enum N(ActorPartIDs) {
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_1 = 1,
AVAR_Unk_2 = 2,
AVAR_Unk_3 = 3,
AVAR_Unk_4 = 4,
AVAR_Unk_5 = 5,
AVAR_Unk_6 = 6,
AVAR_Unk_7 = 7,
AVAR_Unk_8 = 8,
AVAR_Unk_9 = 9,
AVAR_Unk_A = 10,
AVAR_Unk_E = 14,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
enum N(OldActorVars) {
N(VAR_TURN_COUNTER) = 0,
N(VAR_FLAGS) = 1,
N(VAR_TURNS_SINCE_LAST_SHOCKWAVE_DRAIN) = 2,
@ -136,11 +155,11 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_BOWSER_PHASE_3,
.level = 0,
.level = ACTOR_LEVEL_BOWSER_PHASE_3,
.maxHP = 99,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
@ -209,7 +228,7 @@ API_CALLABLE(N(MakeLightnings)) {
#include "common/ItemEntityJumpToPos.inc.c"
#include "common/GetItemEntityPosition.inc.c"
EvtScript N(init) = {
EvtScript N(EVS_Init) = {
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURN_COUNTER), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_SINCE_LAST_SHOCKWAVE_DRAIN), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_SINCE_LAST_CLAW_SWIPE), 3)
@ -219,7 +238,7 @@ EvtScript N(init) = {
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_SINCE_LAST_STAR_BEAM), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_SINCE_LAST_RECOVER), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_RECOVERS_LEFT), 3)
EVT_CALL(SetActorVar, ACTOR_SELF, 14, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_E, 0)
EVT_CALL(SetEnemyHP, ACTOR_SELF, GB_FinalBowserHP)
EVT_IF_LT(GB_FinalBowserHP, 1)
EVT_CALL(SetEnemyHP, ACTOR_SELF, 1)
@ -233,16 +252,16 @@ EvtScript N(init) = {
EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 1, ACTOR_DECORATION_RADIAL_STAR_EMITTER)
EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefenseTable_boosted)))
EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable_boosted)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_DONT_STOP_MUSIC, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar3)
EVT_LABEL(0)
@ -265,7 +284,7 @@ EvtScript N(idle) = {
EVT_END
};
EvtScript N(nextTurn) = {
EvtScript N(EVS_HandlePhase) = {
EVT_CALL(GetBattlePhase, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(PHASE_PLAYER_BEGIN)
@ -339,7 +358,7 @@ EvtScript N(nextTurn) = {
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastElement, LVarE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
@ -391,7 +410,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(N(jumpHome))
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
@ -581,7 +600,7 @@ EvtScript N(onDeath) = {
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_END_IF
EVT_END_THREAD
EVT_CALL(EnableActorBlur, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE)
EVT_CALL(MakeLerp, 0, 0x00001950, 100, EASING_COS_IN_OUT)
EVT_LABEL(2)
EVT_CALL(UpdateLerp)
@ -591,7 +610,7 @@ EvtScript N(onDeath) = {
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(2)
EVT_END_IF
EVT_CALL(EnableActorBlur, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_HurtStill)
EVT_WAIT(15)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_COLLAPSE)
@ -652,7 +671,7 @@ EvtScript N(onImmune) = {
EVT_END
};
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_EXEC_WAIT(N(doTakeTurn))
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
@ -667,7 +686,7 @@ EvtScript N(powerUp) = {
EVT_END
};
EvtScript N(returnHome) = {
EvtScript N(EVS_ReturnHome) = {
EVT_SET(LVar0, 1)
EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
@ -897,7 +916,7 @@ EvtScript N(recover) = {
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_206D)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE)
EVT_WAIT(30)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SRAW_16_A)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(FreezeBattleState, TRUE)
@ -1138,7 +1157,7 @@ EvtScript N(attackHeavyJump) = {
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
@ -1276,7 +1295,7 @@ EvtScript N(attackHeavyJump) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_RETURN
EVT_END
};
@ -1345,7 +1364,7 @@ EvtScript N(attackClawSwipe) = {
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
@ -1374,7 +1393,7 @@ EvtScript N(attackClawSwipe) = {
EVT_CALL(MoveBattleCamOver, 20)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_RETURN
@ -1514,7 +1533,7 @@ EvtScript N(attackShockwaveDrain) = {
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE)
EVT_CASE_OR_EQ(10)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle)
EVT_WAIT(15)
EVT_IF_EQ(LVarF, 10)
@ -1805,7 +1824,7 @@ EvtScript N(attackLightningBlast) = {
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
@ -1831,7 +1850,7 @@ EvtScript N(attackLightningBlast) = {
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_EXEC_WAIT(N(EVS_ReturnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_RETURN

View File

@ -6,10 +6,10 @@
#define NAMESPACE b_area_kpa4_bombshell_bill
extern EvtScript N(init);
extern EvtScript N(idle);
extern EvtScript N(takeTurn);
extern EvtScript N(handleEvent);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(playExplosionEffects);
extern s32 N(IdleAnimations)[];
@ -18,6 +18,15 @@ enum N(ActorPartIDs) {
PRT_MAIN = 1,
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_1 = 1,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
@ -66,11 +75,11 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_BOMBSHELL_BILL,
.level = 24,
.level = ACTOR_LEVEL_BOMBSHELL_BILL,
.maxHP = 3,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 40,
.airLiftChance = 100,
@ -94,11 +103,11 @@ s32 N(IdleAnimations)[] = {
STATUS_END,
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 16)
@ -106,7 +115,7 @@ EvtScript N(init) = {
EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_ELSE
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_1, LVar0)
EVT_CALL(GetActorPos, LVar0, LVar1, LVar2, LVar3)
EVT_CALL(GetStatusFlags, LVar0, LVar4)
EVT_IF_FLAG(LVar4, STATUS_FLAG_SHRINK)
@ -136,7 +145,7 @@ EvtScript N(init) = {
EVT_END
};
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_RETURN
EVT_END
};
@ -151,9 +160,9 @@ EvtScript N(explode) = {
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(EVENT_HIT_COMBO)
@ -225,15 +234,15 @@ EvtScript N(handleEvent) = {
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
@ -298,7 +307,7 @@ EvtScript N(playExplosionEffects) = {
EVT_ADD(LVar1, 16)
EVT_ADD(LVar2, 2)
EVT_PLAY_EFFECT(EFFECT_BLAST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(3.0), 30, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SRAW_20_A)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BULLET_BILL_EXPLODE_A)
EVT_CALL(StartRumble, 11)
EVT_THREAD
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0))

View File

@ -8,10 +8,10 @@
#define NAMESPACE A(bombshell_bill_blaster)
extern EvtScript N(init);
extern EvtScript N(idle);
extern EvtScript N(takeTurn);
extern EvtScript N(handleEvent);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(bulletShot);
extern EvtScript N(wait);
@ -21,6 +21,15 @@ enum N(ActorPartIDs) {
PRT_MAIN = 1,
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_8 = 8,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
s32 N(DefenseTable)[] = {
ELEMENT_NORMAL, 4,
ELEMENT_END,
@ -69,11 +78,11 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_BOMBSHELL_BLASTER,
.level = 27,
.level = ACTOR_LEVEL_BOMBSHELL_BLASTER,
.maxHP = 10,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 15,
@ -97,23 +106,23 @@ s32 N(IdleAnimations)[] = {
STATUS_END,
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_8, 0)
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
@ -167,23 +176,23 @@ EvtScript N(handleEvent) = {
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_8, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_EXEC_WAIT(N(bulletShot))
EVT_CASE_EQ(1)
EVT_EXEC_WAIT(N(wait))
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -215,17 +224,17 @@ EvtScript N(bulletShot) = {
EVT_WAIT(2)
EVT_CALL(ApplyBillSettings)
EVT_CALL(SummonEnemy, EVT_PTR(N(formation_bill)), FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_8, 1)
EVT_RETURN
EVT_END
};
EvtScript N(wait) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_CALL(ActorExists, LVar0, LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_8, 0)
EVT_END_IF
EVT_RETURN
EVT_END

View File

@ -5,10 +5,10 @@
#define NAMESPACE A(lava_bud)
extern EvtScript N(init);
extern EvtScript N(idle);
extern EvtScript N(takeTurn);
extern EvtScript N(handleEvent);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(playModelAnimation);
extern EvtScript N(onHitCombo);
extern EvtScript N(onHit);
@ -33,6 +33,27 @@ enum N(ActorPartIDs) {
PRT_2 = 2,
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_1 = 1,
AVAR_Unk_2 = 2,
AVAR_Unk_3 = 3,
AVAR_Unk_4 = 4,
AVAR_Unk_5 = 5,
AVAR_Unk_6 = 6,
AVAR_Unk_7 = 7,
AVAR_Unk_8 = 8,
AVAR_Unk_9 = 9,
AVAR_Unk_A = 10,
AVAR_Unk_B = 11,
AVAR_Unk_C = 12,
AVAR_Unk_D = 13,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
static s32 N(unusedArray)[64];
MATCHING_BSS(0x8A0);
@ -150,11 +171,11 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_LAVA_BUD_PHASE_1,
.level = 0,
.level = ACTOR_LEVEL_LAVA_BUD_PHASE_1,
.maxHP = 8,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
@ -170,27 +191,27 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 0, 0 },
};
EvtScript N(init) = {
EvtScript N(EVS_Init) = {
EVT_USE_ARRAY(N(unusedArray))
EVT_CALL(SetActorVar, ACTOR_SELF, 5, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 6, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 9, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 4, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 11, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 13, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_5, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_6, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_9, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_4, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_D, 0)
EVT_CALL(RandInt, 20, LVar0)
EVT_ADD(LVar0, 15)
EVT_CALL(SetActorVar, ACTOR_SELF, 13, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, 7, ANIM_LavaBud_Anim03)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, ANIM_LavaBud_Anim09)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_D, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_7, ANIM_LavaBud_Anim03)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_8, ANIM_LavaBud_Anim09)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(0)
EVT_CALL(GetActorHP, ACTOR_ENEMY0, LVar0)
EVT_IF_EQ(LVar0, 0)
@ -200,23 +221,23 @@ EvtScript N(idle) = {
EVT_IF_FLAG(LVar0, ACTOR_FLAG_NO_DMG_APPLY)
EVT_GOTO(99)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_NE(LVar0, 2)
EVT_GOTO(99)
EVT_END_IF
EVT_LABEL(10)
EVT_CALL(GetActorVar, ACTOR_SELF, 13, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_D, LVar0)
EVT_SUB(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 13, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_D, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_GOTO(99)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 12, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_C, LVar0)
EVT_ADD(LVar0, 1)
EVT_IF_GE(LVar0, 3)
EVT_SET(LVar0, 0)
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 12, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_C, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(RandInt, 50, LVar0)
@ -228,8 +249,8 @@ EvtScript N(idle) = {
EVT_CALL(RandInt, 3, LVar0)
EVT_ADD(LVar0, 3)
EVT_END_SWITCH
EVT_CALL(SetActorVar, ACTOR_SELF, 13, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_D, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE)
EVT_ELSE
@ -254,10 +275,10 @@ EvtScript N(playModelAnimation) = {
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0)
EVT_CALL(GetLastElement, LVarE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
@ -281,7 +302,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(N(onDeath))
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_8, LVar1)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_EXEC_WAIT(EVS_Enemy_ShockHit)
@ -299,21 +320,21 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(N(onDeath))
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0)
EVT_CASE_EQ(EVENT_30)
EVT_SET_CONST(LVar0, PRT_MAIN)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_8, LVar1)
EVT_EXEC_WAIT(EVS_Enemy_Hit)
EVT_WAIT(1000)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_STOP)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 1)
EVT_END_IF
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -322,15 +343,15 @@ EvtScript N(handleEvent) = {
EvtScript N(onBurnHit) = {
EVT_THREAD
EVT_WAIT(1)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar2)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar2)
EVT_IF_EQ(LVar2, 1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET(LVar0, ACTOR_ENEMY1)
EVT_ELSE
@ -339,11 +360,11 @@ EvtScript N(onBurnHit) = {
EVT_EXEC_WAIT(A(lava_piranha_ignite))
EVT_LABEL(10)
EVT_END_THREAD
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, AVAR_Unk_0, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE)
EVT_ELSE
@ -351,14 +372,14 @@ EvtScript N(onBurnHit) = {
EVT_END_IF
EVT_CALL(LoadBattleDmaData, 29)
EVT_EXEC_WAIT(N(playModelAnimation))
EVT_CALL(SetActorVar, ACTOR_SELF, 7, ANIM_LavaBud_Anim03)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, ANIM_LavaBud_Anim09)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_7, ANIM_LavaBud_Anim03)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_8, ANIM_LavaBud_Anim09)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_fiery)))
EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefenseTable_fiery)))
EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_2, EVT_PTR(N(DefenseTable_fiery)))
EVT_THREAD
EVT_WAIT(14)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE)
EVT_ELSE
@ -373,39 +394,39 @@ EvtScript N(onBurnHit) = {
EVT_END
};
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, ACTOR_FLAG_NO_DMG_APPLY)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_RETURN
EVT_END_IF
EVT_EXEC_WAIT(N(attackPetitSpit))
EVT_ELSE
EVT_CALL(GetActorVar, ACTOR_SELF, 4, LVar1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_4, LVar1)
EVT_IF_NE(LVar1, 0)
EVT_SUB(LVar1, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 4, LVar1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_4, LVar1)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_IF_NE(LVar1, 0)
EVT_RETURN
EVT_END_IF
EVT_CALL(SetActorVar, ACTOR_SELF, 4, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_4, 1)
EVT_EXEC_WAIT(N(summonPetitPiranha))
EVT_ELSE
EVT_CALL(GetActorVar, ACTOR_SELF, 11, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_B, LVar0)
EVT_SUB(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 11, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, LVar0)
EVT_IF_LE(LVar0, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(SetBattleCamTarget, 40, 30, 0)
@ -435,7 +456,7 @@ EvtScript N(takeTurn) = {
EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0)
EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim04)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_SET(LVar0, ACTOR_ENEMY1)
EVT_ELSE
@ -443,7 +464,7 @@ EvtScript N(takeTurn) = {
EVT_END_IF
EVT_CALL(PlaySoundAtActor, LVar0, SOUND_20BF)
EVT_EXEC_WAIT(A(lava_piranha_ignite))
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE)
EVT_ELSE
@ -461,7 +482,7 @@ EvtScript N(takeTurn) = {
EVT_EXEC_WAIT(N(playModelAnimation))
EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0)
EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_END_IF
EVT_END_IF
EVT_END_IF
@ -471,11 +492,11 @@ EvtScript N(takeTurn) = {
};
EvtScript N(8022630C) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 7, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_7, LVar0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 0, LVar3)
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar3)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, AVAR_Unk_0, LVar3)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar3)
EVT_IF_EQ(LVar3, 2)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE)
@ -498,11 +519,11 @@ EvtScript N(8022630C) = {
};
EvtScript N(summonPetitPiranha) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 9, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_9, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_RETURN
EVT_END_IF
@ -519,7 +540,7 @@ EvtScript N(summonPetitPiranha) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 20)
EVT_END_THREAD
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE)
EVT_ELSE
@ -549,14 +570,14 @@ EvtScript N(summonPetitPiranha) = {
EVT_CALL(SummonEnemy, EVT_PTR(N(formation_petit_piranha_2)), FALSE)
EVT_END_IF
EVT_SET(LVar5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, 9, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_9, LVar0)
EVT_ADD(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 9, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_9, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(SetActorVar, LVar5, 0, ACTOR_ENEMY1)
EVT_CALL(SetActorVar, LVar5, AVAR_Unk_0, ACTOR_ENEMY1)
EVT_ELSE
EVT_CALL(SetActorVar, LVar5, 0, ACTOR_ENEMY2)
EVT_CALL(SetActorVar, LVar5, AVAR_Unk_0, ACTOR_ENEMY2)
EVT_END_IF
EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_MAIN, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 15)
@ -565,7 +586,7 @@ EvtScript N(summonPetitPiranha) = {
EVT_SUB(LVar0, 30)
EVT_SUB(LVar1, 15)
EVT_CALL(PlaySoundAtActor, LVar5, SOUND_03C9)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar9)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar9)
EVT_IF_EQ(LVar9, 1)
EVT_CALL(GetActorPos, LVar5, LVar0, LVar1, LVar2)
EVT_SET(LVar0, -12)
@ -586,7 +607,7 @@ EvtScript N(summonPetitPiranha) = {
EVT_CALL(FlyToGoal, LVar5, 16, -15, EASING_CUBIC_OUT)
EVT_END_IF
EVT_CALL(HPBarToHome, LVar5)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE)
EVT_ELSE
@ -594,7 +615,7 @@ EvtScript N(summonPetitPiranha) = {
EVT_END_IF
EVT_CALL(LoadBattleDmaData, 31)
EVT_EXEC_WAIT(N(playModelAnimation))
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -615,16 +636,16 @@ Formation N(formation_petit_piranha_bomb) = {
};
EvtScript N(onDeath) = {
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, AVAR_Unk_0, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_EXEC_WAIT(N(onHit))
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_8, LVar0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE)
EVT_ELSE
@ -632,23 +653,23 @@ EvtScript N(onDeath) = {
EVT_END_IF
EVT_CALL(LoadBattleDmaData, 21)
EVT_EXEC_WAIT(N(playModelAnimation))
EVT_CALL(SetActorVar, ACTOR_SELF, 11, 2)
EVT_CALL(GetActorVar, ACTOR_SELF, 6, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, 2)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_6, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(RemoveEffect, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, 6, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_6, 0)
EVT_END_IF
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_wet)))
EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefenseTable_wet)))
EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_2, EVT_PTR(N(DefenseTable_wet)))
EVT_CALL(SetActorVar, ACTOR_SELF, 7, ANIM_LavaBud_Anim0F)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, ANIM_LavaBud_Anim09)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_7, ANIM_LavaBud_Anim0F)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_8, ANIM_LavaBud_Anim09)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim0F)
EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, FALSE)
EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_2, ACTOR_EVENT_FLAG_FIREY, FALSE)
EVT_WAIT(29)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_03C7)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE)
EVT_ELSE
@ -657,16 +678,16 @@ EvtScript N(onDeath) = {
EVT_CALL(LoadBattleDmaData, 27)
EVT_EXEC_WAIT(N(playModelAnimation))
EVT_WAIT(14)
EVT_CALL(SetActorVar, ACTOR_SELF, 5, 2)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 1, LVarF)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_5, 2)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, AVAR_Unk_1, LVarF)
EVT_IF_EQ(LVarF, 0)
EVT_EXEC_WAIT(N(8022630C))
EVT_END_IF
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE)
EVT_ELSE
@ -675,11 +696,11 @@ EvtScript N(onDeath) = {
EVT_CALL(LoadBattleDmaData, 21)
EVT_EXEC_WAIT(N(playModelAnimation))
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_wet)))
EVT_CALL(SetActorVar, ACTOR_SELF, 7, ANIM_LavaBud_Anim0F)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, ANIM_LavaBud_Anim09)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_7, ANIM_LavaBud_Anim0F)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_8, ANIM_LavaBud_Anim09)
EVT_WAIT(29)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_03C7)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE)
EVT_ELSE
@ -688,7 +709,7 @@ EvtScript N(onDeath) = {
EVT_CALL(LoadBattleDmaData, 27)
EVT_EXEC_WAIT(N(playModelAnimation))
EVT_WAIT(14)
EVT_CALL(SetActorVar, ACTOR_SELF, 5, 2)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_5, 2)
EVT_EXEC_WAIT(N(8022630C))
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_2, ACTOR_PART_FLAG_2000 | ACTOR_PART_FLAG_NO_TARGET, TRUE)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_HEALTH_BAR, TRUE)
@ -701,12 +722,12 @@ EvtScript N(onDeath) = {
};
EvtScript N(onHitCombo) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_8, LVar0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 0, LVar1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, AVAR_Unk_0, LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar5)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar5)
EVT_IF_NE(LVar5, 2)
EVT_CALL(GetLastDamage, ACTOR_SELF, LVar5)
EVT_IF_LT(LVar5, 4)
@ -747,7 +768,7 @@ EvtScript N(onHitCombo) = {
EVT_WAIT(29)
EVT_END_IF
EVT_ELSE
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar5)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar5)
EVT_IF_EQ(LVar5, 1)
EVT_CALL(GetLastDamage, ACTOR_SELF, LVar5)
EVT_IF_LT(LVar5, 4)
@ -797,12 +818,12 @@ EvtScript N(onHitCombo) = {
};
EvtScript N(onHit) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_8, LVar0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 0, LVar5)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, AVAR_Unk_0, LVar5)
EVT_IF_EQ(LVar5, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar5)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar5)
EVT_IF_EQ(LVar5, 0)
EVT_CALL(GetLastDamage, ACTOR_SELF, LVar5)
EVT_IF_LT(LVar5, 4)
@ -844,7 +865,7 @@ EvtScript N(onHit) = {
EVT_END_IF
EVT_ELSE
EVT_IF_FLAG(LVarE, DAMAGE_TYPE_ICE | DAMAGE_TYPE_WATER)
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar3)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar3)
EVT_IF_EQ(LVar3, 2)
EVT_CALL(GetLastDamage, ACTOR_SELF, LVar5)
EVT_IF_LT(LVar5, 4)
@ -872,25 +893,25 @@ EvtScript N(onHit) = {
EVT_END_IF
EVT_CALL(LoadBattleDmaData, 21)
EVT_EXEC_WAIT(N(playModelAnimation))
EVT_CALL(SetActorVar, ACTOR_SELF, 11, 2)
EVT_CALL(GetActorVar, ACTOR_SELF, 6, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, 2)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_6, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(RemoveEffect, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, 6, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_6, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_PLAY_EFFECT(EFFECT_COLD_BREATH, 0, LVar0, LVar1, LVar2, EVT_FLOAT(2.0), 45, 0)
EVT_END_IF
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_wet)))
EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefenseTable_wet)))
EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_2, EVT_PTR(N(DefenseTable_wet)))
EVT_CALL(SetActorVar, ACTOR_SELF, 7, ANIM_LavaBud_Anim0F)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, ANIM_LavaBud_Anim09)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_7, ANIM_LavaBud_Anim0F)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_8, ANIM_LavaBud_Anim09)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim0F)
EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, FALSE)
EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_2, ACTOR_EVENT_FLAG_FIREY, FALSE)
EVT_WAIT(29)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_03C7)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE)
EVT_ELSE
@ -899,10 +920,10 @@ EvtScript N(onHit) = {
EVT_CALL(LoadBattleDmaData, 27)
EVT_EXEC_WAIT(N(playModelAnimation))
EVT_WAIT(14)
EVT_CALL(SetActorVar, ACTOR_SELF, 5, 2)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_5, 2)
EVT_END_IF
EVT_ELSE
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar3)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar3)
EVT_IF_EQ(LVar3, 2)
EVT_CALL(GetLastDamage, ACTOR_SELF, LVar5)
EVT_IF_EQ(LVar5, 0)
@ -952,7 +973,7 @@ EvtScript N(onHit) = {
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 1, LVarF)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, AVAR_Unk_1, LVarF)
EVT_IF_EQ(LVarF, 0)
EVT_EXEC_WAIT(N(8022630C))
EVT_END_IF
@ -985,7 +1006,7 @@ EvtScript N(attackPetitSpit) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 20)
EVT_END_THREAD
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE)
EVT_ELSE
@ -1083,7 +1104,7 @@ EvtScript N(attackPetitSpit) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END

View File

@ -15,6 +15,27 @@ enum N(ActorPartIDs) {
PRT_2 = 2,
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_1 = 1,
AVAR_Unk_2 = 2,
AVAR_Unk_3 = 3,
AVAR_Unk_4 = 4,
AVAR_Unk_5 = 5,
AVAR_Unk_6 = 6,
AVAR_Unk_7 = 7,
AVAR_Unk_8 = 8,
AVAR_Unk_9 = 9,
AVAR_Unk_A = 10,
AVAR_Unk_B = 11,
AVAR_Unk_C = 12,
AVAR_Unk_D = 13,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
// unused data
Vtx N(Quad1)[] = {
{{{ -16, 0, 0 }, 0, { 0, 0 }, { 0, 0, 0, 255 }}},
@ -96,11 +117,11 @@ EntityModelScript N(ModelScript4) = {
#include "battle/area/kzn2/lava_piranha_vine.pal.inc.c"
#include "battle/area/kzn2/lava_piranha_vine.gfx.inc.c"
extern EvtScript N(init);
extern EvtScript N(idle);
extern EvtScript N(takeTurn);
extern EvtScript N(handleEvent);
extern EvtScript N(nextTurn);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(EVS_HandlePhase);
extern EvtScript N(initVines);
extern EvtScript N(spawnColorado);
extern EvtScript N(onComboHit);
@ -249,11 +270,11 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_LAVA_PIRANHA_PHASE_1,
.level = 45,
.level = ACTOR_LEVEL_LAVA_PIRANHA_PHASE_1,
.maxHP = 40,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
@ -541,21 +562,21 @@ API_CALLABLE(N(CreateVineRenderer)) {
static s32 N(unused);
static s32 N(unusedArray)[64];
EvtScript N(init) = {
EvtScript N(EVS_Init) = {
EVT_USE_ARRAY(N(unusedArray))
EVT_CALL(EnableGroup, 23, TRUE)
EVT_CALL(EnableGroup, 28, FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 5, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 6, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 11, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 13, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_5, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_6, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_D, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, 0)
EVT_SET(LVar0, 30)
EVT_CALL(SetActorVar, ACTOR_SELF, 13, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, 7, ANIM_LavaPiranha_Anim03)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, ANIM_LavaPiranha_Anim09)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_D, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_7, ANIM_LavaPiranha_Anim03)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_8, ANIM_LavaPiranha_Anim09)
EVT_CALL(ForceHomePos, ACTOR_SELF, 61, 61, 0)
EVT_CALL(LoadAnimatedModel, VINE_0, EVT_PTR(N(AnimModel_MainHeadVine)))
EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE)
@ -588,10 +609,10 @@ EvtScript N(init) = {
EVT_CALL(CreateNpc, NPC_BTL_COMPANION, ANIM_BattleKolorado_Idle)
EVT_CALL(SetNpcYaw, NPC_BTL_COMPANION, 90)
EVT_CALL(SetNpcPos, NPC_BTL_COMPANION, -300, 0, 0)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_CALL(BindNextTurn, ACTOR_SELF, EVT_PTR(N(nextTurn)))
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase)))
EVT_CALL(ForceHomePos, ACTOR_ENEMY1, 57, 57, 0)
EVT_CALL(ForceHomePos, ACTOR_ENEMY2, 107, 71, 20)
EVT_CALL(HPBarToHome, ACTOR_ENEMY1)
@ -601,33 +622,33 @@ EvtScript N(init) = {
EVT_END
};
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(0)
EVT_CALL(GetActorHP, ACTOR_SELF, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_GOTO(99)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_ENEMY0, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY0, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_GOTO(99)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_GOTO(99)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 13, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_D, LVar0)
EVT_SUB(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 13, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_D, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_GOTO(99)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 12, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_C, LVar0)
EVT_ADD(LVar0, 1)
EVT_IF_GE(LVar0, 3)
EVT_SET(LVar0, 0)
EVT_END_IF
EVT_SET(LVar0, 30)
EVT_CALL(SetActorVar, ACTOR_SELF, 13, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_D, LVar0)
EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE)
EVT_CALL(LoadBattleDmaData, 1)
EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE)
@ -638,16 +659,16 @@ EvtScript N(idle) = {
EVT_END
};
EvtScript N(nextTurn) = {
EvtScript N(EVS_HandlePhase) = {
EVT_CALL(GetBattlePhase, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(PHASE_PLAYER_END)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_2, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x1)
EVT_BITWISE_OR_CONST(LVar0, 0x1)
EVT_CALL(SetActorVar, ACTOR_SELF, 2, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_2, LVar0)
EVT_EXEC_WAIT(N(spawnColorado))
EVT_END_IF
EVT_END_IF
@ -659,14 +680,14 @@ EvtScript N(nextTurn) = {
EvtScript N(spawnColorado) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableBattleStatusBar, FALSE)
EVT_CALL(SpeakToPlayer, NPC_BTL_COMPANION, -1, -1, 0, MSG_CH5_0104)
EVT_THREAD
EVT_LOOP(9)
EVT_CALL(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_ACTOR_STEP_A, SOUND_SPACE_MODE_0)
EVT_CALL(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_ACTOR_STEP_A, SOUND_SPACE_DEFAULT)
EVT_WAIT(2)
EVT_CALL(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_ACTOR_STEP_B, SOUND_SPACE_MODE_0)
EVT_CALL(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_ACTOR_STEP_B, SOUND_SPACE_DEFAULT)
EVT_WAIT(2)
EVT_END_LOOP
EVT_END_THREAD
@ -674,7 +695,7 @@ EvtScript N(spawnColorado) = {
EVT_CALL(SetNpcAnimationSpeed, NPC_BTL_COMPANION, EVT_FLOAT(2.0))
EVT_CALL(SetNpcSpeed, NPC_BTL_COMPANION, EVT_FLOAT(10.0))
EVT_CALL(NpcMoveTo, NPC_BTL_COMPANION, 70, 0, 0)
EVT_CALL(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_TOUCH_LAVA, SOUND_SPACE_MODE_0)
EVT_CALL(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_TOUCH_LAVA, SOUND_SPACE_DEFAULT)
EVT_CALL(SetNpcAnimationSpeed, NPC_BTL_COMPANION, EVT_FLOAT(1.0))
EVT_CALL(SetNpcJumpscale, NPC_BTL_COMPANION, EVT_FLOAT(1.0))
EVT_CALL(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_BattleKolorado_Injured)
@ -705,9 +726,9 @@ EvtScript N(spawnColorado) = {
EVT_CALL(NpcJump0, NPC_BTL_COMPANION, 50, 0, 0, 12)
EVT_THREAD
EVT_LOOP(4)
EVT_CALL(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_ACTOR_STEP_A, SOUND_SPACE_MODE_0)
EVT_CALL(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_ACTOR_STEP_A, SOUND_SPACE_DEFAULT)
EVT_WAIT(2)
EVT_CALL(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_ACTOR_STEP_B, SOUND_SPACE_MODE_0)
EVT_CALL(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_ACTOR_STEP_B, SOUND_SPACE_DEFAULT)
EVT_WAIT(2)
EVT_END_LOOP
EVT_END_THREAD
@ -720,7 +741,7 @@ EvtScript N(spawnColorado) = {
EVT_CALL(SetNpcSpeed, NPC_BTL_COMPANION, EVT_FLOAT(6.0))
EVT_CALL(NpcMoveTo, NPC_BTL_COMPANION, -300, 0, 0)
EVT_CALL(EnableBattleStatusBar, TRUE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -910,31 +931,31 @@ EvtScript N(initVines) = {
EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2)
EVT_CALL(N(SetVineBoneRot), VINE_3, 4, LVar0, LVar1, LVar2)
EVT_CALL(N(SetVineBoneScale), VINE_3, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0))
EVT_CALL(GetActorVar, ACTOR_SELF, 6, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_6, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar1, LVar2, LVar3)
EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar4, LVar5, LVar6)
EVT_SET(LVar7, 30)
EVT_SET(LVar8, -30)
EVT_CALL(GetActorVar, ACTOR_SELF, 10, LVar9)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_A, LVar9)
EVT_CALL(N(SetFlamePosition), LVar0, LVar1, LVar2, LVar6, LVar7, LVar8, LVar9)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_ENEMY1, 6, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY1, AVAR_Unk_6, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar1, LVar2, LVar3)
EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar4, LVar5, LVar6)
EVT_SET(LVar7, 10)
EVT_SET(LVar8, -15)
EVT_CALL(GetActorVar, ACTOR_ENEMY1, 10, LVar9)
EVT_CALL(GetActorVar, ACTOR_ENEMY1, AVAR_Unk_A, LVar9)
EVT_CALL(N(SetFlamePosition), LVar0, LVar1, LVar2, LVar6, LVar7, LVar8, LVar9)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_ENEMY2, 6, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY2, AVAR_Unk_6, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar1, LVar2, LVar3)
EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar4, LVar5, LVar6)
EVT_SET(LVar7, 10)
EVT_SET(LVar8, -15)
EVT_CALL(GetActorVar, ACTOR_ENEMY2, 10, LVar9)
EVT_CALL(GetActorVar, ACTOR_ENEMY2, AVAR_Unk_A, LVar9)
EVT_CALL(N(SetFlamePosition), LVar0, LVar1, LVar2, LVar6, LVar7, LVar8, LVar9)
EVT_END_IF
EVT_WAIT(1)
@ -946,9 +967,9 @@ EvtScript N(initVines) = {
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0)
EVT_CALL(GetLastElement, LVarE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
@ -1008,11 +1029,11 @@ EvtScript N(handleEvent) = {
EVT_WAIT(1000)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(ForceHomePos, ACTOR_SELF, 61, 61, 0)
EVT_ELSE
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar1)
EVT_IF_EQ(LVar1, 1)
EVT_CALL(ForceHomePos, ACTOR_SELF, 61, 61, 0)
EVT_ELSE
@ -1023,7 +1044,7 @@ EvtScript N(handleEvent) = {
EVT_IF_FLAG(LVar0, STATUS_FLAG_STOP)
EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 1)
EVT_END_IF
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -1032,11 +1053,11 @@ EvtScript N(handleEvent) = {
EvtScript N(onBurnHit) = {
EVT_THREAD
EVT_WAIT(1)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar2)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar2)
EVT_IF_EQ(LVar2, 1)
EVT_GOTO(10)
EVT_END_IF
@ -1044,15 +1065,15 @@ EvtScript N(onBurnHit) = {
EVT_EXEC_WAIT(N(ignite))
EVT_LABEL(10)
EVT_END_THREAD
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE)
EVT_CALL(LoadBattleDmaData, 14)
EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE)
EVT_CALL(SetActorVar, ACTOR_SELF, 7, ANIM_LavaPiranha_Anim03)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, ANIM_LavaPiranha_Anim09)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_7, ANIM_LavaPiranha_Anim03)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_8, ANIM_LavaPiranha_Anim09)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_fiery)))
EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefenseTable_fiery)))
EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_2, EVT_PTR(N(DefenseTable_fiery)))
@ -1068,25 +1089,25 @@ EvtScript N(onBurnHit) = {
EVT_END
};
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, ACTOR_FLAG_NO_DMG_APPLY)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_EXEC_WAIT(N(attackFlameSpew))
EVT_CASE_DEFAULT
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_EXEC_WAIT(N(attackFireStream))
EVT_ELSE
EVT_CALL(GetActorVar, ACTOR_SELF, 11, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_B, LVar0)
EVT_SUB(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 11, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, LVar0)
EVT_IF_LE(LVar0, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(SetBattleCamTarget, 80, 70, 0)
EVT_CALL(SetBattleCamZoom, 300)
@ -1112,7 +1133,7 @@ EvtScript N(takeTurn) = {
EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE)
EVT_CALL(LoadBattleDmaData, 0)
EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_END_IF
EVT_END_IF
EVT_END_SWITCH
@ -1182,7 +1203,7 @@ EvtScript N(attackFlameSpew) = {
EVT_END_IF
EVT_WAIT(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
@ -1206,7 +1227,7 @@ EvtScript N(attackFlameSpew) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -1266,7 +1287,7 @@ EvtScript N(attackFireStream) = {
EVT_END_IF
EVT_WAIT(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
@ -1288,7 +1309,7 @@ EvtScript N(attackFireStream) = {
EVT_RETURN
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -1343,7 +1364,7 @@ API_CALLABLE(N(GetSinkPosLavaBud)) {
}
EvtScript N(onDeath) = {
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 1)
EVT_EXEC_WAIT(N(onHit))
EVT_LABEL(0)
EVT_CALL(GetBattleFlags, LVar0)
@ -1351,15 +1372,15 @@ EvtScript N(onDeath) = {
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar2)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar2)
EVT_IF_EQ(LVar2, 0)
EVT_CALL(ClearStatusEffects, ACTOR_SELF)
EVT_CALL(ClearStatusEffects, ACTOR_ENEMY1)
EVT_CALL(ClearStatusEffects, ACTOR_ENEMY2)
EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0)
EVT_CALL(GetActorVar, ACTOR_ENEMY1, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY1, AVAR_Unk_0, LVar0)
EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0)
EVT_CALL(GetActorVar, ACTOR_ENEMY2, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY2, AVAR_Unk_0, LVar0)
EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0)
EVT_CALL(CancelEnemyTurn, 1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
@ -1534,13 +1555,13 @@ EvtScript N(onDeath) = {
EVT_CALL(MoveBattleCamOver, 40)
EVT_WAIT(85)
EVT_END_CHILD_THREAD
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 7, ANIM_LavaPiranha_Anim04)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, ANIM_LavaPiranha_Anim0A)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, 7, ANIM_LavaBud_Anim04)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, 8, ANIM_LavaBud_Anim0B)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, 7, ANIM_LavaBud_Anim04)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, 8, ANIM_LavaBud_Anim0B)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_7, ANIM_LavaPiranha_Anim04)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_8, ANIM_LavaPiranha_Anim0A)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, AVAR_Unk_7, ANIM_LavaBud_Anim04)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, AVAR_Unk_8, ANIM_LavaBud_Anim0B)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, AVAR_Unk_7, ANIM_LavaBud_Anim04)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, AVAR_Unk_8, ANIM_LavaBud_Anim0B)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(A(lava_bud_IdleAnimations_fiery)))
EVT_CALL(SetIdleAnimations, ACTOR_ENEMY1, PRT_MAIN, EVT_PTR(A(lava_bud_IdleAnimations_fiery)))
EVT_CALL(SetIdleAnimations, ACTOR_ENEMY2, PRT_MAIN, EVT_PTR(A(lava_bud_IdleAnimations_fiery)))
@ -1639,8 +1660,8 @@ EvtScript N(onDeath) = {
EVT_CALL(SetEnemyHP, ACTOR_ENEMY1, LVar0)
EVT_CALL(GetEnemyMaxHP, ACTOR_ENEMY2, LVar0)
EVT_CALL(SetEnemyHP, ACTOR_ENEMY2, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_ELSE
EVT_CALL(HideHealthBar, ACTOR_ENEMY1)
@ -1661,7 +1682,7 @@ EvtScript N(onDeath) = {
EVT_CALL(N(StartRumbleWithParams), 80, 216)
EVT_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_03CC)
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE)
EVT_CALL(LoadBattleDmaData, 8)
@ -1676,7 +1697,7 @@ EvtScript N(onDeath) = {
EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE)
EVT_CALL(LoadBattleDmaData, 10)
EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE)
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_PLAY_EFFECT(EFFECT_EMBERS, 0, 105, 60, 2, 80, 60, EVT_FLOAT(1.8), 90, 100, EVT_FLOAT(1.5), EVT_FLOAT(1.5), 0)
EVT_END_IF
@ -1687,20 +1708,20 @@ EvtScript N(onDeath) = {
EVT_CALL(LoadBattleDmaData, 11)
EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE)
EVT_WAIT(30)
EVT_CALL(GetActorVar, ACTOR_SELF, 10, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_A, LVar0)
EVT_SET(LVar1, 100)
EVT_LOOP(50)
EVT_SUB(LVar1, 2)
EVT_SETF(LVar2, LVar0)
EVT_MULF(LVar2, LVar1)
EVT_MULF(LVar2, EVT_FLOAT(0.01))
EVT_CALL(SetActorVar, ACTOR_SELF, 10, LVar2)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_A, LVar2)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(12)
EVT_CALL(GetActorVar, ACTOR_ENEMY1, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY1, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE)
EVT_CALL(LoadBattleDmaData, 23)
@ -1714,7 +1735,7 @@ EvtScript N(onDeath) = {
EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE)
EVT_CALL(LoadBattleDmaData, 25)
EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE)
EVT_CALL(GetActorVar, ACTOR_ENEMY1, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY1, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_PLAY_EFFECT(EFFECT_EMBERS, 0, 67, 30, 2, 50, 40, EVT_FLOAT(1.3), 30, 70, EVT_FLOAT(1.2), EVT_FLOAT(1.2), 0)
EVT_END_IF
@ -1723,20 +1744,20 @@ EvtScript N(onDeath) = {
EVT_CALL(LoadBattleDmaData, 26)
EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE)
EVT_WAIT(30)
EVT_CALL(GetActorVar, ACTOR_ENEMY1, 10, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY1, AVAR_Unk_A, LVar0)
EVT_SET(LVar1, 100)
EVT_LOOP(50)
EVT_SUB(LVar1, 2)
EVT_SETF(LVar2, LVar0)
EVT_MULF(LVar2, LVar1)
EVT_MULF(LVar2, EVT_FLOAT(0.01))
EVT_CALL(SetActorVar, ACTOR_ENEMY1, 10, LVar2)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, AVAR_Unk_A, LVar2)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(5)
EVT_CALL(GetActorVar, ACTOR_ENEMY2, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY2, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(OverrideBattleDmaDest, VINE_2_BASE)
EVT_CALL(LoadBattleDmaData, 23)
@ -1750,7 +1771,7 @@ EvtScript N(onDeath) = {
EVT_CALL(OverrideBattleDmaDest, VINE_2_BASE)
EVT_CALL(LoadBattleDmaData, 25)
EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE)
EVT_CALL(GetActorVar, ACTOR_ENEMY2, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY2, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_PLAY_EFFECT(EFFECT_EMBERS, 0, 120, 35, 5, 50, 40, EVT_FLOAT(1.3), 30, 70, EVT_FLOAT(1.2), EVT_FLOAT(1.2), 0)
EVT_END_IF
@ -1759,14 +1780,14 @@ EvtScript N(onDeath) = {
EVT_CALL(LoadBattleDmaData, 26)
EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE)
EVT_WAIT(30)
EVT_CALL(GetActorVar, ACTOR_ENEMY2, 10, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY2, AVAR_Unk_A, LVar0)
EVT_SET(LVar1, 100)
EVT_LOOP(50)
EVT_SUB(LVar1, 2)
EVT_SETF(LVar2, LVar0)
EVT_MULF(LVar2, LVar1)
EVT_MULF(LVar2, EVT_FLOAT(0.01))
EVT_CALL(SetActorVar, ACTOR_ENEMY2, 10, LVar2)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, AVAR_Unk_A, LVar2)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
@ -1794,19 +1815,19 @@ EvtScript N(onDeath) = {
EVT_CALL(DropStarPoints, ACTOR_SELF)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH)
EVT_WAIT(15)
EVT_CALL(GetActorVar, ACTOR_SELF, 6, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_6, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 6, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_6, 0)
EVT_CALL(RemoveEffect, LVar0)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_ENEMY1, 6, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY1, AVAR_Unk_6, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, 6, 0)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, AVAR_Unk_6, 0)
EVT_CALL(RemoveEffect, LVar0)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_ENEMY2, 6, LVar0)
EVT_CALL(GetActorVar, ACTOR_ENEMY2, AVAR_Unk_6, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, 6, 0)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, AVAR_Unk_6, 0)
EVT_CALL(RemoveEffect, LVar0)
EVT_END_IF
EVT_WAIT(5)
@ -1881,7 +1902,7 @@ API_CALLABLE(N(GetFlamePosition)) {
EvtScript N(ignite) = {
EVT_SWITCH(LVar0)
EVT_CASE_EQ(ACTOR_ENEMY1)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, 10, 35)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, AVAR_Unk_A, 35)
EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar1, LVar2, LVar3)
EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar4, LVar5, LVar6)
EVT_SET(LVar7, 10)
@ -1890,19 +1911,19 @@ EvtScript N(ignite) = {
EVT_CALL(GetPartOffset, ACTOR_ENEMY1, PRT_MAIN, LVar0, LVar1, LVar2)
EVT_SUB(LVar2, 3)
EVT_PLAY_EFFECT(EFFECT_FLAME, 1, LVar3, LVar4, LVar2, EVT_FLOAT(0.3), LVarA, 0)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, 6, LVarA)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, AVAR_Unk_6, LVarA)
EVT_CALL(SetIdleAnimations, ACTOR_ENEMY1, PRT_MAIN, EVT_PTR(A(lava_bud_IdleAnimations_fiery)))
EVT_CALL(SetDefenseTable, ACTOR_ENEMY1, PRT_MAIN, EVT_PTR(A(lava_bud_DefenseTable_fiery)))
EVT_CALL(SetDefenseTable, ACTOR_ENEMY1, PRT_2, EVT_PTR(A(lava_bud_DefenseTable_fiery)))
EVT_CALL(SetPartEventBits, ACTOR_ENEMY1, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, TRUE)
EVT_CALL(SetPartEventBits, ACTOR_ENEMY1, PRT_2, ACTOR_EVENT_FLAG_FIREY, TRUE)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, 7, ANIM_LavaBud_Anim04)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, 8, ANIM_LavaBud_Anim0B)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, 5, 1)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, AVAR_Unk_7, ANIM_LavaBud_Anim04)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, AVAR_Unk_8, ANIM_LavaBud_Anim0B)
EVT_CALL(SetActorVar, ACTOR_ENEMY1, AVAR_Unk_5, 1)
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY1, PRT_2, ACTOR_PART_FLAG_NO_TARGET, FALSE)
EVT_CALL(SetActorFlagBits, ACTOR_ENEMY1, ACTOR_FLAG_NO_HEALTH_BAR, FALSE)
EVT_CASE_EQ(ACTOR_ENEMY2)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, 10, 35)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, AVAR_Unk_A, 35)
EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar1, LVar2, LVar3)
EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar4, LVar5, LVar6)
EVT_SET(LVar7, 10)
@ -1911,19 +1932,19 @@ EvtScript N(ignite) = {
EVT_CALL(GetPartOffset, ACTOR_ENEMY2, PRT_MAIN, LVar0, LVar1, LVar2)
EVT_SUB(LVar2, 3)
EVT_PLAY_EFFECT(EFFECT_FLAME, 1, LVar3, LVar4, LVar2, EVT_FLOAT(0.3), LVarA, 0)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, 6, LVarA)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, AVAR_Unk_6, LVarA)
EVT_CALL(SetIdleAnimations, ACTOR_ENEMY2, PRT_MAIN, EVT_PTR(A(lava_bud_IdleAnimations_fiery)))
EVT_CALL(SetDefenseTable, ACTOR_ENEMY2, PRT_MAIN, EVT_PTR(A(lava_bud_DefenseTable_fiery)))
EVT_CALL(SetDefenseTable, ACTOR_ENEMY2, PRT_2, EVT_PTR(A(lava_bud_DefenseTable_fiery)))
EVT_CALL(SetPartEventBits, ACTOR_ENEMY2, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, TRUE)
EVT_CALL(SetPartEventBits, ACTOR_ENEMY2, PRT_2, ACTOR_EVENT_FLAG_FIREY, TRUE)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, 7, ANIM_LavaBud_Anim04)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, 8, ANIM_LavaBud_Anim0B)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, 5, 1)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, AVAR_Unk_7, ANIM_LavaBud_Anim04)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, AVAR_Unk_8, ANIM_LavaBud_Anim0B)
EVT_CALL(SetActorVar, ACTOR_ENEMY2, AVAR_Unk_5, 1)
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY2, PRT_2, ACTOR_PART_FLAG_NO_TARGET, FALSE)
EVT_CALL(SetActorFlagBits, ACTOR_ENEMY2, ACTOR_FLAG_NO_HEALTH_BAR, FALSE)
EVT_CASE_DEFAULT
EVT_CALL(SetActorVar, ACTOR_ENEMY0, 10, 70)
EVT_CALL(SetActorVar, ACTOR_ENEMY0, AVAR_Unk_A, 70)
EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar1, LVar2, LVar3)
EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar4, LVar5, LVar6)
EVT_SET(LVar7, 30)
@ -1932,15 +1953,15 @@ EvtScript N(ignite) = {
EVT_CALL(GetPartOffset, ACTOR_ENEMY0, PRT_MAIN, LVar0, LVar1, LVar2)
EVT_SUB(LVar2, 3)
EVT_PLAY_EFFECT(EFFECT_FLAME, 1, LVar3, LVar4, LVar2, EVT_FLOAT(0.7), LVarA, 0)
EVT_CALL(SetActorVar, ACTOR_ENEMY0, 6, LVarA)
EVT_CALL(SetActorVar, ACTOR_ENEMY0, AVAR_Unk_6, LVarA)
EVT_CALL(SetIdleAnimations, ACTOR_ENEMY0, PRT_MAIN, EVT_PTR(N(IdleAnimations_fiery)))
EVT_CALL(SetDefenseTable, ACTOR_ENEMY0, PRT_MAIN, EVT_PTR(N(DefenseTable_fiery)))
EVT_CALL(SetDefenseTable, ACTOR_ENEMY0, PRT_2, EVT_PTR(N(DefenseTable_fiery)))
EVT_CALL(SetPartEventBits, ACTOR_ENEMY0, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, TRUE)
EVT_CALL(SetPartEventBits, ACTOR_ENEMY0, PRT_2, ACTOR_EVENT_FLAG_FIREY, TRUE)
EVT_CALL(SetActorVar, ACTOR_ENEMY0, 7, ANIM_LavaPiranha_Anim04)
EVT_CALL(SetActorVar, ACTOR_ENEMY0, 8, ANIM_LavaPiranha_Anim0A)
EVT_CALL(SetActorVar, ACTOR_ENEMY0, 5, 1)
EVT_CALL(SetActorVar, ACTOR_ENEMY0, AVAR_Unk_7, ANIM_LavaPiranha_Anim04)
EVT_CALL(SetActorVar, ACTOR_ENEMY0, AVAR_Unk_8, ANIM_LavaPiranha_Anim0A)
EVT_CALL(SetActorVar, ACTOR_ENEMY0, AVAR_Unk_5, 1)
EVT_CALL(ForceHomePos, ACTOR_SELF, 61, 61, 0)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_HEALTH_BAR, FALSE)
EVT_END_SWITCH
@ -1949,9 +1970,9 @@ EvtScript N(ignite) = {
};
EvtScript N(onComboHit) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_8, LVar0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0)
EVT_IF_LT(LVar0, 4)
@ -1988,9 +2009,9 @@ EvtScript N(onHit) = {
};
EvtScript N(doOnHit) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_8, LVar0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0)
EVT_IF_LT(LVar0, 4)
@ -2006,7 +2027,7 @@ EvtScript N(doOnHit) = {
EVT_RETURN
EVT_END_IF
EVT_IF_FLAG(LVarE, DAMAGE_TYPE_WATER | DAMAGE_TYPE_ICE)
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0)
EVT_IF_LT(LVar0, 4)
@ -2020,22 +2041,22 @@ EvtScript N(doOnHit) = {
EVT_WAIT(29)
EVT_WAIT(14)
EVT_ELSE
EVT_CALL(SetActorVar, ACTOR_SELF, 11, 2)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_B, 2)
EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE)
EVT_CALL(LoadBattleDmaData, 6)
EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE)
EVT_CALL(GetActorVar, ACTOR_SELF, 6, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_6, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_CALL(RemoveEffect, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, 6, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_6, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_PLAY_EFFECT(EFFECT_COLD_BREATH, 0, LVar0, LVar1, LVar2, EVT_FLOAT(3.0), 50, 0)
EVT_END_IF
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_wet)))
EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefenseTable_wet)))
EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_2, EVT_PTR(N(DefenseTable_wet)))
EVT_CALL(SetActorVar, ACTOR_SELF, 7, ANIM_LavaPiranha_Anim0A)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, ANIM_LavaPiranha_Anim09)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_7, ANIM_LavaPiranha_Anim0A)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_8, ANIM_LavaPiranha_Anim09)
EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, FALSE)
EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_2, ACTOR_EVENT_FLAG_FIREY, FALSE)
EVT_WAIT(29)
@ -2044,10 +2065,10 @@ EvtScript N(doOnHit) = {
EVT_CALL(LoadBattleDmaData, 13)
EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE)
EVT_WAIT(14)
EVT_CALL(SetActorVar, ACTOR_SELF, 5, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_5, 0)
EVT_END_IF
EVT_ELSE
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0)
EVT_IF_LT(LVar0, 4)
@ -2080,16 +2101,16 @@ EvtScript N(doOnHit) = {
};
EvtScript N(playHitAnimation) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 7, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_7, LVar0)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE)
EVT_CALL(LoadBattleDmaData, 0)
EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 5, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_5, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE)
EVT_CALL(LoadBattleDmaData, 1)

View File

@ -4,16 +4,25 @@
#define NAMESPACE A(petit_piranha)
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_HandleEvent);
extern EvtScript N(onDeath);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
};
enum N(ActorVars) {
AVAR_Unk_0 = 0,
AVAR_Unk_9 = 9,
};
enum N(ActorParams) {
DMG_UNK = 0,
};
s32 N(IdleAnimations)[] = {
STATUS_KEY_NORMAL, ANIM_PetitPiranha_Anim01,
STATUS_KEY_STONE, ANIM_PetitPiranha_Anim01,
@ -80,11 +89,11 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_PETIT_PIRANHA,
.level = 0,
.level = ACTOR_LEVEL_PETIT_PIRANHA,
.maxHP = 1,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
@ -100,16 +109,16 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 10, 20 },
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(SetEnemyHP, ACTOR_SELF, 1)
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(0)
EVT_WAIT(1)
EVT_GOTO(0)
@ -117,9 +126,9 @@ EvtScript N(idle) = {
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
@ -205,7 +214,7 @@ EvtScript N(handleEvent) = {
EVT_WAIT(1000)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
@ -248,9 +257,9 @@ API_CALLABLE(N(SetFlameX)) {
return ApiStatus_DONE2;
}
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_IF_GE(LVar1, 41)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PetitPiranha_Anim04)
@ -397,10 +406,10 @@ EvtScript N(onDeath) = {
EVT_IF_EQ(LVar0, 0)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetActorVar, LVar0, 9, LVar1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
EVT_CALL(GetActorVar, LVar0, AVAR_Unk_9, LVar1)
EVT_SUB(LVar1, 1)
EVT_CALL(SetActorVar, LVar0, 9, LVar1)
EVT_CALL(SetActorVar, LVar0, AVAR_Unk_9, LVar1)
EVT_RETURN
EVT_END
};

View File

@ -3,10 +3,10 @@
#define NAMESPACE A(petit_piranha_bomb)
extern EvtScript N(init);
extern EvtScript N(idle);
extern EvtScript N(takeTurn);
extern EvtScript N(handleEvent);
extern EvtScript N(EVS_Init);
extern EvtScript N(EVS_Idle);
extern EvtScript N(EVS_TakeTurn);
extern EvtScript N(EVS_HandleEvent);
enum N(ActorPartIDs) {
PRT_MAIN = 1,
@ -78,11 +78,11 @@ ActorPartBlueprint N(ActorParts)[] = {
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_PETIT_PIRANHA_BOMB,
.level = 0,
.level = ACTOR_LEVEL_PETIT_PIRANHA_BOMB,
.maxHP = 1,
.partCount = ARRAY_COUNT(N(ActorParts)),
.partsData = N(ActorParts),
.initScript = &N(init),
.initScript = &N(EVS_Init),
.statusTable = N(StatusTable),
.escapeChance = 0,
.airLiftChance = 0,
@ -98,15 +98,15 @@ ActorBlueprint NAMESPACE = {
.statusTextOffset = { 10, 20 },
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EvtScript N(EVS_Idle) = {
EVT_LABEL(0)
EVT_WAIT(1)
EVT_GOTO(0)
@ -114,7 +114,7 @@ EvtScript N(idle) = {
EVT_END
};
EvtScript N(handleEvent) = {
EvtScript N(EVS_HandleEvent) = {
EVT_LABEL(0)
EVT_WAIT(1)
EVT_GOTO(0)
@ -122,7 +122,7 @@ EvtScript N(handleEvent) = {
EVT_END
};
EvtScript N(takeTurn) = {
EvtScript N(EVS_TakeTurn) = {
EVT_LABEL(0)
EVT_WAIT(1)
EVT_GOTO(0)

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