all battle maps done (#812)

* make BS flags enum everywhere

* area_kpa

* fix merge conflicts

* area_kpa2

* fix merge conflicts

* area_kpa3

* area_kpa4

* matched all battle map functions and some others

* fix warnings
This commit is contained in:
Unnunu 2022-10-10 14:26:32 +03:00 committed by GitHub
parent 57c0421151
commit cc6f4d9a66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
222 changed files with 17700 additions and 13235 deletions

View File

@ -1794,8 +1794,11 @@ typedef struct ActorState { // TODO: Make the first field of this an ActorMoveme
/* 0x66 */ s16 moveArcAmplitude;
/* 0x68 */ char unk_68[3];
/* 0x6B */ u8 jumpPartIndex;
/* 0x6C */ ChompChainAnimationState* unk_6C;
/* 0x70 */ char unk_70[12];
/* 0x6C */ union {
/* */ s32 functionTemp[4];
/* */ f32 functionTempF[4];
/* */ void* functionTempPtr[4];
/* */ };
/* 0x7C */ union {
/* */ s32 varTable[16];
/* */ f32 varTableF[16];

View File

@ -1982,7 +1982,15 @@ typedef struct PinkSparklesFXData {
} PinkSparklesFXData; // size = unknown
typedef struct StarOutlineFXData {
/* 0x00 */ char todo[0];
/* 0x00 */ s16 unk_00;
/* 0x02 */ char unk_02[0x2];
/* 0x04 */ Vec3f pos;
/* 0x10 */ char unk_10[0x14];
/* 0x24 */ s32 unk_24;
/* 0x28 */ char unk_28[0xC];
/* 0x34 */ s32 unk_34;
/* 0x38 */ f32 unk_38;
/* 0x3C */ Vec3f unk_3C;
} StarOutlineFXData; // size = unknown
typedef struct Effect86FXData {

View File

@ -867,6 +867,10 @@ enum SoundIDs {
SOUND_SMOKE_BURST = 0x000002CD,
SOUND_2CE = 0x000002CE,
SOUND_2CF = 0x000002CF,
SOUND_2D1 = 0x000002D1,
SOUND_2D2 = 0x000002D2,
SOUND_2D3 = 0x000002D3,
SOUND_2D4 = 0x000002D4,
SOUND_2D5 = 0x000002D5,
SOUND_2D6 = 0x000002D6,
SOUND_DAYZEE_SONG = 0x000002D7,
@ -1030,6 +1034,7 @@ enum SoundIDs {
SOUND_3B9 = 0x000003B9,
SOUND_3BB = 0x000003BB,
SOUND_3BC = 0x000003BC,
SOUND_3BD = 0x000003BD,
SOUND_3BE = 0x000003BE,
SOUND_3C0 = 0x000003C0,
SOUND_3C1 = 0x000003C1,
@ -1098,6 +1103,7 @@ enum SoundIDs {
SOUND_76D = 0x0000076D,
SOUND_791 = 0x00000791,
SOUND_7BC = 0x000007BC,
SOUND_7BD = 0x000007BD,
SOUND_B88 = 0x00000B88,
SOUND_2003 = 0x00002003,
SOUND_2004 = 0x00002004,
@ -1248,6 +1254,8 @@ enum SoundIDs {
SOUND_20CB = 0x000020CB,
SOUND_20CC = 0x000020CC,
SOUND_20CD = 0x000020CD,
SOUND_20CE = 0x000020CE,
SOUND_20CF = 0x000020CF,
SOUND_20D0 = 0x000020D0,
SOUND_20D1 = 0x000020D1,
SOUND_20D2 = 0x000020D2,
@ -1306,7 +1314,14 @@ enum SoundIDs {
SOUND_2119 = 0x00002119,
SOUND_211A = 0x0000211A,
SOUND_2121 = 0x00002121,
SOUND_2122 = 0x00002122,
SOUND_2123 = 0x00002123,
SOUND_2124 = 0x00002124,
SOUND_2125 = 0x00002125,
SOUND_2126 = 0x00002126,
SOUND_2127 = 0x00002127,
SOUND_2128 = 0x00002128,
SOUND_2129 = 0x00002129,
SOUND_212A = 0x0000212A,
SOUND_212B = 0x0000212B,
SOUND_212C = 0x0000212C,
@ -2502,7 +2517,7 @@ enum Events {
EVENT_SPIN_SMASH_LAUNCH_HIT = 0x00000011,
EVENT_SHELL_CRACK_HIT = 0x00000012,
EVENT_STAR_BEAM = 0x00000013,
EVENT_14 = 0x00000014,
EVENT_PEACH_BEAM = 0x00000014,
EVENT_POWER_BOUNCE_HIT = 0x00000015,
EVENT_BLOW_AWAY = 0x00000016,
EVENT_UNKNOWN_TRIGGER = 0x00000017,
@ -3913,39 +3928,39 @@ enum IntroStates {
};
enum BattleStatusFlags1 {
BS_FLAGS1_0 = 0x00000000,
BS_FLAGS1_1 = 0x00000001, // show actors
BS_FLAGS1_2 = 0x00000002, // menu is open
BS_FLAGS1_4 = 0x00000004,
BS_FLAGS1_8 = 0x00000008,
BS_FLAGS1_10 = 0x00000010, // enable attack bonuses (power plus, etc)?
BS_FLAGS1_SP_EVT_ACTIVE = 0x00000020, // enable special events (other than hit/death/immune?)
BS_FLAGS1_40 = 0x00000040,
BS_FLAGS1_80 = 0x00000080,
BS_FLAGS1_100 = 0x00000100,
BS_FLAGS1_200 = 0x00000200,
BS_FLAGS1_400 = 0x00000400,
BS_FLAGS1_800 = 0x00000800,
BS_FLAGS1_1000 = 0x00001000,
BS_FLAGS1_2000 = 0x00002000,
BS_FLAGS1_4000 = 0x00004000,
BS_FLAGS1_8000 = 0x00008000,
BS_FLAGS1_10000 = 0x00010000,
BS_FLAGS1_20000 = 0x00020000,
BS_FLAGS1_40000 = 0x00040000,
BS_FLAGS1_80000 = 0x00080000, // partner will act (partner turn?)
BS_FLAGS1_100000 = 0x00100000, // player in back (after pressing z)
BS_FLAGS1_200000 = 0x00200000, // enemy turn pending
BS_FLAGS1_PLAYER_DEFENDING = 0x00400000, // player is defending
BS_FLAGS1_800000 = 0x00800000, // dont game over on loss
BS_FLAGS1_1000000 = 0x01000000,
BS_FLAGS1_2000000 = 0x02000000,
BS_FLAGS1_4000000 = 0x04000000,
BS_FLAGS1_8000000 = 0x08000000,
BS_FLAGS1_10000000 = 0x10000000, // prevent hammer charge
BS_FLAGS1_20000000 = 0x20000000, // prevent jump charge
BS_FLAGS1_40000000 = 0x40000000,
BS_FLAGS1_ATK_BLOCKED = 0x80000000,
BS_FLAGS1_0 = 0x00000000,
BS_FLAGS1_1 = 0x00000001, // show actors
BS_FLAGS1_2 = 0x00000002, // menu is open
BS_FLAGS1_4 = 0x00000004,
BS_FLAGS1_8 = 0x00000008,
BS_FLAGS1_10 = 0x00000010, // enable attack bonuses (power plus, etc)?
BS_FLAGS1_SP_EVT_ACTIVE = 0x00000020, // enable special events (other than hit/death/immune?)
BS_FLAGS1_40 = 0x00000040,
BS_FLAGS1_80 = 0x00000080,
BS_FLAGS1_100 = 0x00000100,
BS_FLAGS1_200 = 0x00000200,
BS_FLAGS1_400 = 0x00000400,
BS_FLAGS1_800 = 0x00000800,
BS_FLAGS1_1000 = 0x00001000,
BS_FLAGS1_2000 = 0x00002000,
BS_FLAGS1_4000 = 0x00004000,
BS_FLAGS1_8000 = 0x00008000,
BS_FLAGS1_10000 = 0x00010000,
BS_FLAGS1_DISABLE_CELEBRATION = 0x00020000,
BS_FLAGS1_ENEMY_FLED = 0x00040000,
BS_FLAGS1_80000 = 0x00080000, // partner will act (partner turn?)
BS_FLAGS1_100000 = 0x00100000, // player in back (after pressing z)
BS_FLAGS1_200000 = 0x00200000, // enemy turn pending
BS_FLAGS1_PLAYER_DEFENDING = 0x00400000, // player is defending
BS_FLAGS1_800000 = 0x00800000, // dont game over on loss
BS_FLAGS1_STAR_POINTS_DROPPED = 0x01000000,
BS_FLAGS1_2000000 = 0x02000000,
BS_FLAGS1_HUSTLE_DRINK_ON = 0x04000000,
BS_FLAGS1_8000000 = 0x08000000,
BS_FLAGS1_10000000 = 0x10000000, // prevent hammer charge
BS_FLAGS1_20000000 = 0x20000000, // prevent jump charge
BS_FLAGS1_40000000 = 0x40000000,
BS_FLAGS1_ATK_BLOCKED = 0x80000000,
};
enum BattleStatusFlags2 {

View File

@ -541,7 +541,7 @@ void btl_state_update_begin_turn(void) {
}
if (battleStatus->hustleTurns != 0) {
gBattleStatus.flags1 |= BS_FLAGS1_4000000;
gBattleStatus.flags1 |= BS_FLAGS1_HUSTLE_DRINK_ON;
}
numEnemyActors = 0;
@ -1322,7 +1322,7 @@ void func_80242FE0(void) {
actor->disableEffect->data.disableX->unk_3C = 0;
}
if (actor->debuff == 9) {
gBattleStatus.flags1 |= 0x20;
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
dispatch_damage_event_actor_0(actor, 1, 0xA);
D_8029F258 = 0x14;
}
@ -1359,7 +1359,7 @@ block_52:
}
btl_cam_use_preset(2);
if (partner == NULL || !(gBattleStatus.flags1 & 0x100000)) {
if (partner == NULL || !(gBattleStatus.flags1 & BS_FLAGS1_100000)) {
gBattleState2 = 4;
} else if (gBattleStatus.flags2 & 0x40) {
gBattleState2 = 4;
@ -1873,18 +1873,18 @@ void btl_state_update_victory(void) {
}
if (gBattleState2 == BATTLE_STATE2_UNK_4 && battleStatus->pendingStarPoints <= 0) {
if (gBattleStatus.flags1 & BS_FLAGS1_1000000) {
gBattleStatus.flags1 &= ~BS_FLAGS1_40000;
if (gBattleStatus.flags1 & BS_FLAGS1_STAR_POINTS_DROPPED) {
gBattleStatus.flags1 &= ~BS_FLAGS1_ENEMY_FLED;
}
if (playerData->battlesWon < 9999) {
playerData->battlesWon++;
}
if (gBattleStatus.flags1 & BS_FLAGS1_40000) {
if (gBattleStatus.flags1 & BS_FLAGS1_ENEMY_FLED) {
currentEncounter->battleOutcome = OUTCOME_ENEMY_FLED;
} else {
currentEncounter->battleOutcome = OUTCOME_PLAYER_WON;
}
if (gBattleStatus.flags1 & BS_FLAGS1_20000) {
if (gBattleStatus.flags1 & BS_FLAGS1_DISABLE_CELEBRATION) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_2000000)) {
bgm_set_song(0, -1, 0, 1500, 8);
}
@ -2172,7 +2172,7 @@ void btl_state_update_run_away(void) {
switch (gBattleState2) {
case BATTLE_STATE2_UNK_0:
battleStatus->unk_8C = 0;
gBattleStatus.flags1 &= ~BS_FLAGS1_40000;
gBattleStatus.flags1 &= ~BS_FLAGS1_ENEMY_FLED;
gBattleStatus.flags2 |= BS_FLAGS2_10 | BS_FLAGS2_8 | BS_FLAGS2_4 | BS_FLAGS2_2;
playerData->unk_2A6++;
btl_cam_use_preset(BTL_CAM_PRESET_25);
@ -2222,7 +2222,7 @@ void btl_state_update_run_away(void) {
break;
case 2:
if (!does_script_exist(player->takeTurnID) && battleStatus->unk_8C == 0) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_40000)) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_ENEMY_FLED)) {
gBattleState2 = BATTLE_STATE2_UNK_3;
} else {
currentEncounter->battleOutcome = 2;
@ -3418,7 +3418,7 @@ void btl_state_update_next_enemy(void) {
battleStatus->unk_8C = 0;
gBattleStatus.flags1 &= ~BS_FLAGS1_2;
gBattleStatus.flags1 &= ~BS_FLAGS1_40000;
gBattleStatus.flags1 &= ~BS_FLAGS1_ENEMY_FLED;
gBattleStatus.flags1 &= ~BS_FLAGS1_1000;
gBattleStatus.flags1 &= ~BS_FLAGS1_80000;
@ -4092,7 +4092,7 @@ void btl_state_update_enemy_striking_first(void) {
battleStatus->lastAttackDamage = 0;
battleStatus->unk_19A = 0;
playerData->enemyFirstStrikes++;
battleStatus->flags1 &= ~2;
battleStatus->flags1 &= ~BS_FLAGS1_2;
D_8029F254 = 0;
player->flags &= ~ACTOR_FLAG_8000000;
if (partner != NULL) {

View File

@ -242,7 +242,7 @@ void func_8023E3FC(void) {
}
void update_actor_shadows(void) {
if (gBattleStatus.flags1 & 1) {
if (gBattleStatus.flags1 & BS_FLAGS1_1) {
update_enemy_shadows();
update_hero_shadows();
}
@ -762,7 +762,7 @@ void btl_draw_enemy_health_bars(void) {
}
if (!(enemy->flags & (ACTOR_FLAG_40000 | ACTOR_FLAG_TARGET_ONLY)) &&
((gBattleStatus.flags1 & 2) || (enemy->flags & ENEMY_FLAGS_80000)) &&
((gBattleStatus.flags1 & BS_FLAGS1_2) || (enemy->flags & ENEMY_FLAGS_80000)) &&
is_actor_hp_bar_visible(enemy))
{
f32 x = enemy->healthBarPosition.x;

View File

@ -225,7 +225,7 @@ s32 calc_item_damage_enemy(void) {
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS) {
if (gBattleStatus.flags1 & 0x20) {
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if ((target->attackBoost > 0 || target->defenseBoost > 0) ||
((target->staticStatus == 0 && target->transparentStatus != 0) || target->staticStatus != 0))
{
@ -253,11 +253,11 @@ s32 calc_item_damage_enemy(void) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_PEACH_BEAM) {
dispatchEvent = EVENT_IMMUNE;
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ENCHANTED) {
dispatchEvent = EVENT_14;
dispatchEvent = EVENT_PEACH_BEAM;
wasStatusInflicted = TRUE;
}
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_80000) {
dispatchEvent = EVENT_14;
dispatchEvent = EVENT_PEACH_BEAM;
wasStatusInflicted = TRUE;
}
}
@ -380,10 +380,10 @@ s32 calc_item_damage_enemy(void) {
dispatchEvent = EVENT_SCARE_AWAY;
ret = 0;
sp1C = TRUE;
gBattleStatus.flags1 |= 0x39;
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE | BS_FLAGS1_10 | BS_FLAGS1_8 | BS_FLAGS1_1;
sfx_play_sound_at_position(SOUND_231, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
wasStatusInflicted = TRUE;
gBattleStatus.flags1 |= 0x40;
gBattleStatus.flags1 |= BS_FLAGS1_40;
} else {
dispatchEvent = EVENT_IMMUNE;
ret = 2;

View File

@ -72,7 +72,7 @@ ApiStatus func_80260BF4(Evt* script, s32 isInitialCall);
INCLUDE_ASM(s32, "18F340", func_80260BF4);
ApiStatus func_80260DB8(Evt* script, s32 isInitialCall) {
gBattleStatus.flags1 |= BS_FLAGS1_40000;
gBattleStatus.flags1 |= BS_FLAGS1_ENEMY_FLED;
return ApiStatus_DONE2;
}

View File

@ -2492,7 +2492,7 @@ void remove_player_buffs(s32 buffs) {
}
if (buffs & 0x10) {
battleStatus->hustleTurns = 0;
battleStatus->flags1 &= ~BS_FLAGS1_4000000;
battleStatus->flags1 &= ~BS_FLAGS1_HUSTLE_DRINK_ON;
}
if (buffs & 0x20 && (player->staticStatus != 0)) {
player->staticDuration = 0;

View File

@ -220,12 +220,12 @@ void func_80268858(void) {
actionCommandStatus->autoSucceed = FALSE;
actionCommandStatus->unk_6A = FALSE;
if (!(gBattleStatus.flags1 & 0x80000)) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_80000)) {
if (is_ability_active(ABILITY_RIGHT_ON)) {
actionCommandStatus->autoSucceed = TRUE;
}
if (!(gBattleStatus.flags1 & 0x80000) && is_ability_active(ABILITY_BERSERKER)) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_80000) && is_ability_active(ABILITY_BERSERKER)) {
actionCommandStatus->unk_61 = FALSE;
actionCommandStatus->unk_6A = TRUE;
@ -239,7 +239,7 @@ void func_80268858(void) {
actionCommandStatus->autoSucceed = TRUE;
}
if (gBattleStatus.flags1 & 0x1000) {
if (gBattleStatus.flags1 & BS_FLAGS1_1000) {
actionCommandStatus->autoSucceed = TRUE;
actionCommandStatus->unk_61 = FALSE;
}

View File

@ -1902,7 +1902,7 @@ ApiStatus DropStarPoints(Evt* script, s32 isInitialCall) {
battleStatus->pendingStarPoints += numToDrop;
}
gBattleStatus.flags1 |= 0x1000000;
gBattleStatus.flags1 |= BS_FLAGS1_STAR_POINTS_DROPPED;
return ApiStatus_DONE2;
}
@ -1995,30 +1995,30 @@ ApiStatus EnemyDamageTarget(Evt *script, s32 isInitialCall) {
battleFlagsModifier = *args++;
if (battleFlagsModifier & 0x10) {
gBattleStatus.flags1 |= 0x10;
gBattleStatus.flags1 &= ~0x20;
} else if (battleFlagsModifier & 0x20) {
gBattleStatus.flags1 &= ~0x10;
gBattleStatus.flags1 |= 0x20;
gBattleStatus.flags1 |= BS_FLAGS1_10;
gBattleStatus.flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
} else if (battleFlagsModifier & BS_FLAGS1_SP_EVT_ACTIVE) {
gBattleStatus.flags1 &= ~BS_FLAGS1_10;
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
} else {
gBattleStatus.flags1 &= ~0x10;
gBattleStatus.flags1 &= ~0x20;
gBattleStatus.flags1 &= ~BS_FLAGS1_10;
gBattleStatus.flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
}
if (battleFlagsModifier & 0x40) {
gBattleStatus.flags1 |= 0x40;
if (battleFlagsModifier & BS_FLAGS1_40) {
gBattleStatus.flags1 |= BS_FLAGS1_40;
} else {
gBattleStatus.flags1 &= ~0x40;
gBattleStatus.flags1 &= ~BS_FLAGS1_40;
}
if (battleFlagsModifier & 0x200) {
gBattleStatus.flags1 |= 0x200;
if (battleFlagsModifier & BS_FLAGS1_200) {
gBattleStatus.flags1 |= BS_FLAGS1_200;
} else {
gBattleStatus.flags1 &= ~0x200;
gBattleStatus.flags1 &= ~BS_FLAGS1_200;
}
if (battleFlagsModifier & 0x80) {
gBattleStatus.flags1 |= 0x80;
if (battleFlagsModifier & BS_FLAGS1_80) {
gBattleStatus.flags1 |= BS_FLAGS1_80;
} else {
gBattleStatus.flags1 &= ~0x80;
gBattleStatus.flags1 &= ~BS_FLAGS1_80;
}
attackStatus = battleStatus->currentAttackStatus;
@ -2107,31 +2107,31 @@ ApiStatus EnemyTestTarget(Evt *script, s32 isInitialCall) {
battleStatus->currentAttackDamage = evt_get_variable(script, *args++);
battleFlagsModifier = *args++;
if (battleFlagsModifier & 0x10) {
gBattleStatus.flags1 |= 0x10;
gBattleStatus.flags1 &= ~0x20;
} else if (battleFlagsModifier & 0x20) {
gBattleStatus.flags1 &= ~0x10;
gBattleStatus.flags1 |= 0x20;
if (battleFlagsModifier & BS_FLAGS1_10) {
gBattleStatus.flags1 |= BS_FLAGS1_10;
gBattleStatus.flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
} else if (battleFlagsModifier & BS_FLAGS1_SP_EVT_ACTIVE) {
gBattleStatus.flags1 &= ~BS_FLAGS1_10;
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
} else {
gBattleStatus.flags1 &= ~0x10;
gBattleStatus.flags1 &= ~0x20;
gBattleStatus.flags1 &= ~BS_FLAGS1_10;
gBattleStatus.flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
}
if (battleFlagsModifier & 0x40) {
gBattleStatus.flags1 |= 0x40;
if (battleFlagsModifier & BS_FLAGS1_40) {
gBattleStatus.flags1 |= BS_FLAGS1_40;
} else {
gBattleStatus.flags1 &= ~0x40;
gBattleStatus.flags1 &= ~BS_FLAGS1_40;
}
if (battleFlagsModifier & 0x200) {
gBattleStatus.flags1 |= 0x200;
if (battleFlagsModifier & BS_FLAGS1_200) {
gBattleStatus.flags1 |= BS_FLAGS1_200;
} else {
gBattleStatus.flags1 &= ~0x200;
gBattleStatus.flags1 &= ~BS_FLAGS1_200;
}
if (battleFlagsModifier & 0x80) {
gBattleStatus.flags1 |= 0x80;
if (battleFlagsModifier & BS_FLAGS1_80) {
gBattleStatus.flags1 |= BS_FLAGS1_80;
} else {
gBattleStatus.flags1 &= ~0x80;
gBattleStatus.flags1 &= ~BS_FLAGS1_80;
}
attackStatus = battleStatus->currentAttackStatus;
@ -2367,7 +2367,7 @@ ApiStatus GetEncounterState(Evt* script, s32 isInitialCall) {
}
ApiStatus YieldTurn(Evt* script, s32 isInitialCall) {
gBattleStatus.flags1 |= 0x200000;
gBattleStatus.flags1 |= BS_FLAGS1_200000;
return ApiStatus_DONE2;
}

View File

@ -820,7 +820,7 @@ s32 dispatch_damage_event_partner(s32 damageAmount, s32 event, s32 stopMotion) {
partner->lastDamageTaken = battleStatus->lastAttackDamage;
battleStatus->unk_19A = 0;
if (battleStatus->flags1 & 0x20) {
if (battleStatus->flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (event == 0x9) {
event = 0xA;
}
@ -830,7 +830,7 @@ s32 dispatch_damage_event_partner(s32 damageAmount, s32 event, s32 stopMotion) {
}
if (battleStatus->lastAttackDamage > 0) {
gBattleStatus.flags1 |= 0x20;
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
inflict_status(partner, 0xD, battleStatus->lastAttackDamage);
}
@ -850,7 +850,7 @@ s32 dispatch_damage_event_partner(s32 damageAmount, s32 event, s32 stopMotion) {
partner->flags |= 0x80000;
flagCheck = (gBattleStatus.flags1 & 0x240) != 0;
flagCheck = (gBattleStatus.flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40))) != 0;
dispatch_event_partner(event);
return flagCheck;
}
@ -952,13 +952,13 @@ ApiStatus PartnerDamageEnemy(Evt* script, s32 isInitialCall) {
gBattleStatus.powerBounceCounter = 0;
flags = *args++;
if ((flags & 0x30) == 0x30) {
if ((flags & (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) == (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) {
battleStatus->flags1 |= BS_FLAGS1_10;
battleStatus->flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
} else if (flags & 0x10) {
} else if (flags & BS_FLAGS1_10) {
battleStatus->flags1 |= BS_FLAGS1_10;
battleStatus->flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
} else if (flags & 0x20) {
} else if (flags & BS_FLAGS1_SP_EVT_ACTIVE) {
battleStatus->flags1 &= ~BS_FLAGS1_10;
battleStatus->flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
} else {
@ -966,25 +966,25 @@ ApiStatus PartnerDamageEnemy(Evt* script, s32 isInitialCall) {
battleStatus->flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
}
if (flags & 0x40) {
if (flags & BS_FLAGS1_40) {
gBattleStatus.flags1 |= BS_FLAGS1_40;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_40;
}
if (flags & 0x200) {
if (flags & BS_FLAGS1_200) {
gBattleStatus.flags1 |= BS_FLAGS1_200;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_200;
}
if (flags & 0x80) {
if (flags & BS_FLAGS1_80) {
gBattleStatus.flags1 |= BS_FLAGS1_80;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_80;
}
if (flags & 0x800) {
if (flags & BS_FLAGS1_800) {
gBattleStatus.flags1 |= BS_FLAGS1_800;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_800;
@ -1032,13 +1032,13 @@ ApiStatus PartnerAfflictEnemy(Evt* script, s32 isInitialCall) {
battleStatus->powerBounceCounter = 0;
flags = *args++;
if ((flags & 0x30) == 0x30) {
if ((flags & (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) == (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) {
battleStatus->flags1 |= BS_FLAGS1_10;
battleStatus->flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
} else if (flags & 0x10) {
} else if (flags & BS_FLAGS1_10) {
battleStatus->flags1 |= BS_FLAGS1_10;
battleStatus->flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
} else if (flags & 0x20) {
} else if (flags & BS_FLAGS1_SP_EVT_ACTIVE) {
battleStatus->flags1 &= ~BS_FLAGS1_10;
battleStatus->flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
} else {
@ -1046,22 +1046,22 @@ ApiStatus PartnerAfflictEnemy(Evt* script, s32 isInitialCall) {
battleStatus->flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
}
if (flags & 0x40) {
if (flags & BS_FLAGS1_40) {
gBattleStatus.flags1 |= BS_FLAGS1_40;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_40;
}
if (flags & 0x200) {
if (flags & BS_FLAGS1_200) {
gBattleStatus.flags1 |= BS_FLAGS1_200;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_200;
}
if (flags & 0x80) {
if (flags & BS_FLAGS1_80) {
gBattleStatus.flags1 |= BS_FLAGS1_80;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_80;
}
if (flags & 0x800) {
if (flags & BS_FLAGS1_800) {
gBattleStatus.flags1 |= BS_FLAGS1_800;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_800;
@ -1108,13 +1108,13 @@ ApiStatus PartnerPowerBounceEnemy(Evt* script, s32 isInitialCall) {
battleStatus->powerBounceCounter = evt_get_variable(script, *args++);
flags = *args++;
if ((flags & 0x30) == 0x30) {
if ((flags & (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) == (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) {
battleStatus->flags1 |= BS_FLAGS1_10;
battleStatus->flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
} else if (flags & 0x10) {
} else if (flags & BS_FLAGS1_10) {
battleStatus->flags1 |= BS_FLAGS1_10;
battleStatus->flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
} else if (flags & 0x20) {
} else if (flags & BS_FLAGS1_SP_EVT_ACTIVE) {
battleStatus->flags1 &= ~BS_FLAGS1_10;
battleStatus->flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
} else {
@ -1122,22 +1122,22 @@ ApiStatus PartnerPowerBounceEnemy(Evt* script, s32 isInitialCall) {
battleStatus->flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
}
if (flags & 0x40) {
if (flags & BS_FLAGS1_40) {
gBattleStatus.flags1 |= BS_FLAGS1_40;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_40;
}
if (flags & 0x200) {
if (flags & BS_FLAGS1_200) {
gBattleStatus.flags1 |= BS_FLAGS1_200;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_200;
}
if (flags & 0x80) {
if (flags & BS_FLAGS1_80) {
gBattleStatus.flags1 |= BS_FLAGS1_80;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_80;
}
if (flags & 0x800) {
if (flags & BS_FLAGS1_800) {
gBattleStatus.flags1 |= BS_FLAGS1_800;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_800;
@ -1186,13 +1186,13 @@ ApiStatus PartnerTestEnemy(Evt* script, s32 isInitialCall) {
gBattleStatus.powerBounceCounter = 0;
flags = *args++;
if ((flags & 0x30) == 0x30) {
if ((flags & (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) == (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) {
battleStatus->flags1 |= BS_FLAGS1_10;
battleStatus->flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
} else if (flags & 0x10) {
} else if (flags & BS_FLAGS1_10) {
battleStatus->flags1 |= BS_FLAGS1_10;
battleStatus->flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
} else if (flags & 0x20) {
} else if (flags & BS_FLAGS1_SP_EVT_ACTIVE) {
battleStatus->flags1 &= ~BS_FLAGS1_10;
battleStatus->flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
} else {
@ -1200,25 +1200,25 @@ ApiStatus PartnerTestEnemy(Evt* script, s32 isInitialCall) {
battleStatus->flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
}
if (flags & 0x40) {
if (flags & BS_FLAGS1_40) {
gBattleStatus.flags1 |= BS_FLAGS1_40;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_40;
}
if (flags & 0x200) {
if (flags & BS_FLAGS1_200) {
gBattleStatus.flags1 |= BS_FLAGS1_200;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_200;
}
if (flags & 0x80) {
if (flags & BS_FLAGS1_80) {
gBattleStatus.flags1 |= BS_FLAGS1_80;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_80;
}
if (flags & 0x800) {
if (flags & BS_FLAGS1_800) {
gBattleStatus.flags1 |= BS_FLAGS1_800;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_800;
@ -1289,6 +1289,6 @@ ApiStatus GetActionCommandResult(Evt* script, s32 isInitialCall) {
/// Seems to be the same functionality as YieldTurn in 1A5830.c
ApiStatus func_80280818(Evt* script, s32 isInitialCall) {
gBattleStatus.flags1 |= 0x200000;
gBattleStatus.flags1 |= BS_FLAGS1_200000;
return ApiStatus_DONE2;
}

View File

@ -838,7 +838,7 @@ void btl_draw_menu_wheel(void) {
draw_msg(battle_menu_messageIDs[D_802AD002 + D_802AD06B], msgX, msgY, opacity, 0x35, 0);
}
if ((gBattleStatus.flags1 & 0x02000000) || (gBattleStatus.flags2 & 0x40)) {
if ((gBattleStatus.flags1 & BS_FLAGS1_2000000) || (gBattleStatus.flags2 & 0x40)) {
D_802AD104 = 0;
}

View File

@ -416,51 +416,43 @@ void initialize_status_menu(void) {
func_800F0D5C();
}
// close but maybe just regalloc remaining?
#ifdef NON_EQUIVALENT
void status_menu_draw_number(s32 iconID, s32 x, s32 y, s32 value, s32 numDigits) {
s8 digits[4];
s32 i;
s32 y2;
s32 x2, y2;
s32 keepDrawing;
s32 digit;
s32 place;
hud_element_set_script(iconID, TimesHudScript);
x += 8;
x2 = x + 8;
y2 = y + 8;
hud_element_set_render_pos(iconID, x, y + 7);
hud_element_set_render_pos(iconID, x2, y2 - 1);
hud_element_clear_flags(iconID, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_draw_next(iconID);
// Write each digit of the input number into the digits array
for (i = 0; i < numDigits; i++) {
digit = value / 10;
place = (digit) * 10;
digit = value - place;
digit = value % 10;
digits[(numDigits - i) - 1] = digit;
value /= 10;
}
x += 13;
x2 += 13;
keepDrawing = FALSE;
for (i = 0; i < numDigits; i++, x += 8) {
for (i = 0; i < numDigits; i++, x2 += 8) {
digit = digits[i];
// Once we have encountered our first non-zero digit, we need to keep drawing the remaining digits
if (digit != 0 || keepDrawing || (i == numDigits - 1)) {
keepDrawing = TRUE;
hud_element_set_script(iconID, DigitHudScripts[digit]);
hud_element_set_render_pos(iconID, x, y2);
hud_element_set_render_pos(iconID, x2, y2);
hud_element_clear_flags(iconID, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_draw_next(iconID);
}
}
}
#else
INCLUDE_ASM(s32, "80850_len_3060", status_menu_draw_number);
#endif
// close but some ordering / reg issues
#ifdef NON_MATCHING

View File

@ -55,7 +55,7 @@ ApiStatus func_802A9000_425B50(Evt* script, s32 isInitialCall) {
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
battleStatus->flags1 &= ~0x8000;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
return ApiStatus_DONE2;
}
@ -76,7 +76,7 @@ ApiStatus func_802A916C_425CBC(Evt* script, s32 isInitialCall) {
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
battleStatus->flags1 &= ~0x8000;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
func_8024FAFC(battleStatus->flags1);
actionCommandStatus->state = 10;

View File

@ -93,7 +93,7 @@ ApiStatus func_802A91B0_4235A0(Evt* script, s32 isInitialCall) {
actionCommandStatus->unk_46 = rand_int(actionCommandStatus->unk_5A);
actionCommandStatus->unk_5C = 0;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~0x8000;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
return ApiStatus_DONE2;
}

View File

@ -89,7 +89,7 @@ ApiStatus func_802A92A0_422D70(Evt* script) {
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 127;
battleStatus->unk_82 = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
battleStatus->flags1 &= ~0x8000;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
actionCommandStatus->state = 10;
return ApiStatus_DONE2;
}

View File

@ -115,7 +115,7 @@ ApiStatus func_802A9258_422258(Evt* script, s32 isInitialCall) {
battleStatus->unk_84 = 0;
battleStatus->unk_86 = 0;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~0x8000;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
func_80269118();
return ApiStatus_DONE2;
}

View File

@ -88,7 +88,7 @@ ApiStatus func_802A91A0_42F880(Evt* script, s32 isInitialCall) {
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~0x8000;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
func_80269118();

View File

@ -67,8 +67,8 @@ ApiStatus func_802A9120_421B10(Evt* script, s32 isInitialCall) {
hudElement = actionCommandStatus->hudElements[0];
actionCommandStatus->hudElementX = 50;
battleStatus->flags1 &= ~0x8000;
battleStatus->flags1 &= ~0x2000;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
battleStatus->flags1 &= ~BS_FLAGS1_2000;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
if (actionCommandStatus->unk_61 != 0) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
@ -163,7 +163,7 @@ void N(update)(void) {
(actionCommandStatus->autoSucceed != 0)) {
battleStatus->actionSuccess = 1;
battleStatus->unk_86 = 1;
gBattleStatus.flags1 |= 0x2000;
gBattleStatus.flags1 |= BS_FLAGS1_2000;
}
}

View File

@ -90,7 +90,7 @@ ApiStatus func_802A91A0_42DBB0(Evt* script, s32 isInitialCall) {
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
actionCommandStatus->state = 0xA;
battleStatus->flags1 &= ~0x8000;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
func_80269118();
result = 2;

View File

@ -95,7 +95,7 @@ ApiStatus func_802A9210_42D120(Evt* script, s32 isInitialCall) {
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~0x8000;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
func_80269118();
return ApiStatus_DONE2;
}

View File

@ -82,7 +82,7 @@ ApiStatus func_802A916C_42EF8C(Evt* script, s32 isInitialCall) {
actionCommandStatus->unk_48 = 0;
battleStatus->actionSuccess = 0;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~0x8000;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
func_80269118();

View File

@ -71,7 +71,7 @@ ApiStatus func_802A911C_429E3C(Evt* script) {
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~0x8000;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
func_80269118();
return ApiStatus_DONE2;
}

View File

@ -64,7 +64,7 @@ ApiStatus func_802A9110_4256A0(Evt* script, s32 isInitialCall) {
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~0x8000;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
return ApiStatus_DONE2;
}

View File

@ -79,7 +79,7 @@ ApiStatus func_802A9138_42C828(Evt* script, s32 isInitialCall) {
battleStatus->unk_84 = 0;
battleStatus->unk_86 = 0;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~0x8000;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
func_80269118();
return ApiStatus_DONE2;
}

View File

@ -279,7 +279,7 @@ EvtScript N(80224414) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 25)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_20000 | BS_FLAGS1_40000, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_ENEMY_FLED, 1)
EVT_CALL(func_8026F60C, 20)
EVT_RETURN
EVT_END

View File

@ -341,7 +341,7 @@ EvtScript N(takeTurn_80219750) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar0)
EVT_KILL_THREAD(LVar0)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_20000 | BS_FLAGS1_40000, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_ENEMY_FLED, 1)
EVT_CALL(func_8026F60C, 10)
EVT_RETURN
EVT_END_IF

View File

@ -213,7 +213,7 @@ EvtScript N(takeTurn) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar0)
EVT_KILL_THREAD(LVar0)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_20000 | BS_FLAGS1_40000, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_ENEMY_FLED, 1)
EVT_CALL(func_8026F60C, 10)
EVT_RETURN
EVT_END_IF

View File

@ -352,7 +352,7 @@ EvtScript N(flee) = {
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnableActorBlur, ACTOR_SELF, 0)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_40000, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_ENEMY_FLED, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_CALL(RemoveActor, ACTOR_SELF)
EVT_RETURN

View File

@ -345,7 +345,7 @@ EvtScript N(flee) = {
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnableActorBlur, ACTOR_SELF, 0)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_40000, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_ENEMY_FLED, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_CALL(RemoveActor, ACTOR_SELF)
EVT_RETURN

View File

@ -1,786 +1,5 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/LavaBubble.h"
#define NAMESPACE b_area_hos_ember
s32 N(defenseTable_8021ACB0)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_WATER, -2,
ELEMENT_ICE, -2,
ELEMENT_FIRE, 99,
ELEMENT_END,
};
s32 N(statusTable_8021ACD4)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 0,
STATUS_POISON, 50,
STATUS_FROZEN, 0,
STATUS_DIZZY, 100,
STATUS_FEAR, 0,
STATUS_STATIC, 50,
STATUS_PARALYZE, 0,
STATUS_SHRINK, 90,
STATUS_STOP, 85,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 1,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
extern s32 N(idleAnimations_8021AE5C)[];
extern s32 N(idleAnimations_8021AEA8)[];
ActorPartBlueprint N(partsTable_8021AD80)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -2, 25 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021AE5C),
.defenseTable = N(defenseTable_8021ACB0),
.eventFlags = ACTOR_EVENT_FLAG_FIREY,
.elementImmunityFlags = 0,
.unk_1C = 0xFD,
.unk_1D = 0xF6,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 2,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021AEA8),
.defenseTable = N(defenseTable_8021ACB0),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 0xFF,
.unk_1D = 0xF6,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021AEA8),
.defenseTable = N(defenseTable_8021ACB0),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 0xFF,
.unk_1D = 0xF6,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 4,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021AEA8),
.defenseTable = N(defenseTable_8021ACB0),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 0xFF,
.unk_1D = 0xF6,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 5,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations_8021AEA8),
.defenseTable = N(defenseTable_8021ACB0),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 0xFF,
.unk_1D = 0xF6,
},
};
extern EvtScript N(init_8021AEB4);
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_EMBER,
.level = 24,
.maxHP = 10,
.partCount = ARRAY_COUNT(N(partsTable_8021AD80)),
.partsData = N(partsTable_8021AD80),
.script = &N(init_8021AEB4),
.statusTable = N(statusTable_8021ACD4),
.escapeChance = 60,
.airLiftChance = 80,
.spookChance = 75,
.baseStatusChance = 50,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 80,
.coinReward = 2,
.size = { 33, 32 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
s32 N(idleAnimations_8021AE5C)[] = {
STATUS_NORMAL, ANIM_LavaBubble_Blue_Anim01,
STATUS_STONE, ANIM_LavaBubble_Blue_Anim00,
STATUS_SLEEP, ANIM_LavaBubble_Blue_Anim01,
STATUS_POISON, ANIM_LavaBubble_Blue_Anim01,
STATUS_STOP, ANIM_LavaBubble_Blue_Anim00,
STATUS_STATIC, ANIM_LavaBubble_Blue_Anim01,
STATUS_PARALYZE, ANIM_LavaBubble_Blue_Anim00,
STATUS_DIZZY, ANIM_LavaBubble_Blue_Anim0A,
STATUS_FEAR, ANIM_LavaBubble_Blue_Anim0A,
STATUS_END,
};
s32 N(idleAnimations_8021AEA8)[] = {
STATUS_NORMAL, ANIM_LavaBubble_Blue_Anim01,
STATUS_END,
};
extern EvtScript N(takeTurn_8021D284);
extern EvtScript N(idle_8021B07C);
extern EvtScript N(handleEvent_8021B8BC);
EvtScript N(init_8021AEB4) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn_8021D284)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle_8021B07C)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent_8021B8BC)))
EVT_CALL(GetActorVar, -127, 0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(SetActorVar, -127, 0, 1)
EVT_CASE_EQ(1)
EVT_CALL(SetActorVar, -127, 0, 0)
EVT_END_SWITCH
EVT_CALL(SetPartScale, -127, 2, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_CALL(SetPartScale, -127, 3, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_CALL(SetPartScale, -127, 4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_CALL(SetPartScale, -127, 5, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_CALL(SetActorVar, -127, 1, 0)
EVT_CALL(SetActorVar, -127, 2, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 5)
EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_RETURN
EVT_END
};
EvtScript N(idle_8021B07C) = {
EVT_LABEL(0)
EVT_CALL(MakeLerp, 0, 10, 25, 10)
EVT_LABEL(1)
EVT_CALL(UpdateLerp)
EVT_CALL(GetHomePos, -127, LVar2, LVar3, LVar4)
EVT_ADD(LVar0, LVar3)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar2, LVar0, LVar4)
EVT_IF_EQ(LVar1, 1)
EVT_LABEL(11)
EVT_WAIT(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_GOTO(11)
EVT_END_IF
EVT_CALL(GetActorVar, -127, 2, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_GOTO(11)
EVT_END_IF
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(MakeLerp, 10, 0, 25, 10)
EVT_LABEL(2)
EVT_CALL(UpdateLerp)
EVT_CALL(GetHomePos, -127, LVar2, LVar3, LVar4)
EVT_ADD(LVar0, LVar3)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar2, LVar0, LVar4)
EVT_IF_EQ(LVar1, 1)
EVT_LABEL(22)
EVT_WAIT(1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_GOTO(22)
EVT_END_IF
EVT_CALL(GetActorVar, -127, 2, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_GOTO(22)
EVT_END_IF
EVT_GOTO(2)
EVT_END_IF
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
#include "common/UnkSfxFunc.inc.c"
EvtScript N(8021B2FC) = {
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LavaBubble_Blue_Anim03)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_THREAD
EVT_CALL(N(UnkSfxFunc))
EVT_END_THREAD
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, 11)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LavaBubble_Blue_Anim01)
EVT_RETURN
EVT_END
};
EvtScript N(8021B398) = {
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LVar0, LVar5)
EVT_CALL(GetIndexFromHome, LVar0, LVar5)
EVT_MOD(LVar5, 4)
EVT_SWITCH(LVar5)
EVT_CASE_EQ(0)
EVT_SET(LocalFlag(1), 1)
EVT_CASE_EQ(1)
EVT_SET(LocalFlag(2), 1)
EVT_CASE_EQ(2)
EVT_SET(LocalFlag(3), 1)
EVT_CASE_EQ(3)
EVT_SET(LocalFlag(4), 1)
EVT_END_SWITCH
EVT_CALL(ChooseNextTarget, 0, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_GOTO(0)
EVT_END_IF
EVT_IF_EQ(LocalFlag(1), 0)
EVT_SET(LVarA, 0)
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(LocalFlag(2), 0)
EVT_SET(LVarA, 1)
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(LocalFlag(3), 0)
EVT_SET(LVarA, 2)
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(LocalFlag(4), 0)
EVT_SET(LVarA, 3)
EVT_RETURN
EVT_END_IF
EVT_SET(LVarA, -1)
EVT_RETURN
EVT_END
};
Vec3i N(vector3D_8021B594) = { 0, -1000, 0, };
Formation N(specialFormation_8021B5A0) = {
{ .actor = &NAMESPACE, .home = { .vec = &N(vector3D_8021B594) }},
};
EvtScript N(split) = {
EVT_CALL(GetLastDamage, -127, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorHP, -127, LVar0)
EVT_IF_LE(LVar0, 0)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetLastElement, LVar0)
EVT_IF_FLAG(LVar0, 0x20000000)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, -127, 1, LVar0)
EVT_IF_GE(LVar0, 2)
EVT_RETURN
EVT_END_IF
EVT_EXEC_WAIT(N(8021B398))
EVT_SWITCH(LVarA)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(1)
EVT_CASE_OR_EQ(2)
EVT_CASE_OR_EQ(3)
EVT_CALL(SummonEnemy, EVT_PTR(N(specialFormation_8021B5A0)), 0)
EVT_CALL(SetActorVar, LVar0, 2, 1)
EVT_CALL(GetActorHP, -127, LVarB)
EVT_CALL(SetEnemyHP, LVar0, LVarB)
EVT_CALL(GetActorPos, ACTOR_SELF, LVarB, LVarC, LVarD)
EVT_CALL(SetActorPos, LVar0, LVarB, LVarC, LVarD)
EVT_CALL(SetGoalToIndex, LVar0, LVarA)
EVT_CALL(GetGoalPos, LVar0, LVarB, LVarC, LVarD)
EVT_CALL(SetHomePos, LVar0, LVarB, LVarC, LVarD)
EVT_CALL(SetActorJumpGravity, LVar0, EVT_FLOAT(1.2))
EVT_CALL(JumpToGoal, LVar0, 20, FALSE, TRUE, FALSE)
EVT_CALL(HPBarToHome, LVar0)
EVT_CALL(GetActorVar, -127, 1, LVar1)
EVT_SWITCH(LVar1)
EVT_CASE_EQ(0)
EVT_CALL(SetActorVar, LVar0, 1, 1)
EVT_CASE_EQ(1)
EVT_CALL(SetActorVar, LVar0, 1, 2)
EVT_END_SWITCH
EVT_CALL(SetActorVar, -127, 1, 3)
EVT_CALL(SetActorVar, LVar0, 2, 0)
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent_8021B8BC) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(9)
EVT_CASE_OR_EQ(10)
EVT_EXEC(N(split))
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(14)
EVT_EXEC(N(split))
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim08)
EVT_SET_CONST(LVar2, ANIM_LavaBubble_Blue_Anim09)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(36)
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim08)
EVT_SET_CONST(LVar2, ANIM_LavaBubble_Blue_Anim09)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim09)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(11)
EVT_EXEC(N(split))
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(33)
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(47)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_759)
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07)
EVT_EXEC_WAIT(DoJumpBack)
EVT_EXEC_WAIT(N(8021B2FC))
EVT_CASE_EQ(38)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_759)
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(23)
EVT_CASE_OR_EQ(25)
EVT_CASE_OR_EQ(31)
EVT_CASE_OR_EQ(28)
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(32)
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07)
EVT_EXEC_WAIT(DoNormalHit)
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(56)
EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0)
EVT_CALL(HPBarToCurrent, ACTOR_SELF)
EVT_CASE_EQ(53)
EVT_EXEC_WAIT(N(8021B2FC))
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_CASE_EQ(49)
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(57)
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim03)
EVT_SET_CONST(LVar2, ANIM_LavaBubble_Blue_Anim07)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(58)
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim03)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(22)
EVT_SET_CONST(LVar0, 0x00000001)
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim03)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_EQ(61)
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8021BE64) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LavaBubble_Blue_Anim03)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 30)
EVT_SET(LVar1, 5)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_THREAD
EVT_CALL(N(UnkSfxFunc))
EVT_END_THREAD
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, 11)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LavaBubble_Blue_Anim01)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, 16)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
EVT_SET(LVarA, LVar0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LavaBubble_Blue_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 20)
EVT_SET(LVar1, 0)
EVT_ADD(LVar2, 1)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_IF_EQ(LVarA, 5)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_SUB(LVar0, 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_SUB(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_SUB(LVar0, 10)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 3, FALSE, TRUE, FALSE)
EVT_WAIT(14)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_EXEC_WAIT(N(8021B2FC))
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LavaBubble_Blue_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar2, 1)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 0, 0, 4, 32)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_SET(LVar0, 1)
EVT_SET(LVar1, 4587780)
EVT_EXEC_WAIT(DoJumpBack)
EVT_WAIT(5)
EVT_EXEC_WAIT(N(8021B2FC))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8021C454) = {
EVT_SET(LVar6, 2)
EVT_LOOP(4)
EVT_THREAD
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA)
EVT_IF_FLAG(LVarA, 0x80000)
EVT_CALL(SetPartScale, -127, LVar6, EVT_FLOAT(0.2), EVT_FLOAT(0.2), EVT_FLOAT(0.2))
EVT_ELSE
EVT_CALL(SetPartScale, -127, LVar6, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5))
EVT_END_IF
EVT_CALL(SetPartPos, ACTOR_SELF, LVar6, LVar0, LVar1, LVar2)
EVT_CALL(SetPartFlagBits, -127, LVar6, 1, 0)
EVT_CALL(SetPartMoveSpeed, -127, LVar6, EVT_FLOAT(8.0))
EVT_CALL(SetPartJumpGravity, -127, LVar6, EVT_FLOAT(0.01))
EVT_CALL(SetPartSounds, -127, LVar6, 2, 720, 0)
EVT_CALL(JumpPartTo, -127, LVar6, LVar3, LVar4, LVar5, 0, 0)
EVT_CALL(SetPartFlagBits, -127, LVar6, 1, 1)
EVT_END_THREAD
EVT_WAIT(3)
EVT_ADD(LVar6, 1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(8021C5F8) = {
EVT_EXEC(N(8021C454))
EVT_CALL(GetDistanceToGoal, -127, LVar0)
EVT_DIVF(LVar0, EVT_FLOAT(8.0))
EVT_ADD(LVar0, 1)
EVT_WAIT(LVar0)
EVT_RETURN
EVT_END
};
EvtScript N(8021C654) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
EVT_CALL(GetActorVar, -127, 0, LVarA)
EVT_IF_EQ(LVarA, 1)
EVT_ADD(LVar0, 100)
EVT_SET(LVar1, 5)
EVT_ELSE
EVT_ADD(LVar0, 30)
EVT_SET(LVar1, 50)
EVT_END_IF
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LavaBubble_Blue_Anim03)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_THREAD
EVT_CALL(N(UnkSfxFunc))
EVT_END_THREAD
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, 11)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LavaBubble_Blue_Anim01)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LavaBubble_Blue_Anim05)
EVT_WAIT(30)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, 16)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
EVT_SET(LVarA, LVar0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LavaBubble_Blue_Anim06)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_ADD(LVar1, 4)
EVT_ADD(LVar2, 2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_SUB(LVar3, 100)
EVT_ADD(LVar5, 2)
EVT_EXEC_WAIT(N(8021C5F8))
EVT_IF_EQ(LVarA, 5)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(20)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_EXEC_WAIT(N(8021B2FC))
EVT_WAIT(20)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LavaBubble_Blue_Anim06)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 5)
EVT_ADD(LVar1, 4)
EVT_ADD(LVar2, 2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_SUB(LVar4, 6)
EVT_ADD(LVar5, 2)
EVT_EXEC_WAIT(N(8021C5F8))
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_FIRE | DAMAGE_TYPE_NO_CONTACT), 0, 0, 3, 32)
EVT_WAIT(20)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_EXEC_WAIT(N(8021B2FC))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(8021CBC8) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LavaBubble_Blue_Anim03)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_THREAD
EVT_CALL(N(UnkSfxFunc))
EVT_END_THREAD
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, 11)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, 16)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
EVT_SET(LVarA, LVar0)
EVT_WAIT(10)
EVT_CALL(SetActorSounds, -127, 2, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2CF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LavaBubble_Blue_Anim04)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
EVT_CALL(ResetActorSounds, -127, 2)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2EF)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 30)
EVT_ADD(LVar2, 2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LavaBubble_Blue_Anim04)
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 4)
EVT_IF_EQ(LVarA, 5)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(30)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_EXEC_WAIT(N(8021B2FC))
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_WAIT(5)
EVT_CALL(SetActorSounds, -127, 2, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2CF)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_LavaBubble_Blue_Anim04)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
EVT_CALL(ResetActorSounds, -127, 2)
EVT_SET(LVarA, LVar0)
EVT_SET(LVarB, LVar1)
EVT_SET(LVarC, LVar2)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2EF)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar2, 2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 4)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 0, 0, 4, 32)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 0)
EVT_WAIT(20)
EVT_EXEC_WAIT(N(8021B2FC))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, -1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn_8021D284) = {
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(GetActorVar, -127, 0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(1)
EVT_EXEC_WAIT(N(8021BE64))
EVT_CASE_EQ(0)
EVT_EXEC_WAIT(N(8021CBC8))
EVT_END_SWITCH
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, -127, 0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(1)
EVT_CALL(GetStatusFlags, ACTOR_PARTNER, LVar0)
EVT_IF_FLAG(LVar0, 0x1000000)
EVT_EXEC_WAIT(N(8021BE64))
EVT_ELSE
EVT_CALL(RandInt, 1000, LVar0)
EVT_IF_LE(LVar0, 300)
EVT_EXEC_WAIT(N(8021C654))
EVT_ELSE
EVT_EXEC_WAIT(N(8021BE64))
EVT_END_IF
EVT_END_IF
EVT_CASE_EQ(0)
EVT_CALL(GetStatusFlags, ACTOR_PARTNER, LVar0)
EVT_IF_FLAG(LVar0, 0x1000000)
EVT_EXEC_WAIT(N(8021CBC8))
EVT_ELSE
EVT_CALL(RandInt, 1000, LVar0)
EVT_IF_LE(LVar0, 300)
EVT_EXEC_WAIT(N(8021C654))
EVT_ELSE
EVT_EXEC_WAIT(N(8021CBC8))
EVT_END_IF
EVT_END_IF
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
#include "battle/common/actor/ember.inc.c"

View File

@ -228,7 +228,7 @@ EvtScript N(takeTurn_80219444) = {
EVT_CALL(func_80269EAC, 5)
EVT_END_IF
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(CloseActionCommandInfo)
EVT_SET(LVarF, LVar0)
EVT_SWITCH(LVarF)
@ -282,7 +282,7 @@ ApiStatus func_80218000_47F0B0(Evt* script, s32 isInitialCall) {
}
EvtScript N(80219C74) = {
EVT_CALL(SetBattleFlagBits, 33554432, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_2000000, 1)
EVT_CALL(func_802535B4, 0)
EVT_CALL(WaitForState, 13)
EVT_WAIT(15)
@ -306,7 +306,7 @@ EvtScript N(80219C74) = {
EVT_CALL(ActorSpeak, 655386, 256, 1, 2097161, 2097157)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetActionCommandMode, 1)
EVT_CALL(SetBattleFlagBits, 16384, 0)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(SetMessageBoxDuration, -1)
EVT_THREAD
EVT_LOOP(15)

View File

@ -219,8 +219,8 @@ EvtScript N(idle_8021D774) = {
EvtScript N(8021D784) = {
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_NOT_FLAG(LVar0, 0x80000)
EVT_IF_FLAG(LVar0, 0x240)
EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_80000)
EVT_IF_FLAG(LVar0, BS_FLAGS1_200 | BS_FLAGS1_40)
EVT_CALL(SetActorVar, -127, 2, 1)
EVT_END_IF
EVT_ELSE
@ -231,7 +231,7 @@ EvtScript N(8021D784) = {
EVT_CASE_OR_EQ(133)
EVT_CASE_OR_EQ(136)
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_FLAG(LVar0, 0x240)
EVT_IF_FLAG(LVar0, BS_FLAGS1_200 | BS_FLAGS1_40)
EVT_CALL(SetActorVar, -127, 2, 1)
EVT_END_IF
EVT_END_CASE_GROUP
@ -433,7 +433,7 @@ EvtScript N(8021E46C) = {
EVT_IF_FLAG(LVarA, 0x20000000)
EVT_LABEL(0)
EVT_CALL(GetBattleFlags, LVarA)
EVT_IF_FLAG(LVarA, 0x100)
EVT_IF_FLAG(LVarA, BS_FLAGS1_100)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
@ -1109,10 +1109,10 @@ EvtScript N(shapeSpell) = {
EVT_WAIT(18)
EVT_IF_EQ(LocalFlag(0), 1)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT), 0, 0, 0, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT), 0, 0, 0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_ELSE
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT), 0, 0, 3, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT), 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_END_IF
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)

View File

@ -4,21 +4,104 @@
#define NAMESPACE b_area_hos_hos_01
s32 func_802184C0_47F570(void);
INCLUDE_ASM(s32, "battle/area_hos/47F570", func_802184C0_47F570);
u16 D_80224BB0_48BC60[16] = { };
s32 func_802186B8_47F768(void);
INCLUDE_ASM(s32, "battle/area_hos/47F570", func_802186B8_47F768);
void func_802184C0_47F570(s32 arg0) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
s32 temp3;
s32 func_802189D0_47FA80(void);
INCLUDE_ASM(s32, "battle/area_hos/47F570", func_802189D0_47FA80);
arg0--;
mdl_get_copied_vertices(arg0, &firstVertex, &copiedVertices, &numVertices);
s32 func_80218CEC_47FD9C(void);
INCLUDE_ASM(s32, "battle/area_hos/47F570", func_80218CEC_47FD9C);
for (i = 0; i < numVertices; i++) {
Vtx* vtx = &copiedVertices[i];
s16 temp1 = (sins(D_80224BB0_48BC60[arg0] * (i % 3 + 1) + i) + 0x8000) / 2;
s32 temp2 = temp1 * 155;
vtx->v.cn[0] = temp2 / 0x8000 + 100;
vtx->v.cn[1] = temp2 / 0x8000 + 100;
s32 D_80224BB0_48BC60[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
};
temp3 = sins(D_80224BB0_48BC60[arg0] / 0x8000 * (((i / 2) % 3 + 1) << 15) + D_80224BB0_48BC60[arg0] / 0x4000 * 0x8000 + i) + 0x8000;
vtx->v.cn[2] = vtx->v.cn[0] * temp3 / 0x10000;
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(arg0));
D_80224BB0_48BC60[arg0] += 0x253;
}
void func_802186B8_47F768(s32 arg0) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
s32 temp3;
arg0--;
mdl_get_copied_vertices(arg0, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
u8* colors = copiedVertices[i].v.cn;
s16 temp1 = (sins(D_80224BB0_48BC60[arg0] * (i % 3 + 1) + i) + 0x8000) / 2;
colors[0] = temp1 * 155 / 0x8000 + 48.62745098039216;
colors[1] = temp1 * 155 / 0x8000 + 89.41176470588236;
temp3 = sins(D_80224BB0_48BC60[arg0] / 0x8000 * (((i / 2) % 3 + 1) << 15) + D_80224BB0_48BC60[arg0] / 0x4000 * 0x8000 + i) + 0x8000;
colors[2] = colors[0] * temp3 / 0x10000 + 99.6078431372549;
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(arg0));
D_80224BB0_48BC60[arg0] += 0x253;
}
void func_802189D0_47FA80(s32 arg0) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
s32 temp3;
arg0--;
mdl_get_copied_vertices(arg0, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
u8* colors = copiedVertices[i].v.cn;
s16 temp1 = (sins(D_80224BB0_48BC60[arg0] * (i % 3 + 1) + i) + 0x8000) / 2;
colors[0] = temp1 * 155 / 0x8000 + 67.45098039215686;
colors[1] = temp1 * 155 / 0x8000 + 100.0;
temp3 = sins(D_80224BB0_48BC60[arg0] / 0x8000 * (((i / 2) % 3 + 1) << 15) + D_80224BB0_48BC60[arg0] / 0x4000 * 0x8000 + i) + 0x8000;
colors[2] = colors[0] * temp3 / 0x10000 + 59.21568627450981;
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(arg0));
D_80224BB0_48BC60[arg0] += 0x253;
}
void func_80218CEC_47FD9C(s32 arg0) {
Vtx* firstVertex;
Vtx* copiedVertices;
s32 numVertices;
s32 i;
s32 temp3;
arg0--;
mdl_get_copied_vertices(arg0, &firstVertex, &copiedVertices, &numVertices);
for (i = 0; i < numVertices; i++) {
u8* colors = copiedVertices[i].v.cn;
s16 temp1 = (sins(D_80224BB0_48BC60[arg0] * (i % 3 + 1) + i) + 0x8000) / 2;
colors[0] = temp1 * 155 / 0x8000 + 100.0;
colors[1] = temp1 * 155 / 0x8000 + 80.3921568627451;
temp3 = sins(D_80224BB0_48BC60[arg0] / 0x8000 * (((i / 2) % 3 + 1) << 15) + D_80224BB0_48BC60[arg0] / 0x4000 * 0x8000 + i) + 0x8000;
colors[2] = colors[0] * temp3 / 0x10000 + 96.07843137254902;
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(arg0));
D_80224BB0_48BC60[arg0] += 0x253;
}
EvtScript N(beforeBattle_80224BD0) = {
EVT_CALL(SetSpriteShading, -1)

View File

@ -261,7 +261,7 @@ ApiStatus b_area_isk_part_1_ChompChainUpdate(Evt* script, s32 isInitialCall) {
three = 3;
animState = actor->state.unk_6C;
animState = actor->state.functionTempPtr[0];
if (actor->debuff == STATUS_SHRINK) {
ax = actor->currentPos.x + 6.0;
ay = actor->currentPos.y + 2.5;

View File

@ -276,7 +276,7 @@ ApiStatus b_area_isk_part_2_chain_chomp_ChompChainUpdate(Evt* script, s32 isInit
three = 3;
animState = actor->state.unk_6C;
animState = actor->state.functionTempPtr[0];
if (actor->debuff == STATUS_SHRINK) {
ax = actor->currentPos.x + 6.0;
ay = actor->currentPos.y + 2.5;

View File

@ -519,7 +519,7 @@ EvtScript N(onDeath) = {
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 3)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleKammy_Anim03)
EVT_WAIT(50)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_20000 | BS_FLAGS1_40000, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_ENEMY_FLED, 1)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, 1)
EVT_CALL(ActorSpeak, MSG_CH8_009B, ACTOR_SELF, 1, ANIM_BattleKammy_Anim03, ANIM_BattleKammy_Anim03)
EVT_WAIT(10)

View File

@ -303,7 +303,7 @@ EvtScript N(takeTurn_8021A5A0) = {
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_GoombaBros_Blue_Midair)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
@ -415,7 +415,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, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)

View File

@ -301,7 +301,7 @@ EvtScript N(takeTurn_8021E0F0) = {
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_GoombaBros_Blue_Midair)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
@ -413,7 +413,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, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)

View File

@ -405,7 +405,7 @@ EvtScript N(80221680) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 2, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 2, BS_FLAGS1_10)
EVT_SWITCH(LVarA)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
@ -437,7 +437,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, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarA, 0, 0, 0, 1, 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)
@ -484,7 +484,7 @@ EvtScript N(80221CD4) = {
EVT_CALL(PlayEffect, 0x14, 0, -15, 135, 0, 85, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(PlayEffect, 0x14, 0, 100, 103, 0, 70, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 2, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 2, BS_FLAGS1_10)
EVT_SWITCH(LVarA)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
@ -620,7 +620,7 @@ EvtScript N(80221CD4) = {
EVT_WAIT(24)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 2, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 65535, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(10)
EVT_RETURN

View File

@ -378,7 +378,7 @@ EvtScript N(80223DBC) = {
EVT_CALL(MoveBattleCamOver, 30)
EVT_CALL(SetOwnerTarget, 512, 2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, 3, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(ActorExists, 513, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetPartOffset, -127, 2, LVar0, LVar1, LVar2)
@ -407,7 +407,7 @@ EvtScript N(80223DBC) = {
EVT_CALL(JumpPartTo, -127, 2, LVar0, LVar1, LVar2, 20, 1)
EVT_CALL(SetOwnerTarget, 513, 1)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, 3, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(ActorExists, 514, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetPartOffset, -127, 2, LVar0, LVar1, LVar2)
@ -436,7 +436,7 @@ EvtScript N(80223DBC) = {
EVT_CALL(JumpPartTo, -127, 2, LVar0, LVar1, LVar2, 20, 1)
EVT_CALL(SetOwnerTarget, 514, 1)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, 3, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(GetPartOffset, -127, 2, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_SET(LVar1, 20)

View File

@ -303,7 +303,7 @@ EvtScript N(takeTurn_8021C3B0) = {
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_GoombaBros_Red_Midair)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
@ -415,7 +415,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, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)

View File

@ -301,7 +301,7 @@ EvtScript N(takeTurn_8021FAF0) = {
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_GoombaBros_Red_Midair)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
@ -413,7 +413,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, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)

View File

@ -340,7 +340,7 @@ EvtScript N(802250E4) = {
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetLastDamage, -127, LVar1)
EVT_CALL(GetBattleFlags, LVar2)
EVT_IF_NOT_FLAG(LVar2, 0x80000)
EVT_IF_NOT_FLAG(LVar2, BS_FLAGS1_80000)
EVT_IF_NE(LVar1, 0)
EVT_CALL(SetActorVar, -127, 1, 1)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
@ -402,7 +402,7 @@ EvtScript N(takeTurn_80225314) = {
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_JrTroopa_Jump)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 2, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 2, BS_FLAGS1_10)
EVT_SWITCH(LVarA)
EVT_CASE_OR_EQ(5)
EVT_CASE_OR_EQ(6)
@ -456,7 +456,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, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_DEFAULT
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)

View File

@ -206,7 +206,7 @@ EvtScript N(8022C6D4) = {
EVT_RETURN
EVT_END_IF
EVT_CALL(GetBattleFlags, LVar2)
EVT_IF_FLAG(LVar2, 0x80000)
EVT_IF_FLAG(LVar2, BS_FLAGS1_80000)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar2, 183)
EVT_CALL(SetActorVar, -127, 1, 1)
@ -679,7 +679,7 @@ EvtScript N(8022E198) = {
EVT_SET(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 8, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 8, BS_FLAGS1_10)
EVT_SWITCH(LVarF)
EVT_CASE_EQ(5)
EVT_THREAD
@ -780,7 +780,7 @@ EvtScript N(8022E198) = {
EVT_END_THREAD
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, 8, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, 8, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -822,7 +822,7 @@ EvtScript N(8022ED10) = {
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 6, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 6, BS_FLAGS1_10)
EVT_SWITCH(LVarA)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
@ -884,7 +884,7 @@ EvtScript N(8022ED10) = {
EVT_CALL(SetAnimation, ACTOR_SELF, 2, ANIM_SpikedParaJrTroopa_Dive)
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 0)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 8, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 8, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0)
@ -924,7 +924,7 @@ EvtScript N(8022F468) = {
EVT_WAIT(10)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_UNUSED_2C1)
EVT_CALL(SetActorSounds, -127, 2, 0, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 6, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 6, BS_FLAGS1_10)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
@ -1011,7 +1011,7 @@ EvtScript N(8022F468) = {
EVT_END_LOOP
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, 9, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, 9, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_THREAD
@ -1075,7 +1075,7 @@ EvtScript N(80230034) = {
EVT_CALL(PlayEffect, 0x13, 0, LVar0, LVar1, LVar2, LVar5, 30, 0, 0, 0, 0, 0, 0, 0)
EVT_WAIT(30)
EVT_CALL(SetAnimation, ACTOR_SELF, 3, ANIM_MageJrTroopa_SwingStaff)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVarA)
EVT_CASE_EQ(6)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
@ -1140,7 +1140,7 @@ EvtScript N(80230034) = {
EVT_ADD(LVar1, LVar7)
EVT_CALL(PlayEffect, 0x12, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 15, 0, 0, 0, 0, 0)
EVT_WAIT(15)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT), 0, 0, 8, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT), 0, 0, 8, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
@ -1196,7 +1196,7 @@ EvtScript N(80230794) = {
EVT_ADD(LVar0, 50)
EVT_SET(LVar1, 200)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_366)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVarA)
EVT_CASE_EQ(6)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
@ -1258,7 +1258,7 @@ EvtScript N(80230794) = {
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, 0, LVar5)
EVT_CALL(PlayEffect, 0x5E, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 18, 0, 0, 0, 0)
EVT_WAIT(14)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_NO_CONTACT), 0, 65536, 9, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_ELECTRIC | DAMAGE_TYPE_NO_CONTACT), 0, 65536, 9, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MakeLerp, 200, 0, 60, 0)
EVT_LABEL(2)

View File

@ -309,7 +309,7 @@ EvtScript N(takeTurn_802234A4) = {
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_JrTroopa_Jump)
EVT_CALL(SetActorSounds, -127, 2, 8418, 0)
EVT_CALL(GetActorVar, -127, 4, LVar1)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, LVar1, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, LVar1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(6)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -349,7 +349,7 @@ EvtScript N(takeTurn_802234A4) = {
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_WAIT(2)
EVT_CALL(GetActorVar, -127, 4, LVar1)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, LVar1, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, LVar1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)

View File

@ -137,7 +137,7 @@ EvtScript N(8022A750) = {
EVT_RETURN
EVT_END_IF
EVT_CALL(GetBattleFlags, LVar2)
EVT_IF_FLAG(LVar2, 0x80000)
EVT_IF_FLAG(LVar2, BS_FLAGS1_80000)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar2, 183)
EVT_CALL(SetActorVar, -127, 3, 1)
@ -393,7 +393,7 @@ EvtScript N(takeTurn_8022B4F0) = {
EVT_WAIT(30)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_MageJrTroopa_SwingStaff)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVarA)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
@ -442,7 +442,7 @@ EvtScript N(takeTurn_8022B4F0) = {
EVT_ADD(LVar1, LVar7)
EVT_CALL(PlayEffect, 0x12, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 15, 0, 0, 0, 0, 0)
EVT_WAIT(15)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT), 0, 0, 8, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT), 0, 0, 8, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(GetActorVar, -127, 1, LVar0)

View File

@ -123,7 +123,7 @@ EvtScript N(80225F7C) = {
EVT_RETURN
EVT_END_IF
EVT_CALL(GetBattleFlags, LVar2)
EVT_IF_FLAG(LVar2, 0x80000)
EVT_IF_FLAG(LVar2, BS_FLAGS1_80000)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar2, 183)
EVT_CALL(SetActorVar, -127, 1, 1)
@ -401,7 +401,7 @@ EvtScript N(takeTurn_80226F58) = {
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 5, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 5, BS_FLAGS1_10)
EVT_SWITCH(LVarA)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
@ -463,7 +463,7 @@ EvtScript N(takeTurn_80226F58) = {
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 0)
EVT_END_SWITCH
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SET(LVarF, LVar0)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(0)

View File

@ -378,7 +378,7 @@ EvtScript N(takeTurn_8021CDFC) = {
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, ((0)), 0, 1, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, ((0)), 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
@ -454,7 +454,7 @@ EvtScript N(takeTurn_8021CDFC) = {
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 0)
EVT_END_SWITCH
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((0)), 0, 0, 1, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((0)), 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)
@ -774,7 +774,7 @@ EvtScript N(takeTurn_8021E788) = {
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Goomba_Midair)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, ((0)), 0, 1, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, ((0)), 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
@ -886,7 +886,7 @@ EvtScript N(takeTurn_8021E788) = {
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, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((0)), 0, 0, 1, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)

View File

@ -316,7 +316,7 @@ EvtScript N(takeTurn_8021B19C) = {
EVT_WAIT(5)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_SpikedGoomba_Midair)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, ((0)), 0, 1, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, ((0)), 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
@ -428,7 +428,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, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((0)), 0, 0, 2, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(0)
EVT_CASE_OR_EQ(2)

View File

@ -117,7 +117,7 @@ EvtScript N(80228084) = {
EVT_RETURN
EVT_END_IF
EVT_CALL(GetBattleFlags, LVar2)
EVT_IF_FLAG(LVar2, 0x80000)
EVT_IF_FLAG(LVar2, BS_FLAGS1_80000)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar2, 183)
EVT_CALL(SetActorVar, -127, 2, 1)
@ -451,7 +451,7 @@ EvtScript N(takeTurn_8022936C) = {
EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, 0)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 6, 16)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 6, BS_FLAGS1_10)
EVT_SWITCH(LVarA)
EVT_CASE_OR_EQ(6)
EVT_CASE_OR_EQ(5)
@ -513,7 +513,7 @@ EvtScript N(takeTurn_8022936C) = {
EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 0)
EVT_END_SWITCH
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 6, 32)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 6, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SET(LVarF, LVar0)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(0)

View File

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

View File

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

View File

@ -1,19 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_kpa
#include "common/ShrinkActor.inc.c"
#include "common/CosInterpMinMax.inc.c"
#include "common/GetSelectedMoveID.inc.c"
#define NAMESPACE dup2_b_area_kpa
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_kpa
#define NAMESPACE dup_b_area_kpa
#include "common/StartRumbleWithParams.inc.c"
#define NAMESPACE b_area_kpa
#include "world/common/UnkFunc52.inc.c"

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,546 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/DryBones.h"
#define NAMESPACE b_area_kpa_dry_bones
extern EvtScript N(init);
extern EvtScript N(idle);
extern EvtScript N(takeTurn);
extern EvtScript N(handleEvent);
extern EvtScript N(nextTurn);
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_DryBones_Anim02,
STATUS_STONE, ANIM_DryBones_Anim00,
STATUS_SLEEP, ANIM_DryBones_Anim0E,
STATUS_POISON, ANIM_DryBones_Anim02,
STATUS_STOP, ANIM_DryBones_Anim00,
STATUS_STATIC, ANIM_DryBones_Anim02,
STATUS_PARALYZE, ANIM_DryBones_Anim00,
STATUS_DIZZY, ANIM_DryBones_Anim0D,
STATUS_FEAR, ANIM_DryBones_Anim0D,
STATUS_END,
};
s32 N(idleAnimations_dead)[] = {
STATUS_NORMAL, ANIM_DryBones_Anim01,
STATUS_END,
};
s32 N(idleAnimations_bone)[] = {
STATUS_NORMAL, ANIM_DryBones_Anim0F,
STATUS_END,
};
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 2,
ELEMENT_FIRE, -10,
ELEMENT_BLAST, -10,
ELEMENT_END,
};
s32 N(defenseTable_dead)[] = {
ELEMENT_NORMAL, 99,
ELEMENT_FIRE, -10,
ELEMENT_BLAST, -10,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 0,
STATUS_POISON, 0,
STATUS_FROZEN, 0,
STATUS_DIZZY, 0,
STATUS_FEAR, 0,
STATUS_STATIC, 0,
STATUS_PARALYZE, 50,
STATUS_SHRINK, 60,
STATUS_STOP, 85,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, -1,
STATUS_END,
};
s32 N(statusTable_dead)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 0,
STATUS_POISON, 0,
STATUS_FROZEN, 0,
STATUS_DIZZY, 0,
STATUS_FEAR, 0,
STATUS_STATIC, 0,
STATUS_PARALYZE, 0,
STATUS_SHRINK, 0,
STATUS_STOP, 0,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -8, 30 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = -1,
.unk_1D = -10,
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = 2,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
.opacity = 255,
.idleAnimations = N(idleAnimations_bone),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = 0,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_DRY_BONES,
.level = 30,
.maxHP = 8,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 50,
.airLiftChance = 75,
.spookChance = 70,
.baseStatusChance = 10,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 95,
.coinReward = 1,
.size = { 28, 32 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -15, 15 },
.statusMessageOffset = { 3, 27 },
};
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, 8, 0)
EVT_RETURN
EVT_END
};
EvtScript N(nextTurn) = {
EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVarA)
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(GetOriginalActorType, LVar0, LVar2)
EVT_IF_NE(LVar2, LVarA)
EVT_CALL(GetActorHP, LVar0, LVar3)
EVT_IF_NE(LVar3, 0)
EVT_RETURN
EVT_END_IF
EVT_END_IF
EVT_CALL(ChooseNextTarget, 0, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(1)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(GetActorVar, LVar0, 8, LVar3)
EVT_IF_NE(LVar3, 1)
EVT_RETURN
EVT_END_IF
EVT_CALL(ChooseNextTarget, 0, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(2)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_NO_DMG_APPLY, 1)
EVT_CALL(ChooseNextTarget, 0, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_GOTO(2)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_LABEL(0)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_SWITCH(LVar1)
EVT_CASE_FLAG(STATUS_FLAG_SLEEP)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -6, 24)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 1, -5)
EVT_CASE_DEFAULT
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -8, 30)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -10)
EVT_END_SWITCH
EVT_CASE_EQ(1)
EVT_SWITCH(LVar1)
EVT_CASE_FLAG(STATUS_FLAG_SLEEP)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -1, 10)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, 0)
EVT_CASE_DEFAULT
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -1, 10)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, 0)
EVT_END_SWITCH
EVT_END_SWITCH
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(reassemble) = {
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2D2)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_DryBones_Anim08)
EVT_WAIT(20)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 1)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations_dead)))
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_PTR(N(defenseTable_dead)))
EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(statusTable_dead)))
EVT_CALL(ClearStatusEffects, ACTOR_SELF)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -1, 10)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, 0)
EVT_CALL(RandInt, 0, LVar0)
EVT_ADD(LVar0, 2)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVarA)
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(GetOriginalActorType, LVar0, LVar2)
EVT_IF_NE(LVar2, LVarA)
EVT_RETURN
EVT_END_IF
EVT_CALL(ChooseNextTarget, 0, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(1)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(GetActorVar, LVar0, 8, LVar3)
EVT_IF_NE(LVar3, 1)
EVT_RETURN
EVT_END_IF
EVT_CALL(ChooseNextTarget, 0, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(EnemyCreateTargetList, 32770)
EVT_CALL(InitTargetIterator)
EVT_LABEL(2)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
EVT_CALL(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_NO_DMG_APPLY, 1)
EVT_CALL(ChooseNextTarget, 0, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_GOTO(2)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim07)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim07)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_EXPLOSIVE, 1)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim0B)
EVT_SET_CONST(LVar2, ANIM_DryBones_Anim0C)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_EXPLOSIVE, 0)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim0B)
EVT_SET_CONST(LVar2, ANIM_DryBones_Anim0C)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim07)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim07)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_EXEC_WAIT(N(reassemble))
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim02)
EVT_EXEC_WAIT(DoImmune)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_IF
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim07)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_WAIT(10)
EVT_EXEC_WAIT(N(reassemble))
EVT_END_IF
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim02)
EVT_EXEC_WAIT(DoRecover)
EVT_END_IF
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim04)
EVT_SET_CONST(LVar2, ANIM_DryBones_Anim07)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim04)
EVT_EXEC_WAIT(DoAirLift)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim09)
EVT_EXEC_WAIT(DoAirLift)
EVT_END_IF
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FROZEN | STATUS_FLAG_FEAR | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, -1, -2, 0)
EVT_ELSE
EVT_CALL(SetActorDispOffset, ACTOR_SELF, -3, -5, 0)
EVT_END_IF
EVT_END_IF
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim07)
EVT_EXEC_WAIT(DoBlowAway)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim09)
EVT_EXEC_WAIT(DoBlowAway)
EVT_END_IF
EVT_RETURN
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim02)
EVT_EXEC_WAIT(DoImmune)
EVT_ELSE
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_DryBones_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_IF
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(rotateBone) = {
EVT_SET(LVar0, 0)
EVT_LABEL(0)
EVT_CALL(SetPartRotation, ACTOR_SELF, 2, 0, 0, LVar0)
EVT_ADD(LVar0, 60)
EVT_MOD(LVar0, 360)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 1)
EVT_END_IF
EVT_CALL(GetBattlePhase, LVar0)
EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_DryBones_Anim06)
EVT_GOTO(100)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_SUB(LVar0, 1)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2D4)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_DryBones_Anim09)
EVT_WAIT(10)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2D3)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_DryBones_Anim0A)
EVT_WAIT(20)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, 1, EVT_PTR(N(idleAnimations)))
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_PTR(N(defenseTable)))
EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(statusTable)))
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 1, ACTOR_PART_FLAG_2000, 0)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -8, 30)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -10)
EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0)
EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0)
EVT_ELSE
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2D4)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_DryBones_Anim09)
EVT_WAIT(10)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, LVar0)
EVT_END_IF
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_DryBones_Anim05)
EVT_WAIT(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_DryBones_Anim06)
EVT_THREAD
EVT_WAIT(8)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_DryBones_Anim02)
EVT_END_THREAD
EVT_LABEL(100)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetPartScale, ACTOR_SELF, 2, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_ELSE
EVT_CALL(SetPartScale, ACTOR_SELF, 2, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_END_IF
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarF, LVar0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 20)
EVT_CALL(SetPartPos, ACTOR_SELF, 2, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 2, SOUND_2D1)
EVT_CALL(SetPartSounds, ACTOR_SELF, 2, 0, 0, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, 2, 2, 0, 0)
EVT_EXEC_GET_TID(N(rotateBone), LVarA)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 100)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 2, EVT_FLOAT(12.0))
EVT_CALL(RunPartTo, ACTOR_SELF, 2, LVar0, LVar1, LVar2, 0)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_KILL_THREAD(LVarA)
EVT_IF_EQ(LVarF, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(15)
EVT_CALL(YieldTurn)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_WAIT(20)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 20)
EVT_CALL(SetPartPos, ACTOR_SELF, 2, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 0)
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, 2, SOUND_2D1)
EVT_CALL(SetPartSounds, ACTOR_SELF, 2, 0, 0, 0)
EVT_CALL(SetPartSounds, ACTOR_SELF, 2, 2, 0, 0)
EVT_EXEC_GET_TID(N(rotateBone), LVarA)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, 2, EVT_FLOAT(12.0))
EVT_CALL(RunPartTo, ACTOR_SELF, 2, LVar0, LVar1, LVar2, 0)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(GetPartOffset, ACTOR_SELF, 2, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 100)
EVT_CALL(SetPartJumpGravity, ACTOR_SELF, 2, EVT_FLOAT(0.7))
EVT_CALL(JumpPartTo, ACTOR_SELF, 2, LVar0, 0, LVar2, 30, 1)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, 2, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_KILL_THREAD(LVarA)
EVT_CALL(YieldTurn)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};

View File

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

View File

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

View File

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

View File

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

463
src/battle/area_kpa/area.c Normal file
View File

@ -0,0 +1,463 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kpa
extern ActorBlueprint N(bony_beetle);
extern ActorBlueprint N(dry_bones);
extern ActorBlueprint N(magikoopa);
extern ActorBlueprint N(magikoopa_flying);
extern ActorBlueprint N(ember);
extern ActorBlueprint N(koopatrol);
extern ActorBlueprint N(hammer_bro);
extern Stage N(kpa_01);
extern Stage N(kpa_01b);
extern Stage N(kpa_02);
extern Stage N(kpa_03);
extern Stage N(kpa_04);
extern Stage N(kpa_04b);
extern Stage N(kpa_04c);
extern Stage N(kpa_05);
extern Stage N(kpa_07);
extern Stage N(kpa_08);
extern Stage N(kpa_09);
extern Stage N(kpa_11);
extern Stage N(kpa_13);
extern Stage N(kpa_14);
Formation N(formation_00) = {
{ .actor = &N(bony_beetle), .home = { .index = 1 }, .priority = 10, .var0 = 1, },
{ .actor = &N(bony_beetle), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_01) = {
{ .actor = &N(bony_beetle), .home = { .index = 0 }, .priority = 10, .var0 = 1, },
{ .actor = &N(bony_beetle), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(bony_beetle), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_02) = {
{ .actor = &N(bony_beetle), .home = { .index = 0 }, .priority = 10, .var0 = 1, },
{ .actor = &N(dry_bones), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(dry_bones), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_03) = {
{ .actor = &N(bony_beetle), .home = { .index = 0 }, .priority = 10, .var0 = 1, },
{ .actor = &N(bony_beetle), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(dry_bones), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_04) = {
{ .actor = &N(bony_beetle), .home = { .index = 0 }, .priority = 10, .var0 = 1, },
{ .actor = &N(bony_beetle), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(magikoopa), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_05) = {
{ .actor = &N(bony_beetle), .home = { .index = 0 }, .priority = 10, .var0 = 1, },
{ .actor = &N(bony_beetle), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(bony_beetle), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(magikoopa), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_06) = {
{ .actor = &N(bony_beetle), .home = { .index = 0 }, .priority = 10, .var0 = 1, },
{ .actor = &N(dry_bones), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(bony_beetle), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(magikoopa), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_07) = {
{ .actor = &N(dry_bones), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(dry_bones), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_08) = {
{ .actor = &N(dry_bones), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(dry_bones), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(dry_bones), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_09) = {
{ .actor = &N(dry_bones), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(dry_bones), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(dry_bones), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(dry_bones), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_0A) = {
{ .actor = &N(dry_bones), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(ember), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(ember), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(ember), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_0B) = {
{ .actor = &N(dry_bones), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(dry_bones), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(magikoopa), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_0C) = {
{ .actor = &N(dry_bones), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(koopatrol), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(koopatrol), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_0D) = {
{ .actor = &N(dry_bones), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(dry_bones), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(bony_beetle), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_0E) = {
{ .actor = &N(dry_bones), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(dry_bones), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(bony_beetle), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(bony_beetle), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_0F) = {
{ .actor = &N(hammer_bro), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(hammer_bro), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_10) = {
{ .actor = &N(hammer_bro), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(hammer_bro), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(hammer_bro), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_11) = {
{ .actor = &N(hammer_bro), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(koopatrol), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_12) = {
{ .actor = &N(hammer_bro), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(hammer_bro), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(koopatrol), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_13) = {
{ .actor = &N(hammer_bro), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(koopatrol), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(koopatrol), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_14) = {
{ .actor = &N(hammer_bro), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(dry_bones), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(hammer_bro), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(magikoopa), .home = { .index = 3 }, .priority = 9, },
};
Formation N(formation_15) = {
{ .actor = &N(hammer_bro), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(hammer_bro), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(magikoopa_flying), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_16) = {
{ .actor = &N(hammer_bro), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(hammer_bro), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(hammer_bro), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(magikoopa_flying), .home = { .index = 7 }, .priority = 9, },
};
Formation N(formation_17) = {
{ .actor = &N(koopatrol), .home = { .index = 1 }, .priority = 10, },
};
Formation N(formation_18) = {
{ .actor = &N(koopatrol), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(koopatrol), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_19) = {
{ .actor = &N(koopatrol), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(koopatrol), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(koopatrol), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_1A) = {
{ .actor = &N(koopatrol), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(koopatrol), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(koopatrol), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(koopatrol), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_1B) = {
{ .actor = &N(koopatrol), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(hammer_bro), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_1C) = {
{ .actor = &N(koopatrol), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(hammer_bro), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(koopatrol), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(hammer_bro), .home = { .index = 3 }, .priority = 7, },
};
Vec3i N(formation_1D_pos1) = { 5, 0, -20 };
Vec3i N(formation_1D_pos2) = { 45, 0, -10 };
Vec3i N(formation_1D_pos3) = { 85, 0, 0 };
Vec3i N(formation_1D_pos4) = { 125, 0, 5 };
Formation N(formation_1D) = {
{ .actor = &N(koopatrol), .home = { .vec = &N(formation_1D_pos1) }, .priority = 10, },
{ .actor = &N(koopatrol), .home = { .vec = &N(formation_1D_pos2) }, .priority = 9, },
{ .actor = &N(koopatrol), .home = { .vec = &N(formation_1D_pos3) }, .priority = 8, },
{ .actor = &N(magikoopa), .home = { .vec = &N(formation_1D_pos4) }, .priority = 7, },
};
Formation N(formation_1E) = {
{ .actor = &N(koopatrol), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(koopatrol), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(magikoopa), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(magikoopa), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_1F) = {
{ .actor = &N(koopatrol), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(hammer_bro), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(magikoopa), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(magikoopa), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_20) = {
{ .actor = &N(koopatrol), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(bony_beetle), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_21) = {
{ .actor = &N(koopatrol), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(koopatrol), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(bony_beetle), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_22) = {
{ .actor = &N(koopatrol), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(bony_beetle), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(bony_beetle), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_23) = {
{ .actor = &N(koopatrol), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(bony_beetle), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(koopatrol), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_24) = {
{ .actor = &N(koopatrol), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(dry_bones), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(dry_bones), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_25) = {
{ .actor = &N(koopatrol), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(koopatrol), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(magikoopa), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(magikoopa_flying), .home = { .index = 7 }, .priority = 7, },
};
Formation N(formation_26) = {
{ .actor = &N(koopatrol), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(magikoopa), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(koopatrol), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(magikoopa), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_27) = {
{ .actor = &N(magikoopa), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(magikoopa), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_28) = {
{ .actor = &N(magikoopa), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(magikoopa), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(magikoopa), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_29) = {
{ .actor = &N(magikoopa), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(magikoopa_flying), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(magikoopa_flying), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_2A) = {
{ .actor = &N(magikoopa), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(magikoopa), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(magikoopa_flying), .home = { .index = 6 }, .priority = 8, },
{ .actor = &N(magikoopa_flying), .home = { .index = 7 }, .priority = 7, },
};
Formation N(formation_2B) = {
{ .actor = &N(magikoopa), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(koopatrol), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(koopatrol), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(koopatrol), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_2C) = {
{ .actor = &N(magikoopa), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(magikoopa), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(dry_bones), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_2D) = {
{ .actor = &N(magikoopa), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(bony_beetle), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(magikoopa), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_2E) = {
{ .actor = &N(magikoopa), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(bony_beetle), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(bony_beetle), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(magikoopa), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_2F) = {
{ .actor = &N(magikoopa), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(magikoopa), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(magikoopa_flying), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_30) = {
{ .actor = &N(magikoopa), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(koopatrol), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(magikoopa), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(koopatrol), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_31) = {
{ .actor = &N(magikoopa_flying), .home = { .index = 5 }, .priority = 10, },
{ .actor = &N(magikoopa_flying), .home = { .index = 6 }, .priority = 9, },
};
Formation N(formation_32) = {
{ .actor = &N(magikoopa_flying), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(magikoopa_flying), .home = { .index = 5 }, .priority = 9, },
{ .actor = &N(magikoopa_flying), .home = { .index = 6 }, .priority = 8, },
};
Formation N(formation_33) = {
{ .actor = &N(magikoopa_flying), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(magikoopa), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(magikoopa_flying), .home = { .index = 6 }, .priority = 8, },
{ .actor = &N(magikoopa), .home = { .index = 3 }, .priority = 7, },
};
Formation N(formation_34) = {
{ .actor = &N(magikoopa_flying), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(koopatrol), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(koopatrol), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_35) = {
{ .actor = &N(magikoopa_flying), .home = { .index = 5 }, .priority = 10, },
{ .actor = &N(hammer_bro), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_36) = {
{ .actor = &N(magikoopa_flying), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(dry_bones), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(dry_bones), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_37) = {
{ .actor = &N(magikoopa_flying), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(koopatrol), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(magikoopa_flying), .home = { .index = 6 }, .priority = 9, },
};
Formation N(formation_38) = {
{ .actor = &N(magikoopa_flying), .home = { .index = 4 }, .priority = 10, },
{ .actor = &N(hammer_bro), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(hammer_bro), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(magikoopa_flying), .home = { .index = 7 }, .priority = 7, },
};
BattleList N(formationTable) = {
BATTLE("ホネメットx", N(formation_00), &N(kpa_01)),
BATTLE("ホネメットx", N(formation_01), &N(kpa_01)),
BATTLE("ホネメット,カロンx", N(formation_02), &N(kpa_01)),
BATTLE("ホネメットx,カロン", N(formation_03), &N(kpa_01)),
BATTLE("ホネメットx,カメック", N(formation_04), &N(kpa_01)),
BATTLE("ホネメットx,カメック", N(formation_05), &N(kpa_01)),
BATTLE("ホネメット,カロン,ホネメット,カメック", N(formation_06), &N(kpa_01)),
BATTLE("カロンx", N(formation_07), &N(kpa_01)),
BATTLE("カロンx", N(formation_08), &N(kpa_01)),
BATTLE("カロンx", N(formation_09), &N(kpa_01)),
BATTLE("カロン,エルモスx", N(formation_0A), &N(kpa_01)),
BATTLE("カロンx,カメック", N(formation_0B), &N(kpa_01)),
BATTLE("カロン,トゲコx", N(formation_0C), &N(kpa_01)),
BATTLE("カロンx,ホネメット", N(formation_0D), &N(kpa_01)),
BATTLE("カロンx,ホネメットx", N(formation_0E), &N(kpa_01)),
BATTLE("ハンマーブロスx", N(formation_0F), &N(kpa_01)),
BATTLE("ハンマーブロスx", N(formation_10), &N(kpa_01)),
BATTLE("ハンマーブロス,トゲノコ", N(formation_11), &N(kpa_01)),
BATTLE("ハンマーブロスx,トゲノコ", N(formation_12), &N(kpa_01)),
BATTLE("ハンマーブロス,トゲコx", N(formation_13), &N(kpa_01)),
BATTLE("ハンマーブロス,カロン,ハンンマーブロス,カメック", N(formation_14), &N(kpa_01)),
BATTLE("ハンマーブロスx,くうちゅうカメック", N(formation_15), &N(kpa_01)),
BATTLE("ハンマーブロスx,くうちゅうカメック", N(formation_16), &N(kpa_01)),
BATTLE("トゲノコ", N(formation_17), &N(kpa_01)),
BATTLE("トゲコx", N(formation_18), &N(kpa_01)),
BATTLE("トゲコx", N(formation_19), &N(kpa_01)),
BATTLE("トゲコx", N(formation_1A), &N(kpa_01)),
BATTLE("トゲノコ,ハンマーブロス", N(formation_1B), &N(kpa_01)),
BATTLE("トゲノコ,ハンマーブロス,トゲノコ,ハンマーブロス", N(formation_1C), &N(kpa_01)),
BATTLE("トゲコx,カメック", N(formation_1D), &N(kpa_01)),
BATTLE("トゲコx,カメックx", N(formation_1E), &N(kpa_01)),
BATTLE("トゲノコ,ホネメット", N(formation_20), &N(kpa_01)),
BATTLE("トゲコx,ホネメット", N(formation_21), &N(kpa_01)),
BATTLE("トゲノコ,ホネメットx", N(formation_22), &N(kpa_01)),
BATTLE("トゲノコ,ホネメット,トゲノコ", N(formation_23), &N(kpa_01)),
BATTLE("トゲノコ,カロンx", N(formation_24), &N(kpa_01)),
BATTLE("トゲコx,カメック,くうちゅうカメック", N(formation_25), &N(kpa_01)),
BATTLE("トゲノコ,カメック,トゲノコ,カメック", N(formation_26), &N(kpa_01)),
BATTLE("カメックx", N(formation_27), &N(kpa_01)),
BATTLE("カメックx", N(formation_28), &N(kpa_01)),
BATTLE("カメック,くうちゅうカメックx", N(formation_29), &N(kpa_01)),
BATTLE("カメックx,くうちゅうカメックx", N(formation_2A), &N(kpa_01)),
BATTLE("カメック,トゲコx", N(formation_2B), &N(kpa_01)),
BATTLE("カメックx,カロン", N(formation_2C), &N(kpa_01)),
BATTLE("カメック,ホネメット,カメック", N(formation_2D), &N(kpa_01)),
BATTLE("カメック,ホネメットx,カメック", N(formation_2E), &N(kpa_01)),
BATTLE("カメックx,くうちゅうカメック", N(formation_2F), &N(kpa_01)),
BATTLE("カメック,トゲノコ,カメック,トゲノコ", N(formation_30), &N(kpa_01)),
BATTLE("くうちゅうカメックx", N(formation_31), &N(kpa_01)),
BATTLE("くうちゅうカメックx", N(formation_32), &N(kpa_01)),
BATTLE("くうちゅうカメック,カメック,くうちゅうカメック,カメック", N(formation_33), &N(kpa_01)),
BATTLE("くうちゅうカメック,トゲコx", N(formation_34), &N(kpa_01)),
BATTLE("くうちゅうカメック,ハンマーブロス", N(formation_35), &N(kpa_01)),
BATTLE("くうちゅうカメック,カロンx", N(formation_36), &N(kpa_01)),
BATTLE("くうちゅうカメック,トゲノコ,くうちゅうカメック", N(formation_37), &N(kpa_01)),
BATTLE("くうちゅうカメック,ハンマーブロスx,くうちゅうカメック", N(formation_38), &N(kpa_01)),
{},
};
StageList N(stageTable) = {
{ "kpa_01", &N(kpa_01) },
{ "kpa_01b", &N(kpa_01b) },
{ "kpa_02", &N(kpa_02) },
{ "kpa_03", &N(kpa_03) },
{ "kpa_04", &N(kpa_04) },
{ "kpa_04b", &N(kpa_04b) },
{ "kpa_04c", &N(kpa_04c) },
{ "kpa_05", &N(kpa_05) },
{ "kpa_07", &N(kpa_07) },
{ "kpa_08", &N(kpa_08) },
{ "kpa_09", &N(kpa_09) },
{ "kpa_11", &N(kpa_11) },
{ "kpa_13", &N(kpa_13) },
{ "kpa_14", &N(kpa_14) },
{},
};

View File

@ -0,0 +1,53 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/kpa_bt01_shape.h"
#define NAMESPACE b_area_kpa_kpa_01
EvtScript N(8022EFE0) = {
EVT_SET(LVarA, LVar0)
EVT_CALL(SetTexPanner, LVarA, 1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, 1, 0, LVar0, LVar1)
EVT_ADD(LVar0, 32768)
EVT_ADD(LVar1, 0)
EVT_WAIT(5)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 36, 0)
EVT_THREAD
EVT_SET(LVar0, 37)
EVT_EXEC(N(8022EFE0))
EVT_WAIT(5)
EVT_SET(LVar0, 39)
EVT_EXEC(N(8022EFE0))
EVT_END_THREAD
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
MODEL_o383, MODEL_o382, MODEL_o381, 0,
};
Stage NAMESPACE = {
.texture = "kpa_tex",
.shape = "kpa_bt01_shape",
.hit = "kpa_bt01_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,50 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/kpa_bt01_shape.h"
#define NAMESPACE b_area_kpa_kpa_01b
EvtScript N(8022F180) = {
EVT_SET(LVarA, LVar0)
EVT_CALL(SetTexPanner, LVarA, 1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, 1, 0, LVar0, LVar1)
EVT_ADD(LVar0, 32768)
EVT_ADD(LVar1, 0)
EVT_WAIT(5)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 25, 0)
EVT_SET(LVar0, 37)
EVT_EXEC(N(8022F180))
EVT_SET(LVar0, 39)
EVT_EXEC(N(8022F180))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
MODEL_o383, MODEL_o382, MODEL_o381, 0,
};
Stage NAMESPACE = {
.texture = "kpa_tex",
.shape = "kpa_bt01_shape",
.hit = "kpa_bt01_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,103 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/kpa_bt02_shape.h"
#define NAMESPACE b_area_kpa_kpa_02
EvtScript N(8022F300) = {
EVT_SET(LVarA, LVar1)
EVT_SET(LVarB, LVar2)
EVT_SET(LVarC, LVar3)
EVT_CALL(SetTexPanner, LVar0, LVar1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LVarA, 0, LVar0, LVar1)
EVT_ADD(LVar0, LVarB)
EVT_ADD(LVar1, LVarC)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(8022F3D0) = {
EVT_SET(LVarA, LVar1)
EVT_SET(LVarB, LVar2)
EVT_SET(LVarC, LVar3)
EVT_CALL(SetTexPanner, LVar0, LVar1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LVarA, 0, LVar0, 0)
EVT_CALL(SetTexPanOffset, LVarA, 1, LVar1, 0)
EVT_ADD(LVar0, LVarB)
EVT_ADD(LVar1, LVarC)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(8022F4BC) = {
EVT_SET(LVarA, LVar1)
EVT_SET(LVarB, LVar2)
EVT_SET(LVarC, LVar3)
EVT_CALL(SetTexPanner, LVar0, LVar1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LVarA, 0, 0, LVar0)
EVT_CALL(SetTexPanOffset, LVarA, 1, 0, LVar1)
EVT_ADD(LVar0, LVarB)
EVT_ADD(LVar1, LVarC)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_SET(LVar0, 16)
EVT_SET(LVar1, 1)
EVT_SET(LVar2, -400)
EVT_SET(LVar3, -800)
EVT_EXEC(N(8022F3D0))
EVT_SET(LVar0, 19)
EVT_SET(LVar1, 3)
EVT_SET(LVar2, -400)
EVT_SET(LVar3, -800)
EVT_EXEC(N(8022F3D0))
EVT_SET(LVar0, 17)
EVT_SET(LVar1, 0)
EVT_SET(LVar2, -400)
EVT_SET(LVar3, -800)
EVT_EXEC(N(8022F4BC))
EVT_SET(LVar0, 18)
EVT_SET(LVar1, 2)
EVT_SET(LVar2, -400)
EVT_SET(LVar3, -800)
EVT_EXEC(N(8022F4BC))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
MODEL_saku, 0,
};
Stage NAMESPACE = {
.texture = "kpa_tex",
.shape = "kpa_bt02_shape",
.hit = "kpa_bt02_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,32 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "mapfs/kpa_bt03_shape.h"
#define NAMESPACE b_area_kpa_kpa_03
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(func_80253734, 1)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
MODEL_tar1, 0,
};
Stage NAMESPACE = {
.texture = "kpa_tex",
.shape = "kpa_bt03_shape",
.hit = "kpa_bt03_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,53 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kpa_kpa_04
EvtScript N(8022F7F0) = {
EVT_SET(LVarA, LVar0)
EVT_CALL(SetTexPanner, LVarA, 1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, 1, 0, LVar0, LVar1)
EVT_ADD(LVar0, 32768)
EVT_ADD(LVar1, 0)
EVT_WAIT(5)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 15, 0)
EVT_CALL(SetGroupEnabled, 17, 0)
EVT_CALL(SetGroupEnabled, 16, 0)
EVT_CALL(SetGroupEnabled, 26, 0)
EVT_CALL(SetGroupEnabled, 18, 0)
EVT_CALL(SetGroupEnabled, 20, 0)
EVT_CALL(SetGroupEnabled, 22, 0)
EVT_CALL(SetGroupEnabled, 24, 0)
EVT_SET(LVar0, 32)
EVT_EXEC(N(8022F7F0))
EVT_SET(LVar0, 34)
EVT_EXEC(N(8022F7F0))
EVT_SET(LVar0, 36)
EVT_EXEC(N(8022F7F0))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "kpa_tex",
.shape = "kpa_bt04_shape",
.hit = "kpa_bt04_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
};

View File

@ -0,0 +1,52 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kpa_kpa_04b
EvtScript N(8022FA10) = {
EVT_SET(LVarA, LVar0)
EVT_CALL(SetTexPanner, LVarA, 1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, 1, 0, LVar0, LVar1)
EVT_ADD(LVar0, 32768)
EVT_ADD(LVar1, 0)
EVT_WAIT(5)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 13, 0)
EVT_CALL(SetGroupEnabled, 17, 0)
EVT_CALL(SetGroupEnabled, 16, 0)
EVT_CALL(SetGroupEnabled, 18, 0)
EVT_CALL(SetGroupEnabled, 20, 0)
EVT_CALL(SetGroupEnabled, 22, 0)
EVT_CALL(SetGroupEnabled, 24, 0)
EVT_SET(LVar0, 32)
EVT_EXEC(N(8022FA10))
EVT_SET(LVar0, 34)
EVT_EXEC(N(8022FA10))
EVT_SET(LVar0, 36)
EVT_EXEC(N(8022FA10))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "kpa_tex",
.shape = "kpa_bt04_shape",
.hit = "kpa_bt04_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
};

View File

@ -0,0 +1,53 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kpa_kpa_04c
EvtScript N(8022FC20) = {
EVT_SET(LVarA, LVar0)
EVT_CALL(SetTexPanner, LVarA, 1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, 1, 0, LVar0, LVar1)
EVT_ADD(LVar0, 32768)
EVT_ADD(LVar1, 0)
EVT_WAIT(5)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 30, 0)
EVT_CALL(SetGroupEnabled, 39, 0)
EVT_CALL(SetGroupEnabled, 38, 0)
EVT_CALL(SetGroupEnabled, 36, 0)
EVT_CALL(SetGroupEnabled, 34, 0)
EVT_CALL(SetGroupEnabled, 32, 0)
EVT_SET(LVar0, 18)
EVT_EXEC(N(8022FC20))
EVT_SET(LVar0, 20)
EVT_EXEC(N(8022FC20))
EVT_SET(LVar0, 22)
EVT_EXEC(N(8022FC20))
EVT_SET(LVar0, 24)
EVT_EXEC(N(8022FC20))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "kpa_tex",
.shape = "kpa_bt04_shape",
.hit = "kpa_bt04_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
};

View File

@ -0,0 +1,30 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/kpa_bt05_shape.h"
#define NAMESPACE b_area_kpa_kpa_05
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
MODEL_saku, 0,
};
Stage NAMESPACE = {
.texture = "kpa_tex",
.shape = "kpa_bt05_shape",
.hit = "kpa_bt05_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,98 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/kpa_bt07_shape.h"
#define NAMESPACE b_area_kpa_kpa_07
EvtScript N(8022FEB0) = {
EVT_SET(LVarA, LVar1)
EVT_SET(LVarB, LVar2)
EVT_SET(LVarC, LVar3)
EVT_CALL(SetTexPanner, LVar0, LVar1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LVarA, 0, LVar0, LVar1)
EVT_ADD(LVar0, LVarB)
EVT_ADD(LVar1, LVarC)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(8022FF80) = {
EVT_SET(LVarA, LVar1)
EVT_SET(LVarB, LVar2)
EVT_SET(LVarC, LVar3)
EVT_CALL(SetTexPanner, LVar0, LVar1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LVarA, 0, LVar0, 0)
EVT_CALL(SetTexPanOffset, LVarA, 1, LVar1, 0)
EVT_ADD(LVar0, LVarB)
EVT_ADD(LVar1, LVarC)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(8023006C) = {
EVT_SET(LVarA, LVar1)
EVT_SET(LVarB, LVar2)
EVT_SET(LVarC, LVar3)
EVT_CALL(SetTexPanner, LVar0, LVar1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, LVarA, 0, 0, LVar0)
EVT_CALL(SetTexPanOffset, LVarA, 1, 0, LVar1)
EVT_ADD(LVar0, LVarB)
EVT_ADD(LVar1, LVarC)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_SET(LVar0, 16)
EVT_SET(LVar1, 0)
EVT_SET(LVar2, -200)
EVT_SET(LVar3, 0)
EVT_EXEC(N(8022FEB0))
EVT_SET(LVar0, 17)
EVT_SET(LVar1, 1)
EVT_SET(LVar2, -120)
EVT_SET(LVar3, 0)
EVT_EXEC(N(8022FEB0))
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 2)
EVT_SET(LVar2, -100)
EVT_SET(LVar3, 0)
EVT_EXEC(N(8022FEB0))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
MODEL_kemu1, 0,
};
Stage NAMESPACE = {
.texture = "kpa_tex",
.shape = "kpa_bt07_shape",
.hit = "kpa_bt07_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,30 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/kpa_bt08_shape.h"
#define NAMESPACE b_area_kpa_kpa_08
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
MODEL_o478, 0,
};
Stage NAMESPACE = {
.texture = "kpa_tex",
.shape = "kpa_bt08_shape",
.hit = "kpa_bt08_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,30 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/kpa_bt09_shape.h"
#define NAMESPACE b_area_kpa_kpa_09
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
MODEL_o353, 0,
};
Stage NAMESPACE = {
.texture = "kpa_tex",
.shape = "kpa_bt09_shape",
.hit = "kpa_bt09_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,30 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/kpa_bt11_shape.h"
#define NAMESPACE b_area_kpa_kpa_11
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
MODEL_h2, 0,
};
Stage NAMESPACE = {
.texture = "kpa_tex",
.shape = "kpa_bt11_shape",
.hit = "kpa_bt11_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,39 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kpa_kpa_13
EvtScript N(80230440) = {
EVT_SET(LVarA, LVar0)
EVT_CALL(SetTexPanner, LVarA, 1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, 1, 0, LVar0, LVar1)
EVT_ADD(LVar0, 32768)
EVT_ADD(LVar1, 0)
EVT_WAIT(5)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "kpa_tex",
.shape = "kpa_bt13_shape",
.hit = "kpa_bt13_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
};

View File

@ -0,0 +1,39 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kpa_kpa_14
EvtScript N(80230570) = {
EVT_SET(LVarA, LVar0)
EVT_CALL(SetTexPanner, LVarA, 1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, 1, 0, LVar0, LVar1)
EVT_ADD(LVar0, 32768)
EVT_ADD(LVar1, 0)
EVT_WAIT(5)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "kpa_tex",
.shape = "kpa_bt14_shape",
.hit = "kpa_bt14_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
};

View File

@ -1,11 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup_b_area_kpa2
#include "common/FadeBackgroundToBlack.inc.c"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup_b_area_kpa2
#include "common/UnfadeBackgroundToBlack.inc.c"
#define NAMESPACE b_area_kpa2

View File

@ -1,134 +0,0 @@
#include "common.h"
#include "sprite/npc/BattleBowser.h"
#include "sprite/npc/ParadePeach.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "effects.h"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup_b_area_kpa2
#include "common/StartRumbleWithParams.inc.c"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup3_b_area_kpa2
#include "common/UnkFireBreathFXFunc.inc.c"
#define NAMESPACE b_area_kpa2
INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_802181E4_69F3E4);
#define NAMESPACE dup2_b_area_kpa2
#include "common/FadeBackgroundToBlack.inc.c"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup2_b_area_kpa2
#include "common/UnfadeBackgroundToBlack.inc.c"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup2_b_area_kpa2
#include "common/RemoveChillOut.inc.c"
#define NAMESPACE b_area_kpa2
INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_802186D0_69F8D0);
INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_80218AA4_69FCA4);
#define NAMESPACE dup2_b_area_kpa2
#include "common/StartRumbleWithParams.inc.c"
#define NAMESPACE b_area_kpa2
INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_80218F58_6A0158);
#define NAMESPACE dup3_b_area_kpa2
#include "common/FadeBackgroundToBlack.inc.c"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup3_b_area_kpa2
#include "common/UnfadeBackgroundToBlack.inc.c"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup3_b_area_kpa2
#include "common/RemoveChillOut.inc.c"
#define NAMESPACE b_area_kpa2
INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_80219444_6A0644);
INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_80219818_6A0A18);
#define NAMESPACE dup3_b_area_kpa2
#include "common/GetJumpHammerCharge.inc.c"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup3_b_area_kpa2
#include "common/GetPlayerHpPercent.inc.c"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup3_b_area_kpa2
#include "common/ItemEntityJumpToPos.inc.c"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup_b_area_kpa2
#include "common/GetItemEntityPosition.inc.c"
#define NAMESPACE b_area_kpa2
INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_80219FFC_6A11FC);
// #define NAMESPACE dup_b_area_kpa2
// #include "common/DisableRandomAbility.inc.c"
// #define NAMESPACE dup_b_area_kpa2
#define NAMESPACE dup_b_area_kpa2
#include "common/CanPlayerLoseAction.inc.c"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup_b_area_kpa2
#include "common/UnkFireBreathFXFunc.inc.c"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup3_b_area_kpa2
#include "common/StartRumbleWithParams.inc.c"
#define NAMESPACE b_area_kpa2
INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_8021A318_6A1518);
#define NAMESPACE dup4_b_area_kpa2
#include "common/FadeBackgroundToBlack.inc.c"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup4_b_area_kpa2
#include "common/UnfadeBackgroundToBlack.inc.c"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup4_b_area_kpa2
#include "common/RemoveChillOut.inc.c"
#define NAMESPACE b_area_kpa2
INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_8021A804_6A1A04);
INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_8021ABD8_6A1DD8);
#define NAMESPACE dup6_b_area_kpa2
#include "common/GetJumpHammerCharge.inc.c"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup6_b_area_kpa2
#include "common/GetPlayerHpPercent.inc.c"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup6_b_area_kpa2
#include "common/ItemEntityJumpToPos.inc.c"
#define NAMESPACE b_area_kpa2
#include "common/GetItemEntityPosition.inc.c"
//#include "common/DisableRandomAbility.inc.c"
INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_8021B3B4_6A25B4);
#define NAMESPACE dup6_b_area_kpa2
#include "common/CanPlayerLoseAction.inc.c"
#define NAMESPACE b_area_kpa2
#define NAMESPACE dup2_b_area_kpa2
#include "common/UnkFireBreathFXFunc.inc.c"
#define NAMESPACE b_area_kpa2
INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_8021B678_6A2878);

View File

@ -1,123 +0,0 @@
#include "common.h"
#include "effects.h"
#include "sprite.h"
#include "effects.h"
#define NAMESPACE b_area_kpa2
typedef struct KpaStruct {
/* 0x00 */ s32 unk_00[6];
} KpaStruct; // size = 0x14
extern KpaStruct D_80234810_6BBA10;
#include "common/StartRumbleWithParams.inc.c"
#ifdef NON_MATCHING
ApiStatus func_8021B9A8_6A2BA8(Evt* script, s32 isInitialCall) {
static KpaStruct D_80234810_6BBA10 = {90, 135, 225, 270, 315, 405};
Bytecode* args = script->ptrReadPos;
KpaStruct numbers = D_80234810_6BBA10;
Actor* actor = get_actor(script->owner1.actorID);
s32 temp_fp;
s32 temp_s5;
s32 temp_s6;
f32 temp_f24;
f32 temp_f20;
s32 temp_s0_4;
s32 temp_s1;
s32 temp_s2;
s32 temp_v0_2;
s32 t1;
EffectInstance* effect;
s32 asdf;
s32 i;
if (actor == NULL) {
return ApiStatus_DONE2;
}
temp_fp = evt_get_variable(script, *args++);
temp_s5 = evt_get_variable(script, *args++);
temp_s6 = evt_get_variable(script, *args++);
temp_f24 = evt_get_float_variable(script, *args++);
if (actor->debuff != 0xA) {
temp_s5 += temp_f24 * 36.0f;
} else {
temp_s5 += temp_f24 * 14.4;
}
for (i = 0; i < ARRAY_COUNT(numbers.unk_00); i++) {
temp_f20 = numbers.unk_00[i] + rand_int(30) - 15;
temp_s0_4 = (sin_deg(temp_f20) * 200.0f) + temp_fp;
t1 = (cos_deg(temp_f20) * 200.0f) + temp_s5;
asdf = temp_s6 + 20;
effect = fx_lightning_bolt(1, temp_fp, temp_s5, temp_s6, temp_s0_4, t1, asdf, temp_f24, 11);
temp_s1 = rand_int(256);
temp_s2 = rand_int(256);
temp_v0_2 = rand_int(256);
effect->data.lightning->unk_30 = temp_s1;
effect->data.lightning->unk_34 = temp_s2;
effect->data.lightning->unk_38 = temp_v0_2;
}
return ApiStatus_DONE2;
}
#else
INCLUDE_ASM(s32, "battle/area_kpa2/6A2B50", func_8021B9A8_6A2BA8);
#endif
INCLUDE_ASM(s32, "battle/area_kpa2/6A2B50", func_8021BC60_6A2E60);
#include "common/FadeBackgroundToBlack.inc.c"
#include "common/UnfadeBackgroundToBlack.inc.c"
#include "common/RemoveChillOut.inc.c"
INCLUDE_ASM(s32, "battle/area_kpa2/6A2B50", func_8021C14C_6A334C);
INCLUDE_ASM(s32, "battle/area_kpa2/6A2B50", func_8021C520_6A3720);
#include "common/GetJumpHammerCharge.inc.c"
#include "common/GetPlayerHpPercent.inc.c"
#include "common/ItemEntityJumpToPos.inc.c"
#define NAMESPACE dup2_b_area_kpa2
#include "common/GetItemEntityPosition.inc.c"
#define NAMESPACE b_area_kpa2
//#include "common/DisableRandomAbility.inc.c"
INCLUDE_ASM(s32, "battle/area_kpa2/6A2B50", func_8021CCFC_6A3EFC);
#include "common/CanPlayerLoseAction.inc.c"
#include "common/UnkFireBreathFXFunc.inc.c"
INCLUDE_ASM(s32, "battle/area_kpa2/6A2B50", func_8021CFC0_6A41C0);
//#include "common/UnkLightningFXFunc.inc.c"
INCLUDE_ASM(s32, "battle/area_kpa2/6A2B50", func_8021D290_6A4490);
// const char* D_80234880_6BBA80 = "kpa_bt01_hit";
// const char* D_80234890_6BBA90 = "kpa_bt01_shape";
// const char* D_802348A0_6BBAA0 = "kpa_tex";
// const char* D_802348A8_6BBAA8 = "kpa_bg";
// const char* D_802348B0_6BBAB0 = "kkj_bt01_hit";
// const char* D_802348C0_6BBAC0 = "kkj_bt01_shape";
// const char* D_802348D0_6BBAD0 = "kkj_tex";
// const char* D_802348D8_6BBAD8 = "kpa_bg";
// const char* D_802348E0_6BBAE0 = "kkj_bt02_hit";
// const char* D_802348F0_6BBAF0 = "kkj_bt02_shape";
// const char* D_80234900_6BBB00 = "kkj_tex";
// const char* D_80234908_6BBB08 = "クッパ(ラストバトル3)";
// const char* D_80234920_6BBB20 = "クッパ(ラストバトル2)";
// const char* D_80234938_6BBB38 = "クッパ(ラストバトル1)";
// const char* D_80234950_6BBB50 = "クッパ(オープニング)";
// const char* D_80234968_6BBB68 = "クッパ";
// const char* D_80234970_6BBB70 = "kpa_03";
// const char* D_80234978_6BBB78 = "kpa_02";
// const char* D_80234980_6BBB80 = "kpa_01";

View File

@ -0,0 +1,615 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/BattleBowser.h"
#include "effects.h"
#define NAMESPACE b_area_kpa2_bowser
enum N(ActorVars) {
N(VAR_TURN_COUNTER) = 1,
N(VAR_TURNS_AFTER_SHOCKWAVE) = 2,
N(VAR_3) = 3,
};
extern EvtScript N(init);
extern EvtScript N(idle);
extern EvtScript N(takeTurn);
extern EvtScript N(handleEvent);
extern EvtScript N(onHit);
extern EvtScript N(onDeath);
extern EvtScript N(normalAttack);
extern EvtScript N(attackShockwaveDrain);
extern EvtScript N(attackFlameBreath);
extern EvtScript N(attackClawSwipe);
extern EvtScript N(attackHeavyJump);
extern EvtScript N(returnHome);
extern EvtScript N(recover);
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_BattleBowser_Idle,
STATUS_STONE, ANIM_BattleBowser_Still,
STATUS_SLEEP, ANIM_BattleBowser_Idle,
STATUS_POISON, ANIM_BattleBowser_Idle,
STATUS_STOP, ANIM_BattleBowser_Still,
STATUS_STATIC, ANIM_BattleBowser_Still,
STATUS_PARALYZE, ANIM_BattleBowser_Still,
STATUS_PARALYZE, ANIM_BattleBowser_Still,
STATUS_DIZZY, ANIM_BattleBowser_Idle,
STATUS_DIZZY, ANIM_BattleBowser_Idle,
STATUS_END,
};
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 1,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 30,
STATUS_POISON, 0,
STATUS_FROZEN, 0,
STATUS_DIZZY, 30,
STATUS_FEAR, 0,
STATUS_STATIC, 0,
STATUS_PARALYZE, 30,
STATUS_SHRINK, 50,
STATUS_STOP, 30,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, -1,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, -1,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, -1,
STATUS_SHRINK_TURN_MOD, -1,
STATUS_STOP_TURN_MOD, -2,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -18, 72 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 2,
.unk_1C = 0,
.unk_1D = -8,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_BOWSER_PHASE_1,
.level = 100,
.maxHP = 50,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 0,
.airLiftChance = 0,
.spookChance = 0,
.baseStatusChance = 0,
.upAndAwayChance = 0,
.spinSmashReq = 4,
.powerBounceChance = 65,
.coinReward = 0,
.size = { 80, 82 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -40, 67 },
.statusMessageOffset = { 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)))
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)
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_LABEL(0)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastElement, LVarE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onHit))
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onHit))
EVT_CASE_OR_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onHit))
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(DoShockHit)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onHit))
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_SPIKE_TAUNT)
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Idle)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_30)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(1000)
EVT_CASE_DEFAULT
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, LVar1)
EVT_WAIT(20)
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(onHit) = {
EVT_SET_CONST(LVar0, 1)
EVT_EXEC_WAIT(DoNormalHit)
EVT_RETURN
EVT_END
};
EvtScript N(onDeath) = {
EVT_SET_CONST(LVar0, 1)
EVT_EXEC_WAIT(DoNormalHit)
EVT_SET_CONST(LVar0, 1)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_TURN_COUNTER), LVar0)
EVT_ADD(LVar0, 1)
EVT_IF_LT(LVar0, 5)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURN_COUNTER), LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_AFTER_SHOCKWAVE), 5)
EVT_EXEC_WAIT(N(normalAttack))
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_TURNS_AFTER_SHOCKWAVE), LVar0)
EVT_ADD(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_AFTER_SHOCKWAVE), LVar0)
EVT_IF_LT(LVar0, 4)
EVT_EXEC_WAIT(N(normalAttack))
EVT_RETURN
EVT_END_IF
EVT_IF_GT(LVar0, 6)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_AFTER_SHOCKWAVE), 0)
EVT_EXEC_WAIT(N(attackShockwaveDrain))
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorHP, ACTOR_SELF, LVar0)
EVT_IF_LT(LVar0, 8)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURNS_AFTER_SHOCKWAVE), 0)
EVT_EXEC_WAIT(N(attackShockwaveDrain))
EVT_RETURN
EVT_END_IF
EVT_EXEC_WAIT(N(normalAttack))
EVT_RETURN
EVT_END
};
EvtScript N(normalAttack) = {
EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_STATIC)
EVT_EXEC_WAIT(N(attackFlameBreath))
EVT_RETURN
EVT_END_IF
EVT_CALL(RandInt, 2, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_EXEC_WAIT(N(attackClawSwipe))
EVT_RETURN
EVT_CASE_EQ(1)
EVT_EXEC_WAIT(N(attackHeavyJump))
EVT_RETURN
EVT_CASE_DEFAULT
EVT_EXEC_WAIT(N(attackFlameBreath))
EVT_RETURN
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(attackClawSwipe) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(SetBattleCamZoom, 150)
EVT_CALL(SetBattleCamOffsetZ, 0)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 40)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Walk)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_RearUpMock)
EVT_WAIT(25)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Swipe)
EVT_WAIT(3)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVarA)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_WAIT(20)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Tantrum)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_WAIT(50)
EVT_ELSE
EVT_WAIT(30)
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_3), LVar0)
EVT_MUL(LVar0, 6)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_WAIT(30)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Mock)
EVT_WAIT(45)
EVT_IF_EQ(LVarF, HIT_RESULT_10)
EVT_RETURN
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackHeavyJump) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(SetBattleCamZoom, 150)
EVT_CALL(SetBattleCamOffsetZ, 0)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 40)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Walk)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 80, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Idle)
EVT_WAIT(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_PreJump)
EVT_WAIT(3)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Jump)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVarA)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 30)
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 28, FALSE, TRUE, FALSE)
EVT_THREAD
EVT_CALL(ShakeCam, 1, 0, 4, EVT_FLOAT(3.0))
EVT_END_THREAD
EVT_SUB(LVar0, 35)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE)
EVT_THREAD
EVT_CALL(ShakeCam, 1, 0, 4, EVT_FLOAT(2.0))
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_PostJump)
EVT_WAIT(3)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Idle)
EVT_WAIT(25)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE)
EVT_THREAD
EVT_CALL(ShakeCam, 1, 0, 4, EVT_FLOAT(3.0))
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Land)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_3), LVar0)
EVT_MUL(LVar0, 6)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE)
EVT_THREAD
EVT_CALL(ShakeCam, 1, 0, 4, EVT_FLOAT(3.0))
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_PostJump)
EVT_WAIT(3)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Idle)
EVT_WAIT(20)
EVT_IF_EQ(LVarF, HIT_RESULT_10)
EVT_RETURN
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackFlameBreath) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(SetBattleCamZoom, 150)
EVT_CALL(SetBattleCamOffsetZ, 0)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 40)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_PreFireBreath)
EVT_WAIT(35)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_FireBreathStill)
EVT_WAIT(10)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 70)
EVT_ADD(LVar1, 35)
EVT_ADD(LVar2, 10)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_SUB(LVar3, 40)
EVT_SET(LVar4, 20)
EVT_CALL(PlayEffect, EFFECT_FIRE_BREATH, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24, 0, 0, 0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 100)
EVT_WAIT(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_FireBreathLoop)
EVT_WAIT(30)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVarA)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_PostFireBreath)
EVT_WAIT(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Idle)
EVT_WAIT(30)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Tantrum)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(30)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_3), LVar0)
EVT_MUL(LVar0, 8)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, 65535, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_PostFireBreath)
EVT_WAIT(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Idle)
EVT_WAIT(30)
EVT_IF_EQ(LVarF, HIT_RESULT_10)
EVT_RETURN
EVT_END_IF
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
#include "common/FadeBackgroundToBlack.inc.c"
#include "common/UnfadeBackgroundToBlack.inc.c"
EvtScript N(attackShockwaveDrain) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 30)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Brandish)
EVT_WAIT(10)
EVT_CALL(N(FadeBackgroundToBlack))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 15)
EVT_SUB(LVar2, 3)
EVT_CALL(PlayEffect, EFFECT_LIGHT_RAYS, 2, LVar0, 90, LVar2, EVT_FLOAT(1.0), LVarF, 0, 0, 0, 0, 0, 0, 0)
EVT_SUB(LVar2, 3)
EVT_CALL(PlayEffect, EFFECT_BULB_GLOW, 2, LVar0, 90, LVar2, EVT_FLOAT(1.0), LVarE, 0, 0, 0, 0, 0, 0, 0)
EVT_WAIT(16)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 45)
EVT_WAIT(19)
EVT_CALL(RemoveEffect, LVarF)
EVT_CALL(RemoveEffect, LVarE)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 13)
EVT_SET(LVar1, 55)
EVT_CALL(PlayEffect, EFFECT_ENERGY_SHOCKWAVE, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 60, 0, 0, 0, 0, 0, 0, 0)
EVT_THREAD
EVT_CALL(N(UnfadeBackgroundToBlack))
EVT_END_THREAD
EVT_WAIT(8)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVarA)
EVT_CASE_EQ(HIT_RESULT_MISS)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Idle)
EVT_WAIT(15)
EVT_EXEC_WAIT(N(recover))
EVT_WAIT(30)
EVT_RETURN
EVT_CASE_EQ(HIT_RESULT_LUCKY)
EVT_CALL(func_8026BF48, 1)
EVT_THREAD
EVT_WAIT(2)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(func_8026BF48, 0)
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Idle)
EVT_WAIT(15)
EVT_EXEC_WAIT(N(recover))
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_WAIT(30)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(func_8026BF48, 1)
EVT_THREAD
EVT_WAIT(2)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC, 0, 0, 3, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(func_8026BF48, 0)
EVT_END_THREAD
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC, 0, STATUS_FLAG_POISON, 4, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(RemovePlayerBuffs, 268435455)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Idle)
EVT_WAIT(15)
EVT_EXEC_WAIT(N(recover))
EVT_IF_EQ(LVarF, HIT_RESULT_10)
EVT_RETURN
EVT_END_IF
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(returnHome) = {
EVT_SET(LVar0, 1)
EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF)
EVT_IF_LT(LVarA, LVarD)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_ELSE
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_END_IF
EVT_CALL(GetDist2D, LVar9, LVarA, LVarC, LVarD, LVarF)
EVT_IF_GE(LVar9, EVT_FLOAT(4.0))
EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_END_IF
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_RETURN
EVT_END
};
EvtScript N(recover) = {
EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3)
EVT_ADD(LVar2, 60)
EVT_CALL(PlayEffect, EFFECT_SPARKLES, 0, LVar1, LVar2, LVar3, EVT_FLOAT(1.0), 0, 0, 0, 0, 0, 0, 0, 0)
EVT_ADD(LVar1, 30)
EVT_ADD(LVar2, 20)
EVT_CALL(PlayEffect, EFFECT_RECOVER, 0, LVar1, LVar2, LVar3, 10, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(GetActorHP, ACTOR_SELF, LVar0)
EVT_ADD(LVar0, 10)
EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1)
EVT_IF_GT(LVar0, LVar1)
EVT_SET(LVar0, LVar1)
EVT_END_IF
EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_3), LVar0)
EVT_ADD(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_3), LVar0)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,679 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/BattleBowser.h"
#include "sprite/npc/ParadePeach.h"
#include "effects.h"
#include "sprite.h"
#define NAMESPACE b_area_kpa2_bowser_intro
enum N(ActorVars) {
N(VAR_TURN_COUNTER) = 0,
N(VAR_PEACH_SPOKE) = 1,
};
extern EvtScript N(init);
extern EvtScript N(idle);
extern EvtScript N(takeTurn);
extern EvtScript N(handleEvent);
extern EvtScript N(nextTurn);
extern EvtScript N(unkDecorationScript);
extern EvtScript N(makeWalkingSounds);
extern EvtScript N(onHit);
extern EvtScript N(onDeath);
extern EvtScript N(attackClawSwipe);
extern EvtScript N(powerUp);
extern EvtScript N(attackFireBreath);
extern EvtScript N(returnHome);
extern EvtScript N(useStarRod);
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_BattleBowser_Idle,
STATUS_STONE, ANIM_BattleBowser_Still,
STATUS_SLEEP, ANIM_BattleBowser_Idle,
STATUS_POISON, ANIM_BattleBowser_Idle,
STATUS_STOP, ANIM_BattleBowser_Still,
STATUS_STATIC, ANIM_BattleBowser_Still,
STATUS_PARALYZE, ANIM_BattleBowser_Still,
STATUS_PARALYZE, ANIM_BattleBowser_Still,
STATUS_DIZZY, ANIM_BattleBowser_Idle,
STATUS_DIZZY, ANIM_BattleBowser_Idle,
STATUS_END,
};
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(defenseTable_boosted)[] = {
ELEMENT_NORMAL, 1,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 0,
STATUS_POISON, 0,
STATUS_FROZEN, 0,
STATUS_DIZZY, 0,
STATUS_FEAR, 0,
STATUS_STATIC, 0,
STATUS_PARALYZE, 0,
STATUS_SHRINK, 0,
STATUS_STOP, 0,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
s32 N(statusTable_boosted)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 0,
STATUS_POISON, 0,
STATUS_FROZEN, 0,
STATUS_DIZZY, 0,
STATUS_FEAR, 0,
STATUS_STATIC, 0,
STATUS_PARALYZE, 0,
STATUS_SHRINK, 0,
STATUS_STOP, 0,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, 0,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -18, 72 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -8,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_INTRO_BOWSER,
.level = 0,
.maxHP = 10,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 0,
.airLiftChance = 0,
.spookChance = 0,
.baseStatusChance = 0,
.upAndAwayChance = 0,
.spinSmashReq = 4,
.powerBounceChance = 80,
.coinReward = 0,
.size = { 80, 82 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
#include "common/StartRumbleWithParams.inc.c"
#include "common/UnkFireBreathFXFunc.inc.c"
#include "common/UnkBowserFunc1.inc.c"
#include "common/FadeBackgroundToBlack.inc.c"
#include "common/UnfadeBackgroundToBlack.inc.c"
#include "common/RemoveChillOut.inc.c"
#include "common/StarRodAppearEffect.inc.c"
#include "common/StarRodPowerUpEffect.inc.c"
EvtScript N(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(func_8026E020, 1)
EVT_CALL(CreateNpc, 0, ANIM_ParadePeach_IdleRaisedArms)
EVT_CALL(SetNpcYaw, 0, 90)
EVT_CALL(SetNpcPos, 0, -130, 0, -12)
EVT_CALL(EnableNpcShadow, 0, 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(ModifyActorDecoration, ACTOR_SELF, 1, 1, 100, 0, 0, 0)
EVT_EXEC(N(unkDecorationScript))
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_800000, 1)
EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_2000000, 1)
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_LABEL(0)
EVT_EXEC_WAIT(N(makeWalkingSounds))
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(nextTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetBattlePhase, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(PHASE_PLAYER_BEGIN)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_PEACH_SPOKE), LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_PEACH_SPOKE), 1)
EVT_CALL(func_802535B4, 0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(SetBattleCamTarget, -115, 0, 0)
EVT_CALL(SetBattleCamZoom, 320)
EVT_CALL(SetBattleCamOffsetZ, 50)
EVT_CALL(MoveBattleCamOver, 20)
EVT_WAIT(20)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_10002)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180)
EVT_CALL(SpeakToPlayer, 0, ANIM_ParadePeach_Talk, ANIM_ParadePeach_IdleRaisedArms, 5, MSG_Intro_0057)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_AnimMidairStill, ANIM_Mario_AnimMidair)
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(5.0))
EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.5))
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3000B)
EVT_WAIT(24)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_10002)
EVT_WAIT(10)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(20)
EVT_CALL(func_802535B4, 1)
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastElement, LVarE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onHit))
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onHit))
EVT_CASE_OR_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onHit))
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(DoShockHit)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET(LVar1, ANIM_BattleBowser_Idle)
EVT_EXEC_WAIT(DoImmune)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_TURN_COUNTER), LVar0)
EVT_IF_EQ(LVar0, 3)
EVT_CALL(ActorSpeak, MSG_Intro_005B, ACTOR_SELF, 1, ANIM_BattleBowser_Talk, ANIM_BattleBowser_Idle)
EVT_END_IF
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_SPIKE_TAUNT)
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_EQ(EVENT_END_FIRST_STRIKE)
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Jump)
EVT_EXEC_WAIT(DoRecover)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_PostJump)
EVT_CALL(ShakeCam, 1, 0, 4, EVT_FLOAT(3.0))
EVT_CASE_EQ(EVENT_30)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(1000)
EVT_CASE_DEFAULT
EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, LVar1)
EVT_WAIT(20)
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(onHit) = {
EVT_SET_CONST(LVar0, 1)
EVT_EXEC_WAIT(DoNormalHit)
EVT_RETURN
EVT_END
};
EvtScript N(onDeath) = {
EVT_SET_CONST(LVar0, 1)
EVT_EXEC_WAIT(DoNormalHit)
EVT_SET_CONST(LVar0, 1)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_TURN_COUNTER), LVar0)
EVT_ADD(LVar0, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_TURN_COUNTER), LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_LT(3)
EVT_EXEC_WAIT(N(attackClawSwipe))
EVT_CASE_EQ(3)
EVT_EXEC_WAIT(N(powerUp))
EVT_EXEC_WAIT(N(attackClawSwipe))
EVT_CASE_EQ(4)
EVT_EXEC_WAIT(N(attackClawSwipe))
EVT_CASE_EQ(5)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 30)
EVT_WAIT(30)
EVT_CALL(ActorSpeak, MSG_Intro_005C, ACTOR_SELF, 1, ANIM_BattleBowser_Talk, ANIM_BattleBowser_Idle)
EVT_EXEC_WAIT(N(attackFireBreath))
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(attackClawSwipe) = {
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(SetBattleCamZoom, 200)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 40)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Walk)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 0, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_RearUpMock)
EVT_WAIT(25)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Swipe)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_35E)
EVT_WAIT(3)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_TURN_COUNTER), LVar1)
EVT_IF_LT(LVar1, 3)
EVT_SET(LVar0, 1)
EVT_CALL(func_80269EAC, 12)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_ELSE
EVT_SET(LVar0, 3)
EVT_CALL(func_80269EAC, 12)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 20)
EVT_THREAD
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_TURN_COUNTER), LVar0)
EVT_IF_GE(LVar0, 3)
EVT_CALL(SetNpcAnimation, 0, ANIM_ParadePeach_Weep)
EVT_ELSE
EVT_CALL(SetNpcAnimation, 0, ANIM_ParadePeach_HorrorLoop)
EVT_END_IF
EVT_WAIT(45)
EVT_CALL(SetNpcAnimation, 0, ANIM_ParadePeach_IdleRaisedArms)
EVT_END_THREAD
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_WAIT(30)
EVT_IF_EQ(LVarF, HIT_RESULT_10)
EVT_RETURN
EVT_END_IF
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(attackFireBreath) = {
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 30)
EVT_ADD(LVar1, 65)
EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2)
EVT_CALL(SetBattleCamZoom, 400)
EVT_CALL(SetBattleCamOffsetZ, 0)
EVT_CALL(MoveBattleCamOver, 40)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_PreFireBreath)
EVT_WAIT(35)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_FireBreathStill)
EVT_WAIT(10)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 50)
EVT_ADD(LVar1, 33)
EVT_ADD(LVar2, 10)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
EVT_SUB(LVar3, 40)
EVT_SET(LVar4, 20)
EVT_CALL(PlayEffect, EFFECT_FIRE_BREATH, 2, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24, 0, 0, 0)
EVT_CALL(N(UnkFireBreathFXFunc), LVarF)
EVT_THREAD
EVT_CALL(N(StartRumbleWithParams), 50, 148)
EVT_CALL(PlaySound, SOUND_3BD)
EVT_WAIT(70)
EVT_CALL(PlaySound, SOUND_7BD)
EVT_END_THREAD
EVT_CALL(SetNpcAnimation, 0, ANIM_ParadePeach_Weep)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 55)
EVT_WAIT(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_FireBreathLoop)
EVT_WAIT(30)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, 65535, 0, 10, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVarF)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CASE_OR_EQ(HIT_RESULT_10)
EVT_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_PostFireBreath)
EVT_WAIT(15)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Idle)
EVT_END_THREAD
EVT_WAIT(60)
EVT_CALL(SetNpcAnimation, 0, ANIM_ParadePeach_HorrorLoop)
EVT_LOOP(68)
EVT_CALL(GetAnimation, ACTOR_PLAYER, 0, LVar0)
EVT_IF_EQ(LVar0, ANIM_Mario_FallDown)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetNpcAnimation, 0, ANIM_ParadePeach_Bow)
EVT_WAIT(30)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(powerUp) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 30)
EVT_WAIT(30)
EVT_CALL(ActorSpeak, MSG_Intro_0058, ACTOR_SELF, 1, ANIM_BattleBowser_Talk, ANIM_BattleBowser_Idle)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 15)
EVT_ADD(LVar1, 65)
EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2)
EVT_CALL(SetBattleCamZoom, 320)
EVT_CALL(SetBattleCamOffsetZ, 0)
EVT_CALL(MoveBattleCamOver, 20)
EVT_WAIT(20)
EVT_THREAD
EVT_WAIT(2)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_ADD(LVar1, 90)
EVT_CALL(PlayEffect, EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 30, 30, 7, 30, 0, 0, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Brandish)
EVT_WAIT(30)
EVT_CALL(ActorSpeak, MSG_Intro_0059, ACTOR_SELF, 1, ANIM_BattleBowser_BrandishTalk, ANIM_BattleBowser_BrandishIdle)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_Brandish)
EVT_EXEC_WAIT(N(useStarRod))
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 15)
EVT_ADD(LVar1, 65)
EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2)
EVT_CALL(SetBattleCamZoom, 320)
EVT_CALL(SetBattleCamOffsetZ, 0)
EVT_CALL(MoveBattleCamOver, 25)
EVT_CALL(ActorSpeak, MSG_Intro_005A, ACTOR_SELF, 1, ANIM_BattleBowser_RearUpMock, ANIM_BattleBowser_RearUpStill)
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_PTR(N(defenseTable_boosted)))
EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(statusTable_boosted)))
EVT_RETURN
EVT_END
};
EvtScript N(returnHome) = {
EVT_SET(LVar0, 1)
EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(GetDist2D, LVar9, LVarA, LVarC, LVarD, LVarF)
EVT_IF_GE(LVar9, EVT_FLOAT(5.0))
EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_END_IF
EVT_IF_EQ(LVarB, 180)
EVT_LOOP(15)
EVT_SUB(LVarB, 12)
EVT_CALL(SetActorYaw, ACTOR_SELF, LVarB)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_IF
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_RETURN
EVT_END
};
EvtScript N(unkDecorationScript) = {
EVT_CALL(N(UnkBowserFunc1))
EVT_RETURN
EVT_END
};
EvtScript N(useStarRod) = {
EVT_CALL(N(FadeBackgroundToBlack))
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK)
EVT_ADD(LVar0, 15)
EVT_ADD(LVar1, 90)
EVT_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2123)
EVT_ADD(LVar2, 10)
EVT_CALL(N(StarRodAppearEffect), LVar0, LVar1, LVar2, EVT_FLOAT(2.5), EVT_FLOAT(0.05))
EVT_END_THREAD
EVT_ELSE
EVT_ADD(LVar0, 6)
EVT_ADD(LVar1, 36)
EVT_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2123)
EVT_ADD(LVar2, 10)
EVT_CALL(N(StarRodAppearEffect), LVar0, LVar1, LVar2, EVT_FLOAT(2.5), EVT_FLOAT(0.02))
EVT_END_THREAD
EVT_END_IF
EVT_WAIT(65)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK)
EVT_ADD(LVar0, 15)
EVT_SUB(LVar2, 3)
EVT_CALL(PlayEffect, EFFECT_LIGHT_RAYS, 2, LVar0, 90, LVar2, EVT_FLOAT(1.0), LVarF, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(PlayEffect, EFFECT_BULB_GLOW, 2, LVar0, 90, LVar2, EVT_FLOAT(1.0), LVarE, 0, 0, 0, 0, 0, 0, 0)
EVT_SUB(LVar2, 3)
EVT_CALL(PlayEffect, EFFECT_BULB_GLOW, 2, LVar0, 90, LVar2, EVT_FLOAT(1.0), LVarD, 0, 0, 0, 0, 0, 0, 0)
EVT_ELSE
EVT_ADD(LVar0, 6)
EVT_SUB(LVar2, 3)
EVT_CALL(PlayEffect, EFFECT_LIGHT_RAYS, 2, LVar0, 36, LVar2, EVT_FLOAT(0.4), LVarF, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(PlayEffect, EFFECT_BULB_GLOW, 2, LVar0, 36, LVar2, EVT_FLOAT(0.4), LVarE, 0, 0, 0, 0, 0, 0, 0)
EVT_SUB(LVar2, 3)
EVT_CALL(PlayEffect, EFFECT_BULB_GLOW, 2, LVar0, 36, LVar2, EVT_FLOAT(0.4), LVarD, 0, 0, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2121)
EVT_WAIT(30)
EVT_CALL(RemoveEffect, LVarF)
EVT_CALL(RemoveEffect, LVarE)
EVT_CALL(RemoveEffect, LVarD)
EVT_CALL(SetPartEventBits, ACTOR_SELF, 1, ACTOR_EVENT_FLAG_ENCHANTED, 1)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 1, 11)
EVT_CALL(SetDefenseTable, ACTOR_SELF, 1, EVT_PTR(N(defenseTable_boosted)))
EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(statusTable_boosted)))
EVT_CALL(N(RemoveChillOut))
EVT_WAIT(3)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3)
EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 40)
EVT_ADD(LVar2, 12)
EVT_CALL(PlayEffect, EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 70, 80, 25, 60, 0, 0, 0, 0, 0)
EVT_ELSE
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 16)
EVT_ADD(LVar2, 12)
EVT_CALL(PlayEffect, EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 28, 32, 10, 60, 0, 0, 0, 0, 0)
EVT_END_IF
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2125)
EVT_THREAD
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(N(StarRodPowerUpEffect), LVar0, LVar1, LVar2, EVT_FLOAT(0.8))
EVT_END_THREAD
EVT_WAIT(75)
EVT_THREAD
EVT_CALL(N(UnfadeBackgroundToBlack))
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleBowser_RearUpLaugh)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK)
EVT_ADD(LVar1, 40)
EVT_ELSE
EVT_ADD(LVar1, 16)
EVT_END_IF
EVT_CALL(PlayEffect, EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 15, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2124)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 15)
EVT_ADD(LVar1, 65)
EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2)
EVT_CALL(SetBattleCamZoom, 400)
EVT_CALL(SetBattleCamOffsetZ, 0)
EVT_CALL(MoveBattleCamOver, 32)
EVT_WAIT(32)
EVT_RETURN
EVT_END
};
EvtScript N(jumpHome) = {
EVT_IF_NE(LVar1, -1)
EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1)
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4))
EVT_CALL(SetGoalToHome, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7)
EVT_SET(LVar8, LVar2)
EVT_ADD(LVar8, LVar5)
EVT_DIV(LVar8, 2)
EVT_SET(LVar9, LVar4)
EVT_ADD(LVar9, LVar7)
EVT_DIV(LVar9, 2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9)
EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
EVT_ADD(LVar8, LVar2)
EVT_DIV(LVar8, 2)
EVT_ADD(LVar9, LVar4)
EVT_DIV(LVar9, 2)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9)
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(makeWalkingSounds) = {
EVT_CALL(GetAnimation, ACTOR_SELF, 1, LVar7)
EVT_IF_NE(LVar7, ANIM_BattleBowser_Walk)
EVT_IF_EQ(LVar3, ANIM_BattleBowser_Walk)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20B4)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20F6)
EVT_END_IF
EVT_SET(LVar3, LVar7)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7)
EVT_SUB(LVar5, LVar0)
EVT_IF_GT(LVar5, -30)
EVT_IF_LT(LVar5, 30)
EVT_SET(LVar3, LVar7)
EVT_RETURN
EVT_END_IF
EVT_END_IF
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20B4)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20F6)
EVT_SET(LVar3, LVar7)
EVT_RETURN
EVT_END
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,52 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kpa2
extern ActorBlueprint N(bowser);
extern ActorBlueprint N(bowser_intro);
extern ActorBlueprint N(bowser_phase_1);
extern ActorBlueprint N(bowser_phase_2);
extern ActorBlueprint N(bowser_phase_3);
extern Stage N(kpa_01);
extern Stage N(kpa_02);
extern Stage N(kpa_03);
Vec3i N(bowser_pos) = { 80, 0, -10 };
Formation N(formation_00) = {
{ .actor = &N(bowser), .home = { .index = 2 }, .priority = 10, },
};
Formation N(formation_01) = {
{ .actor = &N(bowser_intro), .home = { .index = 2 }, .priority = 10, },
};
Formation N(formation_02) = {
{ .actor = &N(bowser_phase_1), .home = { .index = 2 }, .priority = 10, },
};
Formation N(formation_03) = {
{ .actor = &N(bowser_phase_2), .home = { .vec = &N(bowser_pos) }, .priority = 10, },
};
Formation N(formation_04) = {
{ .actor = &N(bowser_phase_3), .home = { .vec = &N(bowser_pos) }, .priority = 10, },
};
BattleList N(formationTable) = {
BATTLE("クッパ", N(formation_00), &N(kpa_01)),
BATTLE("クッパ(オープニング)", N(formation_01), &N(kpa_02)),
BATTLE("クッパ(ラストバトル1)", N(formation_02), &N(kpa_02)),
BATTLE("クッパ(ラストバトル2)", N(formation_03), &N(kpa_03)),
BATTLE("クッパ(ラストバトル3)", N(formation_04), &N(kpa_03)),
{},
};
StageList N(stageTable) = {
{ "kpa_01", &N(kpa_01) },
{ "kpa_02", &N(kpa_02) },
{ "kpa_03", &N(kpa_03) },
{},
};

View File

@ -0,0 +1,53 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/kpa_bt01_shape.h"
#define NAMESPACE b_area_kpa2_kpa_01
EvtScript N(8022EFE0) = {
EVT_SET(LVarA, LVar0)
EVT_CALL(SetTexPanner, LVarA, 1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, 1, 0, LVar0, LVar1)
EVT_ADD(LVar0, 32768)
EVT_ADD(LVar1, 0)
EVT_WAIT(5)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 36, 0)
EVT_THREAD
EVT_SET(LVar0, 37)
EVT_EXEC(N(8022EFE0))
EVT_WAIT(5)
EVT_SET(LVar0, 39)
EVT_EXEC(N(8022EFE0))
EVT_END_THREAD
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
MODEL_o383, MODEL_o382, MODEL_o381, 0,
};
Stage NAMESPACE = {
.texture = "kpa_tex",
.shape = "kpa_bt01_shape",
.hit = "kpa_bt01_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,30 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/kkj_bt01_shape.h"
#define NAMESPACE b_area_kpa2_kpa_02
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
MODEL_hana, MODEL_ha1, MODEL_ha2, 0,
};
Stage NAMESPACE = {
.texture = "kkj_tex",
.shape = "kkj_bt01_shape",
.hit = "kkj_bt01_hit",
.bg = "kpa_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -0,0 +1,74 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kpa2_kpa_03
#include "common/UnkLightningFXFunc.inc.c"
s32 N(lightningsSettings1)[] = {
0xFFFFFFEA, 0x000000BE, 0xFFFFFFA5, 0xFFFFFFA8, 0x00000015, 0xFFFFFFA5, 0x0000003C,
0xFFFFFFFF, 0x000000BE, 0xFFFFFFA5, 0x00000058, 0x00000018, 0xFFFFFFA5, 0x0000000A,
0xFFFFFFBD, 0x000000BE, 0xFFFFFFA5, 0xFFFFFF86, 0x0000000A, 0xFFFFFFA5, 0x0000005A,
0x00000039, 0x000000BE, 0xFFFFFFA5, 0xFFFFFFFC, 0x00000011, 0xFFFFFFA5, 0x0000003C,
};
EvtScript N(createLightnings1) = {
EVT_LABEL(0)
EVT_USE_BUF(N(lightningsSettings1))
EVT_LOOP(4)
EVT_BUF_READ3(LVar0, LVar1, LVar2)
EVT_BUF_READ3(LVar3, LVar4, LVar5)
EVT_CALL(PlayEffect, EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 8, 0, 0, 0, 0)
EVT_CALL(N(UnkLightningFXFunc))
EVT_BUF_READ1(LVar0)
EVT_WAIT(LVar0)
EVT_END_LOOP
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
s32 N(lightningsSettings2)[] = {
0xFFFFFF87, 0x00000021, 0xFFFFFF98, 0xFFFFFFE8, 0x00000029, 0xFFFFFF98, 0x00000005,
0x00000024, 0x00000029, 0xFFFFFF98, 0x00000080, 0x00000022, 0xFFFFFF98, 0x0000001E,
0x00000092, 0x00000001, 0x00000071, 0x00000026, 0xFFFFFFF1, 0x00000079, 0x00000005,
0xFFFFFFBE, 0xFFFFFFF6, 0x00000073, 0xFFFFFF65, 0x00000001, 0x00000061, 0x0000005A,
};
EvtScript N(createLightnings2) = {
EVT_LABEL(0)
EVT_USE_BUF(N(lightningsSettings2))
EVT_LOOP(4)
EVT_BUF_READ3(LVar0, LVar1, LVar2)
EVT_BUF_READ3(LVar3, LVar4, LVar5)
EVT_CALL(PlayEffect, EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 5, 0, 0, 0, 0)
EVT_CALL(N(UnkLightningFXFunc))
EVT_BUF_READ1(LVar0)
EVT_WAIT(LVar0)
EVT_END_LOOP
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_EXEC(N(createLightnings1))
EVT_EXEC(N(createLightnings2))
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
Stage NAMESPACE = {
.texture = "kkj_tex",
.shape = "kkj_bt02_shape",
.hit = "kkj_bt02_hit",
.bg = "kpa_bg",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
};

View File

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

View File

@ -1,93 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_kpa3
#include "world/common/UnkFunc62.inc.c"
#include "common/ActorJumpToPos.inc.c"
#include "common/UnkActorSizeFunc.inc.c"
#include "common/UnkEffect6CFunc.inc.c"
ApiStatus func_80218BC4_6BC754(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
EffectInstance* tattleEffect = (EffectInstance*) evt_get_variable(script, *args++);
tattleEffect->data.tattleWindow->pos.y = -1000.0f;
return ApiStatus_DONE2;
}
ApiStatus func_80218BFC_6BC78C(Evt* script, s32 isInitialCall) {
EffectInstance* tattleEffect = (EffectInstance*) evt_get_variable(script, *script->ptrReadPos);
tattleEffect->data.tattleWindow->pos.y = 144.0f;
tattleEffect->flags |= EFFECT_INSTANCE_FLAGS_10;
return ApiStatus_DONE2;
}
#define NAMESPACE dup_b_area_kpa3
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_kpa3
#include "common/UnkActorPosFunc.inc.c"
#define NAMESPACE dup_b_area_kpa3
#include "common/UnkActorPosFunc.inc.c"
#define NAMESPACE b_area_kpa3
INCLUDE_ASM(s32, "battle/area_kpa3/6BBC60", func_80218F58_6BCAE8);
ApiStatus func_802193D4_6BCF64(Evt* script, s32 isInitialCall) {
WattEffectData* unkDuplighost = (WattEffectData*)get_actor(script->owner1.actorID)->state.varTable[2];
unkDuplighost->flags = 0;
if (unkDuplighost->effect1 != NULL) {
unkDuplighost->effect1->flags |= EFFECT_INSTANCE_FLAGS_10;
}
if (unkDuplighost->effect2 != NULL) {
unkDuplighost->effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
}
return ApiStatus_DONE2;
}
ApiStatus func_80219428_6BCFB8(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
WattEffectData* unkDuplighost = (WattEffectData*)get_actor(script->owner1.actorID)->state.varTable[2];
unkDuplighost->unk_04 = evt_get_variable(script, *args++);
return ApiStatus_DONE2;
}
ApiStatus func_80219474_6BD004(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
WattEffectData* unkDuplighost = (WattEffectData*)get_actor(script->owner1.enemyID)->state.varTable[2];
unkDuplighost->unk_0C = evt_get_variable(script, *args++);
return ApiStatus_DONE2;
}
ApiStatus func_802194C0_6BD050(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
WattEffectData* unkDuplighost = (WattEffectData*)get_actor(script->owner1.enemyID)->state.varTable[2];
unkDuplighost->unk_10 = evt_get_variable(script, *args++);
return ApiStatus_DONE2;
}
#include "common/UnkBackgroundFunc3.inc.c"
#include "common/SetBackgroundAlpha.inc.c"
ApiStatus func_80219588_6BD118(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
evt_set_variable(script, *args++, gPlayerData.currentPartner);
evt_set_variable(script, *args++, gPlayerData.partners[gPlayerData.currentPartner].level);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "battle/area_kpa3/6BBC60", func_802195F4_6BD184);

View File

@ -0,0 +1,494 @@
#include "common.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/ShyGuy.h"
#define NAMESPACE b_area_kpa3_anti_guy
extern s32 N(idleAnimations)[];
extern EvtScript N(init);
extern EvtScript N(takeTurn);
extern EvtScript N(idle);
extern EvtScript N(handleEvent);
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 50,
STATUS_POISON, 0,
STATUS_FROZEN, 0,
STATUS_DIZZY, 50,
STATUS_FEAR, 0,
STATUS_STATIC, 0,
STATUS_PARALYZE, 50,
STATUS_SHRINK, 50,
STATUS_STOP, 50,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, -1,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, -1,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, -1,
STATUS_STOP_TURN_MOD, -2,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_0,
.elementImmunityFlags = 0,
.unk_1C = 0xFF,
.unk_1D = 0xF6,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_ANTI_GUY_DUP,
.level = 42,
.maxHP = 50,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 0,
.airLiftChance = 0,
.spookChance = 0,
.baseStatusChance = 0,
.upAndAwayChance = 0,
.spinSmashReq = 0,
.powerBounceChance = 75,
.coinReward = 0,
.size = { 30, 30 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_ShyGuy_Black_Anim01,
STATUS_STONE, ANIM_ShyGuy_Black_Anim00,
STATUS_SLEEP, ANIM_ShyGuy_Black_Anim12,
STATUS_POISON, ANIM_ShyGuy_Black_Anim01,
STATUS_STOP, ANIM_ShyGuy_Black_Anim00,
STATUS_STATIC, ANIM_ShyGuy_Black_Anim01,
STATUS_PARALYZE, ANIM_ShyGuy_Black_Anim00,
STATUS_DIZZY, ANIM_ShyGuy_Black_Anim13,
STATUS_FEAR, ANIM_ShyGuy_Black_Anim13,
STATUS_END,
};
EvtScript N(init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(takeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(handleEvent)))
EVT_RETURN
EVT_END
};
#include "common/UnkBattleFunc1.inc.c"
EvtScript N(idle) = {
EVT_LABEL(0)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP)
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, -4, 14)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, 0, 0)
EVT_CALL(N(UnkBattleFunc1), -10, 13, 10, 13)
EVT_ELSE
EVT_CALL(SetTargetOffset, ACTOR_SELF, 1, 0, 24)
EVT_CALL(func_8027D4C8, ACTOR_SELF, 1, -1, -10)
EVT_CALL(N(UnkBattleFunc1), -10, 20, 10, 20)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(returnHome) = {
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim03)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim01)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0D)
EVT_SET_CONST(LVar2, ANIM_ShyGuy_Black_Anim0E)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0D)
EVT_SET_CONST(LVar2, ANIM_ShyGuy_Black_Anim0E)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0E)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C)
EVT_EXEC_WAIT(DoSpinSmashHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C)
EVT_EXEC_WAIT(DoJumpBack)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_EXEC_WAIT(N(returnHome))
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C)
EVT_EXEC_WAIT(DoShockHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim03)
EVT_SET_CONST(LVar2, ANIM_ShyGuy_Black_Anim14)
EVT_EXEC_WAIT(DoScareAway)
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(bumpAttack) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 20)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim03)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 50)
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 751, 0)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim05)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_SUB(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0))
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim04)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim01)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_THREAD
EVT_WAIT(3)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2EF)
EVT_END_THREAD
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim04)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 10)
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim05)
EVT_WAIT(2)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 10, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(ResetAllActorSounds, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 30)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim01)
EVT_WAIT(8)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_EXEC_WAIT(N(returnHome))
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(acrobaticAttack) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 20)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_234)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim09)
EVT_WAIT(20)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim03)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 80)
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(SetActorSounds, ACTOR_SELF, 0, 8378, 948)
EVT_CALL(SetActorSounds, ACTOR_SELF, 4, 10, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim04)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0))
EVT_SUB(LVar0, 40)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim09)
EVT_THREAD
EVT_WAIT(12)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim0A)
EVT_END_THREAD
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 10)
EVT_SET(LVar1, 0)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim05)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 30)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_SUB(LVar0, 20)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
EVT_WAIT(15)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim04)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim01)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim09)
EVT_THREAD
EVT_WAIT(9)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim0A)
EVT_END_THREAD
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 12, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_HIT)
EVT_CASE_OR_EQ(HIT_RESULT_QUAKE_IMMUNE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(MoveBattleCamOver, 15)
EVT_THREAD
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0)
EVT_SET(LVar3, 0)
EVT_LOOP(20)
EVT_SUB(LVar3, 30)
EVT_IF_LT(LVar3, 0)
EVT_ADD(LVar3, 360)
EVT_END_IF
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar3)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0)
EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_349)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_749)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim09)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim07)
EVT_WAIT(15)
EVT_GOTO(2)
EVT_LABEL(1)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
EVT_SET(LVar1, 0)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20E4)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim10)
EVT_WAIT(10)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20C3)
EVT_CALL(AddActorDecoration, ACTOR_SELF, 1, 0, 2)
EVT_CALL(RandInt, 100, LVar0)
EVT_IF_LT(LVar0, 50)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim11)
EVT_ELSE
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim13)
EVT_END_IF
EVT_WAIT(25)
EVT_CALL(RemoveActorDecoration, ACTOR_SELF, 1, 0)
EVT_CALL(SetActorYaw, ACTOR_SELF, 180)
EVT_LABEL(2)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0))
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim04)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_ShyGuy_Black_Anim01)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(RandInt, 1, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_EXEC_WAIT(N(bumpAttack))
EVT_ELSE
EVT_EXEC_WAIT(N(acrobaticAttack))
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

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

View File

@ -0,0 +1,39 @@
#include "common.h"
#include "battle/battle.h"
#define NAMESPACE b_area_kpa3
extern ActorBlueprint N(duplighost);
extern ActorBlueprint N(anti_guy);
extern Stage N(kpa_01);
Formation N(formation_00) = {
{ .actor = &N(anti_guy), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(anti_guy), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(anti_guy), .home = { .index = 2 }, .priority = 8, },
};
Formation N(formation_01) = {
{ .actor = &N(duplighost), .home = { .index = 1 }, .priority = 10, },
{ .actor = &N(duplighost), .home = { .index = 2 }, .priority = 9, },
};
Formation N(formation_02) = {
{ .actor = &N(duplighost), .home = { .index = 0 }, .priority = 10, },
{ .actor = &N(duplighost), .home = { .index = 1 }, .priority = 9, },
{ .actor = &N(duplighost), .home = { .index = 2 }, .priority = 8, },
{ .actor = &N(duplighost), .home = { .index = 3 }, .priority = 7, },
};
BattleList N(formationTable) = {
BATTLE("ブラックヘイホーx", N(formation_00), &N(kpa_01)),
BATTLE("バケバケx", N(formation_01), &N(kpa_01)),
BATTLE("バケバケx", N(formation_02), &N(kpa_01)),
{},
};
StageList N(stageTable) = {
{ "kpa_01", &N(kpa_01) },
{},
};

View File

@ -0,0 +1,53 @@
#include "common.h"
#include "battle/battle.h"
#include "mapfs/kpa_bt01_shape.h"
#define NAMESPACE b_area_kpa3_kpa_01
EvtScript N(8022EFE0) = {
EVT_SET(LVarA, LVar0)
EVT_CALL(SetTexPanner, LVarA, 1)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(0)
EVT_CALL(SetTexPanOffset, 1, 0, LVar0, LVar1)
EVT_ADD(LVar0, 32768)
EVT_ADD(LVar1, 0)
EVT_WAIT(5)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(beforeBattle) = {
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetGroupEnabled, 36, 0)
EVT_THREAD
EVT_SET(LVar0, 37)
EVT_EXEC(N(8022EFE0))
EVT_WAIT(5)
EVT_SET(LVar0, 39)
EVT_EXEC(N(8022EFE0))
EVT_END_THREAD
EVT_RETURN
EVT_END
};
EvtScript N(afterBattle) = {
EVT_RETURN
EVT_END
};
s32 N(foregroundModelList)[] = {
MODEL_o383, MODEL_o382, MODEL_o381, 0,
};
Stage NAMESPACE = {
.texture = "kpa_tex",
.shape = "kpa_bt01_shape",
.hit = "kpa_bt01_hit",
.preBattle = &N(beforeBattle),
.postBattle = &N(afterBattle),
.foregroundModelList = N(foregroundModelList),
};

View File

@ -1,13 +0,0 @@
#include "common.h"
#define NAMESPACE b_area_kpa4
INCLUDE_ASM(s32, "battle/area_kpa4/6CC070", func_80218000_6CC070);
#define NAMESPACE dup_b_area_kpa4
#include "common/UnkBattleFunc1.inc.c"
#define NAMESPACE b_area_kpa4
#define NAMESPACE dup_p_area_kpa4
#include "common/StartRumbleWithParams.inc.c"
#define NAMESPACE b_area_kpa4

View File

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

View File

@ -0,0 +1,305 @@
#include "common.h"
#include "effects.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/BulletBill.h"
#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(playExplosionEffects);
extern s32 N(idleAnimations)[];
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 0,
STATUS_POISON, 0,
STATUS_FROZEN, 0,
STATUS_DIZZY, 100,
STATUS_FEAR, 0,
STATUS_STATIC, 0,
STATUS_PARALYZE, 0,
STATUS_SHRINK, 100,
STATUS_STOP, 0,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, -1,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, -1,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, -2,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 16 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = ACTOR_EVENT_FLAG_400,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -6,
},
};
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_FLYING,
.type = ACTOR_TYPE_BOMBSHELL_BILL,
.level = 24,
.maxHP = 3,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 40,
.airLiftChance = 100,
.spookChance = 95,
.baseStatusChance = 0,
.upAndAwayChance = 95,
.spinSmashReq = 0,
.powerBounceChance = 80,
.coinReward = 0,
.size = { 28, 22 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -10, 20 },
.statusMessageOffset = { 10, 20 },
};
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_BulletBill_Gold_Anim01,
STATUS_STONE, ANIM_BulletBill_Gold_Anim00,
STATUS_STOP, ANIM_BulletBill_Gold_Anim00,
STATUS_PARALYZE, ANIM_BulletBill_Gold_Anim00,
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)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 16)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_ELSE
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar0)
EVT_CALL(GetActorPos, LVar0, LVar1, LVar2, LVar3)
EVT_CALL(GetStatusFlags, LVar0, LVar4)
EVT_IF_FLAG(LVar4, STATUS_FLAG_SHRINK)
EVT_SET(LVar5, -13)
EVT_SET(LVar6, 4)
EVT_ELSE
EVT_SET(LVar5, -33)
EVT_SET(LVar6, 11)
EVT_END_IF
EVT_ADD(LVar1, LVar5)
EVT_ADD(LVar2, LVar6)
EVT_CALL(SetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3)
EVT_CALL(CopyStatusEffects, LVar0, ACTOR_SELF)
EVT_CALL(CopyBuffs, LVar0, ACTOR_SELF)
EVT_CALL(SetActorSounds, ACTOR_SELF, 2, 0, 0)
EVT_CALL(GetActorPos, LVar0, LVar1, LVarB, LVarC)
EVT_SUB(LVar1, 90)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BulletBill_Gold_Anim03)
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3)
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BulletBill_Gold_Anim01)
EVT_CALL(ForceHomePos, ACTOR_SELF, LVar1, LVar2, LVar3)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_RETURN
EVT_END
};
EvtScript N(explode) = {
EVT_EXEC_WAIT(N(playExplosionEffects))
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Anim07)
EVT_SET(LVar2, -12345)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(EVENT_HIT_COMBO)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Anim05)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Anim05)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_EXEC_WAIT(N(explode))
EVT_RETURN
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_EXEC_WAIT(N(explode))
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_EXEC_WAIT(N(explode))
EVT_RETURN
EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_EXEC_WAIT(N(explode))
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Anim05)
EVT_EXEC_WAIT(DoShockHit)
EVT_EXEC_WAIT(N(explode))
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Anim05)
EVT_EXEC_WAIT(DoShockHit)
EVT_EXEC_WAIT(N(explode))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Anim05)
EVT_EXEC_WAIT(DoNormalHit)
EVT_EXEC_WAIT(N(explode))
EVT_RETURN
EVT_CASE_EQ(EVENT_EXPLODE_TRIGGER)
EVT_EXEC_WAIT(N(explode))
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_SCARE_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Anim05)
EVT_EXEC_WAIT(DoNormalHit)
EVT_EXEC_WAIT(N(explode))
EVT_RETURN
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Anim03)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Anim03)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_63)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(func_8024ECF8, -1, 1, 0)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BulletBill_Gold_Anim04)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0)
EVT_WAIT(1)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
EVT_WAIT(15)
EVT_CALL(UseBattleCamPresetImmediately, BTL_CAM_PRESET_19)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 6, BS_FLAGS1_10)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(HIT_RESULT_MISS)
EVT_CASE_OR_EQ(HIT_RESULT_LUCKY)
EVT_SET(LVarA, LVar0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar3, LVar1)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
EVT_SET(LVar1, LVar3)
EVT_SUB(LVar0, 90)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE)
EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY)
EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(YieldTurn)
EVT_CALL(func_8027D32C, ACTOR_SELF)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(RemoveActor, ACTOR_SELF)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar3, LVar1)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
EVT_SET(LVar1, LVar3)
EVT_ADD(LVar0, 10)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE)
EVT_EXEC_WAIT(N(playExplosionEffects))
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_WAIT(2)
EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 6, BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_CALL(YieldTurn)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Anim07)
EVT_SET(LVar2, -12345)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_END
};
EvtScript N(playExplosionEffects) = {
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_SMOKE_RING, 0, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_ADD(LVar1, 16)
EVT_ADD(LVar2, 2)
EVT_CALL(PlayEffect, EFFECT_BLAST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(3.0), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2078)
EVT_CALL(StartRumble, 11)
EVT_THREAD
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(1.0))
EVT_END_THREAD
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,237 @@
#include "common.h"
#include "effects.h"
#include "battle/battle.h"
#include "script_api/battle.h"
#include "sprite/npc/BillBlaster.h"
#define AREA b_area_kpa4
#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(bulletShot);
extern EvtScript N(wait);
extern s32 N(idleAnimations)[];
s32 N(defenseTable)[] = {
ELEMENT_NORMAL, 4,
ELEMENT_END,
};
s32 N(statusTable)[] = {
STATUS_NORMAL, 0,
STATUS_DEFAULT, 0,
STATUS_SLEEP, 0,
STATUS_POISON, 0,
STATUS_FROZEN, 0,
STATUS_DIZZY, 0,
STATUS_FEAR, 0,
STATUS_STATIC, 0,
STATUS_PARALYZE, 0,
STATUS_SHRINK, 50,
STATUS_STOP, 0,
STATUS_DEFAULT_TURN_MOD, 0,
STATUS_SLEEP_TURN_MOD, 0,
STATUS_POISON_TURN_MOD, 0,
STATUS_FROZEN_TURN_MOD, 0,
STATUS_DIZZY_TURN_MOD, 0,
STATUS_FEAR_TURN_MOD, 0,
STATUS_STATIC_TURN_MOD, 0,
STATUS_PARALYZE_TURN_MOD, 0,
STATUS_SHRINK_TURN_MOD, 0,
STATUS_STOP_TURN_MOD, -1,
STATUS_END,
};
ActorPartBlueprint N(parts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -6, 29 },
.opacity = 255,
.idleAnimations = N(idleAnimations),
.defenseTable = N(defenseTable),
.eventFlags = 0,
.elementImmunityFlags = 0,
.unk_1C = 0,
.unk_1D = -9,
},
};
ActorBlueprint NAMESPACE = {
.flags = 0,
.type = ACTOR_TYPE_BOMBSHELL_BLASTER,
.level = 27,
.maxHP = 10,
.partCount = ARRAY_COUNT(N(parts)),
.partsData = N(parts),
.script = &N(init),
.statusTable = N(statusTable),
.escapeChance = 0,
.airLiftChance = 15,
.spookChance = 10,
.baseStatusChance = 0,
.upAndAwayChance = 95,
.spinSmashReq = 4,
.powerBounceChance = 100,
.coinReward = 2,
.size = { 55, 32 },
.hpBarOffset = { 0, 0 },
.statusIconOffset = { -24, 20 },
.statusMessageOffset = { 5, 25 },
};
s32 N(idleAnimations)[] = {
STATUS_NORMAL, ANIM_BillBlaster_Gold_Anim01,
STATUS_STONE, ANIM_BillBlaster_Gold_Anim00,
STATUS_STOP, ANIM_BillBlaster_Gold_Anim00,
STATUS_PARALYZE, ANIM_BillBlaster_Gold_Anim00,
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)
EVT_RETURN
EVT_END
};
EvtScript N(idle) = {
EVT_RETURN
EVT_END
};
EvtScript N(handleEvent) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_OR_EQ(EVENT_HIT_COMBO)
EVT_CASE_OR_EQ(EVENT_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Anim03)
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_BURN_HIT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Anim03)
EVT_SET_CONST(LVar2, -1)
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_EQ(EVENT_BURN_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Anim03)
EVT_SET_CONST(LVar2, -1)
EVT_EXEC_WAIT(DoBurnHit)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Anim03)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_DEATH)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Anim03)
EVT_EXEC_WAIT(DoNormalHit)
EVT_WAIT(10)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Anim03)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Anim01)
EVT_EXEC_WAIT(DoRecover)
EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Anim03)
EVT_EXEC_WAIT(DoAirLift)
EVT_CASE_EQ(EVENT_BLOW_AWAY)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Anim03)
EVT_EXEC_WAIT(DoBlowAway)
EVT_RETURN
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(EnableIdleScript, ACTOR_SELF, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(takeTurn) = {
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, 0)
EVT_CALL(GetActorVar, ACTOR_SELF, 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, 1)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE)
EVT_RETURN
EVT_END
};
extern Formation N(formation_bill);
ApiStatus ApplyBillSettings(Evt* script, s32 isInitialCall) {
N(formation_bill)[0].var0 = 1;
N(formation_bill)[0].var1 = script->owner1.actorID;
return ApiStatus_DONE2;
}
EvtScript N(bulletShot) = {
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BillBlaster_Gold_Anim02)
EVT_WAIT(13)
EVT_THREAD
EVT_CALL(ShakeCam, 1, 0, 10, EVT_FLOAT(1.0))
EVT_END_THREAD
EVT_CALL(StartRumble, 9)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_2C8)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 33)
EVT_ADD(LVar1, 19)
EVT_ADD(LVar2, 3)
EVT_CALL(PlayEffect, EFFECT_00, LVar0, LVar1, LVar2, 2, 5, 0, 2, 0, 0, 0, 0, 0, 0)
EVT_CALL(PlayEffect, EFFECT_00, LVar0, LVar1, LVar2, 2, 5, 2, 2, 0, 0, 0, 0, 0, 0)
EVT_WAIT(2)
EVT_CALL(ApplyBillSettings)
EVT_CALL(SummonEnemy, EVT_PTR(N(formation_bill)), 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 1)
EVT_RETURN
EVT_END
};
EvtScript N(wait) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(ActorExists, LVar0, LVar1)
EVT_IF_EQ(LVar1, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
EVT_END_IF
EVT_RETURN
EVT_END
};
extern ActorBlueprint A(bombshell_bill);
Vec3i N(bill_pos) = { 0, -1000, 0 };
Formation N(formation_bill) = {
{ .actor = &A(bombshell_bill), .home = { .vec = &N(bill_pos) }, .priority = 100, },
};

View File

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

View File

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

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