misc battle cleanup II (#908)

* flags and fixes

* move category start

* first strike and battle messages

Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
HailSanta 2023-01-11 03:38:04 -05:00 committed by GitHub
parent fbc054d01c
commit efa45a5668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
192 changed files with 1062 additions and 961 deletions

View File

@ -852,8 +852,8 @@ typedef struct BattleStatus {
/* 0x04B */ s8 unk_4B;
/* 0x04C */ s8 unk_4C[16];
/* 0x05C */ s8 unk_5C[16];
/* 0x06C */ s16 unk_6C;
/* 0x06E */ s16 unk_6E;
/* 0x06C */ s16 cancelTargetMenuSubstate; // might be more generally for returning from nested 'inner' state
/* 0x06E */ s16 acceptTargetMenuSubstate; // might be more generally for returning from nested 'inner' state
/* 0x070 */ s16 menuDisableFlags; /* 1 = jump, 2 = hammer, 4 = items */
/* 0x072 */ char unk_72[2];
/* 0x074 */ s32 unk_74;

View File

@ -648,8 +648,10 @@ enum SoundIDs {
SOUND_FF = 0x000000FF,
SOUND_100 = 0x00000100,
SOUND_108 = 0x00000108,
SOUND_10B = 0x0000010B,
SOUND_IMMUNE = 0x0000010C,
SOUND_HIT_BONES = 0x0000010D,
SOUND_10E = 0x0000010E,
SOUND_10F = 0x0000010F,
SOUND_110 = 0x00000110,
SOUND_131 = 0x00000131,
@ -830,6 +832,7 @@ enum SoundIDs {
SOUND_23D = 0x0000023D,
SOUND_241 = 0x00000241,
SOUND_246 = 0x00000246,
SOUND_247 = 0x00000247,
SOUND_248 = 0x00000248,
SOUND_249 = 0x00000249,
SOUND_24A = 0x0000024A,
@ -2609,7 +2612,7 @@ enum Events {
EVENT_PEACH_BEAM = 0x00000014,
EVENT_POWER_BOUNCE_HIT = 0x00000015,
EVENT_BLOW_AWAY = 0x00000016,
EVENT_UNKNOWN_TRIGGER = 0x00000017,
EVENT_SCRIPTED_IMMUNE = 0x00000017,
EVENT_18 = 0x00000018,
EVENT_IMMUNE = 0x00000019,
EVENT_BLOCK = 0x0000001A,
@ -3242,6 +3245,7 @@ enum PartnerActions {
PARTNER_ACTION_KOOPER_2 = 2,
PARTNER_ACTION_BOMBETTE_1 = 1,
PARTNER_ACTION_BOMBETTE_2 = 2,
PARTNER_ACTION_BOMBETTE_3 = 3,
PARTNER_ACTION_PARAKARRY_HOVER = 1,
PARTNER_ACTION_WATT_SHINE = 1,
PARTNER_ACTION_LAKILESTER_1 = 1,
@ -3528,7 +3532,7 @@ enum ActorFlags {
ACTOR_FLAG_100 = 0x00000100,
ACTOR_FLAG_FLYING = 0x00000200, ///< Quake Hammer can't hit.
ACTOR_FLAG_400 = 0x00000400,
ACTOR_FLAG_HP_OFFSET_BELOW = 0x00000800, ///< HP bar offset below actor (e.g. Swooper when upside-down).
ACTOR_FLAG_HP_OFFSET_BELOW = 0x00000800, ///< HP bar offset below actor (e.g. Swooper when upside-down). Is this just UPSIDE_DOWN?
ACTOR_FLAG_1000 = 0x00001000,
ACTOR_FLAG_2000 = 0x00002000,
ACTOR_FLAG_TARGET_ONLY = 0x00004000, ///< Battle ends even if undefeated. No turn.
@ -4027,7 +4031,7 @@ enum IntroStates {
enum BattleStatusFlags1 {
BS_FLAGS1_0 = 0x00000000,
BS_FLAGS1_1 = 0x00000001, // show actors
BS_FLAGS1_ACTORS_VISIBLE = 0x00000001, // show actors
BS_FLAGS1_2 = 0x00000002, // menu is open
BS_FLAGS1_4 = 0x00000004,
BS_FLAGS1_8 = 0x00000008,
@ -4037,9 +4041,9 @@ enum BattleStatusFlags1 {
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_400 = 0x00000400, // UNUSED
BS_FLAGS1_FORCE_HIT_IMMUNE = 0x00000800,
BS_FLAGS1_AUTO_SUCCEED_ACTION = 0x00001000,
BS_FLAGS1_2000 = 0x00002000,
BS_FLAGS1_4000 = 0x00004000,
BS_FLAGS1_8000 = 0x00008000,
@ -4070,7 +4074,7 @@ enum BattleStatusFlags2 {
BS_FLAGS2_CANT_FLEE = 0x00000020,
BS_FLAGS2_PEACH_BATTLE = 0x00000040,
BS_FLAGS2_80 = 0x00000080,
BS_FLAGS2_100 = 0x00000100,
BS_FLAGS2_100 = 0x00000100, // dont decrement turbo charge on begin player turn
BS_FLAGS2_200 = 0x00000200,
BS_FLAGS2_400 = 0x00000400,
BS_FLAGS2_800 = 0x00000800,
@ -4078,11 +4082,11 @@ enum BattleStatusFlags2 {
BS_FLAGS2_4000 = 0x00004000,
BS_FLAGS2_10000 = 0x00010000,
BS_FLAGS2_100000 = 0x00100000,
BS_FLAGS2_1000000 = 0x01000000,
BS_FLAGS2_2000000 = 0x02000000,
BS_FLAGS2_4000000 = 0x04000000,
BS_FLAGS2_1000000 = 0x01000000, // possible IS_FIRST_STRIKE
BS_FLAGS2_DONT_STOP_MUSIC = 0x02000000, // don't stop playing the current song when the battle ends
BS_FLAGS2_HAS_DRAINED_HP = 0x04000000,
BS_FLAGS2_HAS_RUSH = 0x08000000,
BS_FLAGS2_10000000 = 0x10000000,
BS_FLAGS2_DROP_WHACKA_BUMP = 0x10000000,
};
enum BattleStates {
@ -4137,20 +4141,20 @@ enum BattleSubStates {
BTL_SUBSTATE_NORMAL_START_UNK_8 = 8,
// BATTLE_STATE_FIRST_STRIKE
BTL_SUBSTATE_FIRST_STRIKE_UNK_0 = 0,
BTL_SUBSTATE_FIRST_STRIKE_UNK_1 = 1,
BTL_SUBSTATE_FIRST_STRIKE_UNK_2 = 2,
BTL_SUBSTATE_FIRST_STRIKE_UNK_3 = 3,
BTL_SUBSTATE_FIRST_STRIKE_INIT = 0,
BTL_SUBSTATE_FIRST_STRIKE_AWAIT_ENEMY_READY = 1,
BTL_SUBSTATE_FIRST_STRIKE_AWAIT_SCRIPTS = 2,
BTL_SUBSTATE_FIRST_STRIKE_AWAIT_ENEMY_DONE = 3,
// BATTLE_STATE_PARTNER_FIRST_STRIKE
BTL_SUBSTATE_PARTNER_FIRST_STRIKE_UNK_0 = 0,
BTL_SUBSTATE_PARTNER_FIRST_STRIKE_UNK_1 = 1,
BTL_SUBSTATE_PARTNER_FIRST_STRIKE_UNK_2 = 2,
BTL_SUBSTATE_PARTNER_FIRST_STRIKE_UNK_3 = 3,
BTL_SUBSTATE_PARTNER_FIRST_STRIKE_INIT = 0,
BTL_SUBSTATE_PARTNER_FIRST_STRIKE_AWAIT_ENEMY_READY = 1,
BTL_SUBSTATE_PARTNER_FIRST_STRIKE_AWAIT_SCRIPTS = 2,
BTL_SUBSTATE_PARTNER_FIRST_STRIKE_AWAIT_ENEMY_DONE = 3,
// BATTLE_STATE_ENEMY_FIRST_STRIKE
BTL_SUBSTATE_ENEMY_FIRST_STRIKE_UNK_0 = 0,
BTL_SUBSTATE_ENEMY_FIRST_STRIKE_UNK_2 = 2,
BTL_SUBSTATE_ENEMY_FIRST_STRIKE_INIT = 0,
BTL_SUBSTATE_ENEMY_FIRST_STRIKE_AWAIT_SCRIPTS = 2,
// BATTLE_STATE_BEGIN_TURN
BTL_SUBSTATE_BEGIN_TURN_INIT = 0,
@ -4169,13 +4173,13 @@ enum BattleSubStates {
// BATTLE_STATE_BEGIN_PLAYER_TURN
BTL_SUBSTATE_BEGIN_PLAYER_TURN_INIT = 0,
BTL_SUBSTATE_BEGIN_PLAYER_TURN_TRY_COMMAND_RECOVER = 1,
BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_OUTTA_SIGHT = 2,
BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_OUTTA_SIGHT = 10,
BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_WATER_BLOCK = 2,
BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_WATER_BLOCK = 10,
BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_CLOUD_NINE = 11,
BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_CLOUD_NINE = 12,
BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_TURBO_CHARGE = 15,
BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_TURBO_CHARGE = 16,
BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_PARTNER_SCRIPT = 20,
BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_OUTTA_SIGHT = 20,
BTL_SUBSTATE_BEGIN_PLAYER_TURN_TRY_STATUS_DAMAGE = 21,
BTL_SUBSTATE_BEGIN_PLAYER_TURN_TRY_STATUS_RECOVER = 22,
BTL_SUBSTATE_BEGIN_PLAYER_TURN_END_DELAY = 30,
@ -4602,6 +4606,22 @@ enum BattleMessages {
BTL_MSG_54 = 0x54,
};
enum BattleMenuTypes {
BTL_MENU_TYPE_INVALID = -1,
BTL_MENU_TYPE_JUMP = 0,
BTL_MENU_TYPE_SMASH = 1,
BTL_MENU_TYPE_ITEM = 2,
BTL_MENU_TYPE_3 = 3,
BTL_MENU_TYPE_4 = 4, // defend?
BTL_MENU_TYPE_5 = 5, // partner/ability?
BTL_MENU_TYPE_6 = 6,
BTL_MENU_TYPE_7 = 7, // strategies?
BTL_MENU_TYPE_8 = 8, // spirits?
BTL_MENU_TYPE_9 = 9, // do nothing?
BTL_MENU_TYPE_A = 10, // switch to partner?
BTL_MENU_TYPE_B = 11,
};
enum DebugEnemyContactModes {
DEBUG_CONTACT_NONE = 0, // contact with enemies behaves normally
DEBUG_CONTACT_CANT_TOUCH = 1, // enemies pass through the player and cannot start battles

View File

@ -316,7 +316,7 @@ void btl_state_draw_begin_partner_turn(void);
void btl_state_update_switch_to_partner(void);
void btl_state_draw_switch_to_partner(void);
void btl_state_update_9(void);
void func_80243910(void);
void btl_state_draw_9(void);
void btl_state_update_prepare_menu(void);
void btl_state_draw_prepare_menu(void);
void btl_state_update_end_turn(void);

View File

@ -312,8 +312,8 @@ void btl_state_update_normal_start(void) {
gCurrentCameraID = CAM_BATTLE;
script = start_script(D_80280EB8, EVT_PRIORITY_A, 0);
battleStatus->camMovementScript = script;
gBattleSubState = BTL_SUBSTATE_NORMAL_START_UNK_1;
battleStatus->camMovementScriptID = script->id;
gBattleSubState = BTL_SUBSTATE_NORMAL_START_UNK_1;
break;
case BTL_SUBSTATE_NORMAL_START_UNK_1:
if (!does_script_exist(battleStatus->camMovementScriptID)) {
@ -326,7 +326,7 @@ void btl_state_update_normal_start(void) {
}
uiStatus->hidden = FALSE;
gBattleStatus.flags1 |= BS_FLAGS1_1;
gBattleStatus.flags1 |= BS_FLAGS1_ACTORS_VISIBLE;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
battleStatus->enemyActors[i] = NULL;
@ -378,7 +378,7 @@ void btl_state_update_normal_start(void) {
load_player_actor();
actor = battleStatus->playerActor;
if (gBattleStatus.flags2 & 0x40) {
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
script = start_script(D_80284A30, EVT_PRIORITY_A, 0);
} else {
script = start_script(D_80284A20, EVT_PRIORITY_A, 0);
@ -438,10 +438,10 @@ void btl_state_update_normal_start(void) {
default:
if (!(gGameStatusPtr->demoFlags & 1)) {
actor = battleStatus->playerActor;
if (gBattleStatus.flags2 & 0x40) {
script = start_script(&PeachEnterStage, 0xA, 0);
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
script = start_script(&PeachEnterStage, EVT_PRIORITY_A, 0);
} else {
script = start_script(&MarioEnterStage, 0xA, 0);
script = start_script(&MarioEnterStage, EVT_PRIORITY_A, 0);
}
actor->takeTurnScript = script;
actor->takeTurnScriptID = script->id;
@ -453,7 +453,7 @@ void btl_state_update_normal_start(void) {
is_ability_active(ABILITY_DIZZY_ATTACK))
{
actor = battleStatus->enemyActors[0];
script = start_script(&DoDizzyAttack, 0xA, 0);
script = start_script(&DoDizzyAttack, EVT_PRIORITY_A, 0);
actor->takeTurnScript = script;
actor->takeTurnScriptID = script->id;
script->owner1.enemyID = ACTOR_ENEMY0;
@ -726,28 +726,28 @@ void btl_state_update_begin_player_turn(void) {
D_8029F258 = 0;
if (battleStatus->outtaSightActive == 0) {
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_OUTTA_SIGHT;
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_WATER_BLOCK;
} else {
battleStatus->battlePhase = PHASE_ENEMY_BEGIN;
script = start_script(partner->handlePhaseSource, EVT_PRIORITY_A, 0);
partner->handlePhaseScript = script;
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_PARTNER_SCRIPT;
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_OUTTA_SIGHT;
partner->handleBatttlePhaseScriptID = script->id;
script->owner1.actorID = ACTOR_PARTNER;
}
}
break;
case BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_PARTNER_SCRIPT:
case BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_OUTTA_SIGHT:
if (!does_script_exist(partner->handleBatttlePhaseScriptID)) {
battleStatus->outtaSightActive = 0;
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_OUTTA_SIGHT;
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_WATER_BLOCK;
gBattleStatus.flags2 |= BS_FLAGS2_4;
}
break;
}
switch (gBattleSubState) {
case BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_OUTTA_SIGHT:
case BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_WATER_BLOCK:
if (battleStatus->unk_8C == 0) {
if (battleStatus->waterBlockTurnsLeft != 0) {
battleStatus->waterBlockTurnsLeft--;
@ -761,7 +761,7 @@ void btl_state_update_begin_player_turn(void) {
battleStatus->waterBlockEffect = NULL;
sfx_play_sound(SOUND_299);
btl_show_battle_message(BTL_MSG_27, 60);
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_OUTTA_SIGHT;
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_WATER_BLOCK;
} else {
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_CLOUD_NINE;
}
@ -770,7 +770,7 @@ void btl_state_update_begin_player_turn(void) {
}
}
break;
case BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_OUTTA_SIGHT:
case BTL_SUBSTATE_BEGIN_PLAYER_TURN_AWAIT_WATER_BLOCK:
if (!btl_is_popup_displayed()) {
gBattleSubState = BTL_SUBSTATE_BEGIN_PLAYER_TURN_CHECK_CLOUD_NINE;
}
@ -1502,7 +1502,7 @@ void btl_state_update_9(void) {
}
}
void func_80243910(void) {
void btl_state_draw_9(void) {
}
void btl_state_update_prepare_menu(void) {
@ -1902,7 +1902,7 @@ void btl_state_update_victory(void) {
currentEncounter->battleOutcome = OUTCOME_PLAYER_WON;
}
if (gBattleStatus.flags1 & BS_FLAGS1_DISABLE_CELEBRATION) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_2000000)) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_DONT_STOP_MUSIC)) {
bgm_set_song(0, -1, 0, 1500, 8);
}
btl_set_state(BATTLE_STATE_END_BATTLE);
@ -2019,7 +2019,7 @@ void btl_state_update_end_training_battle(void) {
playerData->trainingsDone++;
}
encounterStatus->battleOutcome = OUTCOME_ENEMY_FLED;
if (!(gBattleStatus.flags2 & BS_FLAGS2_2000000)) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_DONT_STOP_MUSIC)) {
bgm_set_song(0, -1, 0, 1500, 8);
}
btl_set_state(BATTLE_STATE_END_BATTLE);
@ -2064,7 +2064,7 @@ void btl_state_update_end_battle(void) {
break;
case BTL_SUBSTATE_END_BATTLE_UNK_2:
D_80280A30 = 255;
gBattleStatus.flags1 &= ~BS_FLAGS1_1;
gBattleStatus.flags1 &= ~BS_FLAGS1_ACTORS_VISIBLE;
if (D_800DC064 == NULL) {
stage = blah->stage;
} else {
@ -2106,7 +2106,7 @@ void btl_state_update_end_battle(void) {
encounterStatus->damageTaken = battleStatus->damageTaken;
if (gBattleStatus.flags2 & BS_FLAGS2_10000000) {
if (gBattleStatus.flags2 & BS_FLAGS2_DROP_WHACKA_BUMP) {
encounterStatus->dropWhackaBump = TRUE;
}
@ -2296,7 +2296,7 @@ void btl_state_update_run_away(void) {
if (gBattleSubState == BTL_SUBSTATE_RUN_AWAY_UNK_B) {
playerData->battlesFled++;
if (!(gBattleStatus.flags2 & BS_FLAGS2_2000000)) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_DONT_STOP_MUSIC)) {
bgm_set_song(0, -1, 0, 1500, 8);
}
btl_set_state(BATTLE_STATE_END_BATTLE);
@ -2404,7 +2404,7 @@ void btl_state_update_defeat(void) {
if (gBattleSubState == BTL_SUBSTATE_DEFEAT_UNK_A) {
currentEncounter->battleOutcome = OUTCOME_PLAYER_LOST;
if (!(gBattleStatus.flags2 & BS_FLAGS2_2000000)) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_DONT_STOP_MUSIC)) {
bgm_set_song(0, -1, 0, 1500, 8);
}
btl_set_state(BATTLE_STATE_END_BATTLE);
@ -2571,7 +2571,7 @@ void btl_state_update_player_move(void) {
battleStatus->unk_8C = 0;
battleStatus->lastAttackDamage = 0;
battleStatus->unk_19A = 0;
gBattleStatus.flags1 &= ~BS_FLAGS1_1000;
gBattleStatus.flags1 &= ~BS_FLAGS1_AUTO_SUCCEED_ACTION;
gBattleStatus.flags1 &= ~BS_FLAGS1_2;
reset_actor_turn_info();
player->flags &= ~ACTOR_FLAG_8000000;
@ -2599,7 +2599,7 @@ void btl_state_update_player_move(void) {
}
}
if (battleStatus->moveCategory == 0 || battleStatus->moveCategory == 1) {
if (battleStatus->moveCategory == BTL_MENU_TYPE_JUMP || battleStatus->moveCategory == BTL_MENU_TYPE_SMASH) {
if (battleStatus->nextMerleeSpellType == MERLEE_SPELL_1) {
battleStatus->merleeAttackBoost = 3;
battleStatus->nextMerleeSpellType = MERLEE_SPELL_0;
@ -2744,7 +2744,7 @@ void btl_state_update_player_move(void) {
return;
}
if (battleStatus->moveCategory == 1) {
if (battleStatus->moveCategory == BTL_MENU_TYPE_SMASH) {
if ((battleStatus->selectedMoveID != MOVE_SMASH_CHARGE0) &&
(battleStatus->selectedMoveID != MOVE_SMASH_CHARGE) &&
(battleStatus->selectedMoveID != MOVE_SUPER_SMASH_CHARGE))
@ -2752,7 +2752,7 @@ void btl_state_update_player_move(void) {
gBattleStatus.flags1 &= ~BS_FLAGS1_HAMMER_CHARGED;
}
}
if (battleStatus->moveCategory == 0) {
if (battleStatus->moveCategory == BTL_MENU_TYPE_JUMP) {
if ((battleStatus->selectedMoveID != MOVE_JUMP_CHARGE0) &&
(battleStatus->selectedMoveID != MOVE_JUMP_CHARGE) &&
(battleStatus->selectedMoveID != MOVE_SUPER_JUMP_CHARGE))
@ -2926,10 +2926,10 @@ void btl_state_update_end_player_turn(void) {
Evt* script;
if (gBattleSubState == BTL_SUBSTATE_END_PLAYER_TURN_UNK_0) {
if (battleStatus->moveCategory == 2 && battleStatus->itemUsesLeft >= 2) {
if (battleStatus->moveCategory == BTL_MENU_TYPE_ITEM && battleStatus->itemUsesLeft >= 2) {
gBattleSubState = BTL_SUBSTATE_END_PLAYER_TURN_UNK_5;
} else if (
!(gBattleStatus.flags2 & BS_FLAGS2_4000000) &&
!(gBattleStatus.flags2 & BS_FLAGS2_HAS_DRAINED_HP) &&
!is_ability_active(ABILITY_HAPPY_HEART) &&
!is_ability_active(ABILITY_CRAZY_HEART) &&
!is_ability_active(ABILITY_HAPPY_FLOWER))
@ -2942,7 +2942,7 @@ void btl_state_update_end_player_turn(void) {
s32 hpRecovery = 0;
s32 fpRecovery = 0;
if (gBattleStatus.flags2 & BS_FLAGS2_4000000) {
if (gBattleStatus.flags2 & BS_FLAGS2_HAS_DRAINED_HP) {
prevHPDrainCount = battleStatus->hpDrainCount;
battleStatus->hpDrainCount = 0;
}
@ -2965,7 +2965,7 @@ void btl_state_update_end_player_turn(void) {
player->takeTurnScript = script;
player->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PLAYER;
if (gBattleStatus.flags2 & BS_FLAGS2_4000000) {
if (gBattleStatus.flags2 & BS_FLAGS2_HAS_DRAINED_HP) {
script->varTable[10] += battleStatus->hpDrainCount;
battleStatus->hpDrainCount = 0;
}
@ -2983,7 +2983,7 @@ void btl_state_update_end_player_turn(void) {
script->varTable[12] = 99;
}
gBattleStatus.flags2 &= ~BS_FLAGS2_4000000;
gBattleStatus.flags2 &= ~BS_FLAGS2_HAS_DRAINED_HP;
gBattleSubState = BTL_SUBSTATE_END_PLAYER_TURN_UNK_5;
}
}
@ -3037,7 +3037,7 @@ void btl_state_update_end_player_turn(void) {
if (gBattleSubState == BTL_SUBSTATE_END_PLAYER_TURN_UNK_A) {
if(!btl_check_enemies_defeated()) {
if (battleStatus->moveCategory == 2 && battleStatus->itemUsesLeft >= 2) {
if (battleStatus->moveCategory == BTL_MENU_TYPE_ITEM && battleStatus->itemUsesLeft >= 2) {
btl_cam_use_preset(BTL_CAM_PRESET_C);
btl_cam_move(10);
gBattleStatus.flags2 &= ~BS_FLAGS2_2;
@ -3087,7 +3087,7 @@ void btl_state_update_end_player_turn(void) {
gBattleStatus.flags2 &= ~BS_FLAGS2_2;
btl_set_state(BATTLE_STATE_PREPARE_MENU);
} else {
gBattleStatus.flags1 &= ~BS_FLAGS2_4000000;
gBattleStatus.flags1 &= ~BS_FLAGS2_HAS_DRAINED_HP;
if (!(gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE)) {
btl_set_state(BATTLE_STATE_BEGIN_PARTNER_TURN);
} else {
@ -3122,14 +3122,14 @@ void btl_state_update_partner_move(void) {
battleStatus->unk_86 = 127;
battleStatus->blockResult = 127;
battleStatus->unk_19A = 0;
gBattleStatus.flags1 &= ~BS_FLAGS1_1000;
gBattleStatus.flags1 &= ~BS_FLAGS1_AUTO_SUCCEED_ACTION;
gBattleStatus.flags1 &= ~BS_FLAGS1_2;
reset_actor_turn_info();
partner->status = 0;
partner->flags &= ~ACTOR_FLAG_8000000;
player->flags &= ~ACTOR_FLAG_8000000;
deduct_current_move_fp();
btl_cam_target_actor(0x100);
btl_cam_target_actor(ACTOR_PARTNER);
gBattleStatus.flags2 |= BS_FLAGS2_10;
gBattleStatus.flags1 &= ~BS_FLAGS1_200000;
@ -3214,7 +3214,7 @@ void btl_state_update_partner_move(void) {
break;
}
decrement_status_menu_disabled();
if (playerData->currentPartner == PARTNER_GOOMBARIO && battleStatus->moveCategory == 5
if (playerData->currentPartner == PARTNER_GOOMBARIO && battleStatus->moveCategory == BTL_MENU_TYPE_5
&& battleStatus->selectedMoveID != MOVE_CHARGE) {
partner->isGlowing = 0;
gBattleStatus.flags1 &= ~BS_FLAGS1_40000000;
@ -3460,7 +3460,7 @@ void btl_state_update_next_enemy(void) {
battleStatus->unk_8C = 0;
gBattleStatus.flags1 &= ~BS_FLAGS1_2;
gBattleStatus.flags1 &= ~BS_FLAGS1_ENEMY_FLED;
gBattleStatus.flags1 &= ~BS_FLAGS1_1000;
gBattleStatus.flags1 &= ~BS_FLAGS1_AUTO_SUCCEED_ACTION;
gBattleStatus.flags1 &= ~BS_FLAGS1_80000;
player->flags &= ~ACTOR_FLAG_8000000;
@ -3744,11 +3744,11 @@ void btl_state_update_first_strike(void) {
Actor* partner = gBattleStatus.partnerActor;
Evt* script;
Actor* enemy;
s32 enemyScriptRunning;
s32 enemyNotDone;
s32 i;
switch (gBattleSubState) {
case BTL_SUBSTATE_FIRST_STRIKE_UNK_0:
case BTL_SUBSTATE_FIRST_STRIKE_INIT:
D_8029F254 = 0;
btl_merlee_on_first_strike();
if (playerData->playerFirstStrikes < 9999) {
@ -3770,15 +3770,16 @@ void btl_state_update_first_strike(void) {
}
}
// setup dummy 'menu selection' for player move
switch (encounterStatus->hitType) {
case ENCOUNTER_TRIGGER_JUMP:
battleStatus->moveCategory = 0;
battleStatus->moveCategory = BTL_MENU_TYPE_JUMP;
battleStatus->selectedMoveID = MOVE_UNUSED_JUMP4;
battleStatus->selectedItemID = encounterStatus->hitTier;
battleStatus->currentTargetListFlags = gMoveTable[MOVE_UNUSED_JUMP4].flags;
break;
case ENCOUNTER_TRIGGER_HAMMER:
battleStatus->moveCategory = 1;
battleStatus->moveCategory = BTL_MENU_TYPE_SMASH;
battleStatus->selectedMoveID = MOVE_UNUSED_HAMMER4;
battleStatus->selectedItemID = encounterStatus->hitTier;
battleStatus->currentTargetListFlags = gMoveTable[MOVE_UNUSED_HAMMER4].flags;
@ -3787,7 +3788,7 @@ void btl_state_update_first_strike(void) {
btl_set_state(BATTLE_STATE_PARTNER_FIRST_STRIKE);
return;
}
// let the enemy know a first strike is coming
enemy = get_actor(ACTOR_ENEMY0);
if (enemy->handleEventSource != NULL) {
enemy->lastEventType = EVENT_BEGIN_FIRST_STRIKE;
@ -3796,9 +3797,9 @@ void btl_state_update_first_strike(void) {
enemy->handleEventScriptID = script->id;
script->owner1.actorID = enemy->actorID;
}
gBattleSubState = BTL_SUBSTATE_FIRST_STRIKE_UNK_1;
gBattleSubState = BTL_SUBSTATE_FIRST_STRIKE_AWAIT_ENEMY_READY;
break;
case BTL_SUBSTATE_FIRST_STRIKE_UNK_1:
case BTL_SUBSTATE_FIRST_STRIKE_AWAIT_ENEMY_READY:
enemy = get_actor(ACTOR_ENEMY0);
if (enemy->handleEventSource != NULL) {
if (does_script_exist(enemy->handleEventScriptID)) {
@ -3819,21 +3820,23 @@ void btl_state_update_first_strike(void) {
btl_cam_use_preset(BTL_CAM_PRESET_10);
btl_cam_target_actor(0);
reset_actor_turn_info();
// begin the partner turn script
battleStatus->battlePhase = PHASE_FIRST_STRIKE;
script = start_script(&PlayerScriptDispatcher, EVT_PRIORITY_A, 0);
player->takeTurnScript = script;
D_8029F248 = 3;
gBattleSubState = BTL_SUBSTATE_FIRST_STRIKE_UNK_2;
player->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PLAYER;
D_8029F248 = 3;
gBattleSubState = BTL_SUBSTATE_FIRST_STRIKE_AWAIT_SCRIPTS;
break;
case BTL_SUBSTATE_FIRST_STRIKE_UNK_2:
case BTL_SUBSTATE_FIRST_STRIKE_AWAIT_SCRIPTS:
if (D_8029F248 != 0) {
D_8029F248--;
} else {
D_8029F254 = 1;
}
// wait for player move script
if (!(gBattleStatus.flags1 & BS_FLAGS1_200000)) {
if (player->takeTurnScript != NULL && does_script_exist(player->takeTurnScriptID)) {
break;
@ -3842,8 +3845,14 @@ void btl_state_update_first_strike(void) {
}
gBattleStatus.flags1 &= ~BS_FLAGS1_100;
if (player->handleEventScript == NULL || !does_script_exist(player->handleEventScriptID)) {
// wait for player handle event script
if (player->handleEventScript != NULL && does_script_exist(player->handleEventScriptID)) {
break;
}
player->handleEventScript = NULL;
// wait for partner handle event script
if (partner != NULL) {
if (partner->handleEventScript != NULL && does_script_exist(partner->handleEventScriptID)) {
break;
@ -3851,32 +3860,35 @@ void btl_state_update_first_strike(void) {
partner->handleEventScript = NULL;
}
enemyScriptRunning = FALSE;
// wait for all enemy turn scripts
enemyNotDone = FALSE;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
enemy = battleStatus->enemyActors[i];
if (enemy != NULL && enemy->takeTurnScript != NULL) {
if (does_script_exist(enemy->takeTurnScriptID)) {
enemyScriptRunning = TRUE;
enemyNotDone = TRUE;
} else {
enemy->takeTurnScript = NULL;
}
}
}
if (enemyScriptRunning) {
if (enemyNotDone) {
break;
}
// wait for all enemy handle event scripts
enemyNotDone = FALSE;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
enemy = battleStatus->enemyActors[i];
if (enemy != NULL && enemy->handleEventScript != NULL) {
if (does_script_exist(enemy->handleEventScriptID)) {
enemyScriptRunning = TRUE;
enemyNotDone = TRUE;
} else {
enemy->handleEventScript = NULL;
}
}
}
if (enemyScriptRunning) {
if (enemyNotDone) {
break;
}
@ -3906,26 +3918,25 @@ void btl_state_update_first_strike(void) {
script->owner1.actorID = target->actorID;
}
}
gBattleSubState = BTL_SUBSTATE_FIRST_STRIKE_UNK_3;
gBattleSubState = BTL_SUBSTATE_FIRST_STRIKE_AWAIT_ENEMY_DONE;
} else {
btl_set_state(BATTLE_STATE_END_DEMO_BATTLE);
}
}
}
break;
case BTL_SUBSTATE_FIRST_STRIKE_UNK_3:
enemyScriptRunning = FALSE;
case BTL_SUBSTATE_FIRST_STRIKE_AWAIT_ENEMY_DONE:
enemyNotDone = FALSE;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
enemy = battleStatus->enemyActors[i];
if (enemy != NULL && enemy->handleEventScript != NULL) {
if (does_script_exist(enemy->handleEventScriptID)) {
enemyScriptRunning = TRUE;
enemyNotDone = TRUE;
} else {
enemy->handleEventScript = NULL;
}
}
}
if (enemyScriptRunning) {
if (enemyNotDone) {
break;
}
if (player->takeTurnScript == NULL || !does_script_exist(player->takeTurnScriptID)) {
@ -3961,30 +3972,32 @@ void btl_state_update_partner_striking_first(void) {
Actor* player = battleStatus->playerActor;
Actor* partner = battleStatus->partnerActor;
Actor* actor;
s32 found;
s32 enemyNotDone;
SelectableTarget* target;
Evt* script;
s32 level;
s32 i;
switch (gBattleSubState) {
case BTL_SUBSTATE_PARTNER_FIRST_STRIKE_UNK_0:
case BTL_SUBSTATE_PARTNER_FIRST_STRIKE_INIT:
D_8029F254 = 0;
// setup dummy 'menu selection' for partner move
level = partner->actorBlueprint->level;
switch (playerData->currentPartner) {
case PARTNER_KOOPER:
battleStatus->moveCategory = 5;
battleStatus->moveCategory = BTL_MENU_TYPE_5;
battleStatus->selectedItemID = ITEM_NONE;
battleStatus->selectedMoveID = level + MOVE_SHELL_TOSS1;
battleStatus->currentTargetListFlags = gMoveTable[battleStatus->selectedMoveID].flags;
break;
case PARTNER_BOMBETTE:
battleStatus->moveCategory = 5;
battleStatus->moveCategory = BTL_MENU_TYPE_5;
battleStatus->selectedItemID = ITEM_NONE;
battleStatus->selectedMoveID = level + MOVE_BODY_SLAM1;
battleStatus->currentTargetListFlags = gMoveTable[battleStatus->selectedMoveID].flags;
break;
}
// let the enemy know a first strike is coming
actor = get_actor(ACTOR_ENEMY0);
if (actor->handleEventSource != NULL) {
actor->lastEventType = EVENT_BEGIN_FIRST_STRIKE;
@ -3993,9 +4006,9 @@ void btl_state_update_partner_striking_first(void) {
actor->handleEventScriptID = script->id;
script->owner1.actorID = actor->actorID;
}
gBattleSubState = BTL_SUBSTATE_PARTNER_FIRST_STRIKE_UNK_1;
gBattleSubState = BTL_SUBSTATE_PARTNER_FIRST_STRIKE_AWAIT_ENEMY_READY;
break;
case BTL_SUBSTATE_PARTNER_FIRST_STRIKE_UNK_1:
case BTL_SUBSTATE_PARTNER_FIRST_STRIKE_AWAIT_ENEMY_READY:
player_create_target_list(partner);
target = &partner->targetData[partner->targetIndexList[0]];
partner->targetActorID = target->actorID;
@ -4010,53 +4023,69 @@ void btl_state_update_partner_striking_first(void) {
btl_cam_use_preset(BTL_CAM_PRESET_10);
btl_cam_target_actor(ACTOR_PARTNER);
reset_actor_turn_info();
// begin the partner turn script
battleStatus->battlePhase = PHASE_FIRST_STRIKE;
script = start_script(partner->takeTurnSource, EVT_PRIORITY_A, 0);
partner->takeTurnScript = script;
D_8029F248 = 3;
gBattleSubState = BTL_SUBSTATE_PARTNER_FIRST_STRIKE_UNK_2;
partner->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PARTNER;
D_8029F248 = 3;
gBattleSubState = BTL_SUBSTATE_PARTNER_FIRST_STRIKE_AWAIT_SCRIPTS;
break;
case BTL_SUBSTATE_PARTNER_FIRST_STRIKE_UNK_2:
case BTL_SUBSTATE_PARTNER_FIRST_STRIKE_AWAIT_SCRIPTS:
if (D_8029F248 != 0) {
D_8029F248--;
} else {
D_8029F254 = 1;
}
if (partner->takeTurnScript == NULL || !does_script_exist(partner->takeTurnScriptID)) {
// wait for partner move script
if (partner->takeTurnScript != NULL && does_script_exist(partner->takeTurnScriptID)) {
break;
}
partner->takeTurnScript = NULL;
if (partner->handleEventScript == NULL || !does_script_exist(partner->handleEventScriptID)) {
// wait for partner handle event script
if (partner->handleEventScript != NULL && does_script_exist(partner->handleEventScriptID)) {
break;
}
partner->handleEventScript = NULL;
if (player->handleEventScript == NULL || !does_script_exist(player->handleEventScriptID)) {
// wait for player handle event script
if (player->handleEventScript != NULL && does_script_exist(player->handleEventScriptID)) {
break;
}
player->handleEventScript = NULL;
found = FALSE;
// wait for all enemy turn scripts
enemyNotDone = FALSE;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL && actor->takeTurnScript != NULL) {
if (does_script_exist(actor->takeTurnScriptID)) {
found = TRUE;
enemyNotDone = TRUE;
} else {
actor->takeTurnScript = NULL;
}
}
}
if (enemyNotDone) {
break;
}
if (!found) {
// wait for all enemy handle event scripts
enemyNotDone = FALSE;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL && actor->handleEventScript != NULL) {
if (does_script_exist(actor->handleEventScriptID)) {
found = TRUE;
enemyNotDone = TRUE;
} else {
actor->handleEventScript = NULL;
}
}
}
if (enemyNotDone) {
break;
}
if (!found) {
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL) {
@ -4080,28 +4109,22 @@ void btl_state_update_partner_striking_first(void) {
script->owner1.actorID = actor->actorID;
}
}
gBattleSubState = BTL_SUBSTATE_PARTNER_FIRST_STRIKE_UNK_3;
}
}
}
}
}
gBattleSubState = BTL_SUBSTATE_PARTNER_FIRST_STRIKE_AWAIT_ENEMY_DONE;
}
break;
case BTL_SUBSTATE_PARTNER_FIRST_STRIKE_UNK_3:
found = FALSE;
case BTL_SUBSTATE_PARTNER_FIRST_STRIKE_AWAIT_ENEMY_DONE:
enemyNotDone = FALSE;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL && actor->handleEventScript != NULL) {
if (does_script_exist(actor->handleEventScriptID)) {
found = TRUE;
enemyNotDone = TRUE;
} else {
actor->handleEventScript = NULL;
}
}
}
if (!found) {
if (!enemyNotDone) {
btl_set_state(BATTLE_STATE_BEGIN_TURN);
}
break;
@ -4140,7 +4163,7 @@ void btl_state_update_enemy_striking_first(void) {
s32 j;
switch (gBattleSubState) {
case BTL_SUBSTATE_ENEMY_FIRST_STRIKE_UNK_0:
case BTL_SUBSTATE_ENEMY_FIRST_STRIKE_INIT:
battleStatus->unk_8C = 0;
battleStatus->lastAttackDamage = 0;
battleStatus->unk_19A = 0;
@ -4151,7 +4174,8 @@ void btl_state_update_enemy_striking_first(void) {
if (partner != NULL) {
partner->flags &= ~ACTOR_FLAG_8000000;
}
battleStatus->flags2 |= BS_FLAGS2_1000000 | BS_FLAGS2_4000;
battleStatus->flags2 |= BS_FLAGS2_1000000;
battleStatus->flags2 |= BS_FLAGS2_4000;
count = 0;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
@ -4211,10 +4235,10 @@ void btl_state_update_enemy_striking_first(void) {
actor->takeTurnScript = script;
D_8029F248 = 3;
actor->takeTurnScriptID = script->id;
gBattleSubState = BTL_SUBSTATE_ENEMY_FIRST_STRIKE_UNK_2;
gBattleSubState = BTL_SUBSTATE_ENEMY_FIRST_STRIKE_AWAIT_SCRIPTS;
script->owner1.actorID = battleStatus->activeEnemyActorID;
break;
case BTL_SUBSTATE_ENEMY_FIRST_STRIKE_UNK_2:
case BTL_SUBSTATE_ENEMY_FIRST_STRIKE_AWAIT_SCRIPTS:
if (D_8029F248 != 0) {
D_8029F248--;
} else {
@ -4335,7 +4359,7 @@ void btl_state_update_end_demo_battle(void) {
break;
case BTL_SUBSTATE_END_DEMO_BATTLE_UNK_2:
D_80280A30 = 255;
gBattleStatus.flags1 &= ~BS_FLAGS1_1;
gBattleStatus.flags1 &= ~BS_FLAGS1_ACTORS_VISIBLE;
if (D_800DC064 == NULL) {
stage = blah->stage;
} else {

View File

@ -101,7 +101,7 @@ extern HudScript HES_Item_SmallStarPoint;
extern HudScript HES_Item_StarPoint;
extern HudScript HES_StatusSPShine;
void func_8023ED5C(void);
void btl_render_actors(void);
void tattle_cam_pre_render(Camera*);
void func_8023FF84(Camera*);
void btl_draw_enemy_health_bars(void);
@ -197,7 +197,7 @@ void initialize_battle(void) {
gBattleStatus.flags2 &= ~BS_FLAGS2_PEACH_BATTLE;
}
create_worker_world(NULL, func_8023ED5C);
create_worker_world(NULL, btl_render_actors);
btl_popup_messages_init();
func_80268E88();
set_windows_visible(WINDOW_GROUP_1);
@ -239,7 +239,7 @@ void func_8023E3FC(void) {
}
void update_actor_shadows(void) {
if (gBattleStatus.flags1 & BS_FLAGS1_1) {
if (gBattleStatus.flags1 & BS_FLAGS1_ACTORS_VISIBLE) {
update_enemy_shadows();
update_hero_shadows();
}
@ -514,7 +514,7 @@ void btl_draw_ui(void) {
btl_state_draw_begin_partner_turn();
break;
case BATTLE_STATE_9:
func_80243910();
btl_state_draw_9();
break;
case BATTLE_STATE_BEGIN_TURN:
btl_state_draw_begin_turn();
@ -612,7 +612,7 @@ void btl_draw_ui(void) {
draw_status_ui();
}
void func_8023ED5C(void) {
void btl_render_actors(void) {
BattleStatus* battleStatus = &gBattleStatus;
RenderTask renderTask;
RenderTask* renderTaskPtr = &renderTask;
@ -624,7 +624,7 @@ void func_8023ED5C(void) {
if (battleStatus->initBattleCallback != NULL) {
battleStatus->initBattleCallback();
}
if (battleStatus->flags1 & BS_FLAGS1_1) {
if (battleStatus->flags1 & BS_FLAGS1_ACTORS_VISIBLE) {
func_80255FD8();
if (gCurrentCamID == CAM_BATTLE || gCurrentCamID == CAM_TATTLE) {
@ -855,7 +855,7 @@ void btl_draw_enemy_health_bars(void) {
BattleStatus* battleStatus = &gBattleStatus;
if (gGameStatusPtr->unk_7C != 0) {
if (gBattleStatus.flags1 & BS_FLAGS1_1) {
if (gBattleStatus.flags1 & BS_FLAGS1_ACTORS_VISIBLE) {
s32 i;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
@ -943,7 +943,7 @@ void btl_update_starpoints_display(void) {
s32 cond;
s32 i;
if (gBattleStatus.flags1 & BS_FLAGS1_1) {
if (gBattleStatus.flags1 & BS_FLAGS1_ACTORS_VISIBLE) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_1)) {
D_8029DA40 = 292;
D_8029DA44 = 196;
@ -1035,7 +1035,7 @@ void btl_update_starpoints_display(void) {
posX = D_8029DA40;
posY = D_8029DA44 + (one * 14.0f);
if (gBattleStatus.flags2 & 1) {
if (gBattleStatus.flags2 & BS_FLAGS2_1) {
if (ones != 0) {
draw_box(0, WINDOW_STYLE_4, posX - 100, posY - 5, 0, 110, 12, 120, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL,
NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
@ -1096,7 +1096,7 @@ void btl_restore_world_cameras(void) {
gOverrideFlags &= ~GLOBAL_OVERRIDES_80;
}
if (gBattleStatus.flags2 & 0x40) {
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
playerData->currentPartner = bSavedPartner;
}
}

View File

@ -2427,6 +2427,7 @@ s32 bMessages[] = {
[BTL_MSG_1E] MSG_Menus_DefenseUp,
[BTL_MSG_1F] MSG_Menus_0084,
[BTL_MSG_20] MSG_Menus_0085,
[BTL_MSG_21] MSG_Menus_EnemyTransparent,
[BTL_MSG_22] MSG_Menus_EnemyElectricCharge,
[BTL_MSG_23] MSG_Menus_PartnerInjured,
@ -2440,45 +2441,51 @@ s32 bMessages[] = {
[BTL_MSG_2B] MSG_Menus_TurboChargeEnd,
[BTL_MSG_2C] MSG_Menus_ChillOutBegin,
[BTL_MSG_2D] MSG_Menus_CloudNineBegin,
[BTL_MSG_2E] MSG_Menus_00AF,
[BTL_MSG_2F] MSG_Menus_00B0,
[BTL_MSG_30] MSG_Menus_00B1,
[BTL_MSG_31] MSG_Menus_00B2,
[BTL_MSG_32] MSG_Menus_00B3,
[BTL_MSG_33] MSG_Menus_00B4,
[BTL_MSG_34] MSG_Menus_00AF,
[BTL_MSG_35] MSG_Menus_00AF,
[BTL_MSG_36] MSG_Menus_00B5,
[BTL_MSG_37] MSG_Menus_00B6,
[BTL_MSG_38] MSG_Menus_00B7,
[BTL_MSG_39] MSG_Menus_00B8,
[BTL_MSG_3A] MSG_Menus_00B9,
[BTL_MSG_3B] MSG_Menus_00AF,
[BTL_MSG_3C] MSG_Menus_00BA,
[BTL_MSG_3D] MSG_Menus_00BB,
[BTL_MSG_3E] MSG_Menus_00BC,
[BTL_MSG_3F] MSG_Menus_00AF,
[BTL_MSG_40] MSG_Menus_00BD,
[BTL_MSG_41] MSG_Menus_00BE,
[BTL_MSG_42] MSG_Menus_00BF,
// move action command tips
[BTL_MSG_2E] MSG_Menus_MoveTip_PressBeforeLanding,
[BTL_MSG_2F] MSG_Menus_MoveTip_PushLeftWithTiming,
[BTL_MSG_30] MSG_Menus_MoveTip_PressBeforeStriking,
[BTL_MSG_31] MSG_Menus_MoveTip_PressRepeatedly,
[BTL_MSG_32] MSG_Menus_MoveTip_PushLeftRepeatedly,
[BTL_MSG_33] MSG_Menus_MoveTip_PushLeftToAim,
[BTL_MSG_34] MSG_Menus_MoveTip_PressBeforeLanding,
[BTL_MSG_35] MSG_Menus_MoveTip_PressBeforeLanding,
[BTL_MSG_36] MSG_Menus_MoveTip_PressAsShown,
[BTL_MSG_37] MSG_Menus_MoveTip_NOT_USED_1,
[BTL_MSG_38] MSG_Menus_MoveTip_PressAsLightsUp,
[BTL_MSG_39] MSG_Menus_MoveTip_NOT_USED_2,
[BTL_MSG_3A] MSG_Menus_MoveTip_PressBothRepeatedly,
[BTL_MSG_3B] MSG_Menus_MoveTip_PressBeforeLanding,
[BTL_MSG_3C] MSG_Menus_MoveTip_HoldThenTap,
[BTL_MSG_3D] MSG_Menus_MoveTip_HoldThenRelease,
[BTL_MSG_3E] MSG_Menus_MoveTip_MoveToAim,
[BTL_MSG_3F] MSG_Menus_MoveTip_PressBeforeLanding,
[BTL_MSG_40] MSG_Menus_MoveTip_PressToRunAway,
[BTL_MSG_41] MSG_Menus_MoveTip_PressToReduceDamage,
[BTL_MSG_42] MSG_Menus_MoveTip_NOT_USED_3,
// no targets available
[BTL_MSG_43] MSG_Menus_Battle_NoTarget_Jump,
[BTL_MSG_44] MSG_Menus_Battle_NoTarget_Hammer,
[BTL_MSG_45] MSG_Menus_Battle_NoTarget_Item,
[BTL_MSG_46] 0,
[BTL_MSG_47] 0,
[BTL_MSG_48] MSG_Menus_00C3,
[BTL_MSG_49] MSG_Menus_00C6,
[BTL_MSG_4A] MSG_Menus_00C6,
[BTL_MSG_4B] MSG_Menus_00C6,
[BTL_MSG_4C] MSG_Menus_00C7,
[BTL_MSG_4D] MSG_Menus_00C7,
[BTL_MSG_4E] MSG_Menus_00C7,
[BTL_MSG_4F] MSG_Menus_00C8,
[BTL_MSG_50] MSG_Menus_CantSwitch,
[BTL_MSG_51] MSG_Menus_00CA,
[BTL_MSG_52] MSG_Menus_CantSwitch,
[BTL_MSG_53] MSG_Menus_00CA,
[BTL_MSG_54] MSG_Menus_00C3,
// errors and warnings
[BTL_MSG_48] MSG_Menus_Battle_CantSelectNow,
[BTL_MSG_49] MSG_Menus_Battle_CantUseHammer,
[BTL_MSG_4A] MSG_Menus_Battle_CantUseHammer,
[BTL_MSG_4B] MSG_Menus_Battle_CantUseHammer,
[BTL_MSG_4C] MSG_Menus_Battle_CantUseJump,
[BTL_MSG_4D] MSG_Menus_Battle_CantUseJump,
[BTL_MSG_4E] MSG_Menus_Battle_CantUseJump,
[BTL_MSG_4F] MSG_Menus_Battle_CantUseItems,
[BTL_MSG_50] MSG_Menus_Battle_CantSwitch,
[BTL_MSG_51] MSG_Menus_Battle_CantMove,
[BTL_MSG_52] MSG_Menus_Battle_CantSwitch,
[BTL_MSG_53] MSG_Menus_Battle_CantMove,
[BTL_MSG_54] MSG_Menus_Battle_CantSelectNow,
};
s32 bActorMessages[] = {
@ -3147,6 +3154,7 @@ void btl_update_message_popup(void* data) {
break;
}
break;
// move action command tips
case BTL_MSG_2E:
case BTL_MSG_2F:
case BTL_MSG_30:

View File

@ -155,11 +155,11 @@ s32 calc_item_damage_enemy(void) {
target->hpChangeCounter = 0;
ret = 2;
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
dispatchEvent = EVENT_UNKNOWN_TRIGGER;
dispatchEvent = EVENT_SCRIPTED_IMMUNE;
sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
battleStatus->lastAttackDamage = 0;
} else {
dispatchEvent = EVENT_UNKNOWN_TRIGGER;
dispatchEvent = EVENT_SCRIPTED_IMMUNE;
battleStatus->lastAttackDamage = 0;
}
} else {
@ -196,7 +196,7 @@ s32 calc_item_damage_enemy(void) {
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_HIT;
}
if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) {
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
dispatchEvent = EVENT_IMMUNE;
}
if (target->currentHP <= 0 && dispatchEvent == EVENT_IMMUNE) {
@ -354,7 +354,7 @@ s32 calc_item_damage_enemy(void) {
#undef INFLICT_STATUS
if (wasStatusInflicted) {
if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) {
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
dispatchEvent = EVENT_HIT_COMBO;
}
if (dispatchEvent == EVENT_IMMUNE) {
@ -380,7 +380,7 @@ s32 calc_item_damage_enemy(void) {
dispatchEvent = EVENT_SCARE_AWAY;
ret = 0;
sp1C = TRUE;
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE | BS_FLAGS1_10 | BS_FLAGS1_8 | BS_FLAGS1_1;
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE | BS_FLAGS1_10 | BS_FLAGS1_8 | BS_FLAGS1_ACTORS_VISIBLE;
sfx_play_sound_at_position(SOUND_231, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
wasStatusInflicted = TRUE;
gBattleStatus.flags1 |= BS_FLAGS1_40;

View File

@ -1058,7 +1058,7 @@ void btl_state_update_celebration(void) {
partner->takeTurnScriptID = script->id;
script->owner1.actorID = ACTOR_PARTNER;
}
if (!(gBattleStatus.flags2 & BS_FLAGS2_2000000)) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_DONT_STOP_MUSIC)) {
bgm_set_song(0, -1, 0, 2000, 8);
}
bFadeToBlackAmt = 0;
@ -1143,7 +1143,7 @@ void btl_state_update_celebration(void) {
CelebrateStateTime = 99;
}
if (CelebrateStateTime >= 99) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_2000000)) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_DONT_STOP_MUSIC)) {
bgm_set_song(0, -1, 0, 1500, 8);
}
bFadeToBlackAmt = 0;

View File

@ -991,7 +991,7 @@ EvtScript HandleEvent_Player = {
EVT_EXEC_WAIT(D_80298724)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_10002)
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_208C)
EVT_SET_CONST(LVar1, ANIM_Mario_10002)

View File

@ -85,20 +85,20 @@ s32 func_80263064(Actor* actor0, Actor* actor1, s32 unused) {
part = actor1->partsTable;
for (i = 0; i < numParts; i++) {
if (!(part->flags & 0x20000)) {
if (!(part->flags & 0x800000)) {
if (!(part->flags & ACTOR_PART_FLAG_NO_TARGET)) {
if (!(part->flags & ACTOR_PART_FLAG_MULTI_TARGET)) {
continue;
} else {
ActorPartBlueprint* bp = part->staticData;
f32 x, y, z;
if (!(part->flags & 0x100000)) {
if (!(part->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) {
x = actor1->currentPos.x;
y = actor1->currentPos.y;
z = actor1->currentPos.z;
x += part->partOffset.x;
if (!(actor1->flags & 0x800)) {
if (!(actor1->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) {
y += part->partOffset.y;
} else {
y -= part->partOffset.y;
@ -106,7 +106,7 @@ s32 func_80263064(Actor* actor0, Actor* actor1, s32 unused) {
z += part->partOffset.z;
x += part->targetOffset.x;
if (!(actor1->flags & 0x800)) {
if (!(actor1->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) {
y += part->targetOffset.y;
} else {
y -= part->targetOffset.y;
@ -117,7 +117,7 @@ s32 func_80263064(Actor* actor0, Actor* actor1, s32 unused) {
z = part->absolutePosition.z;
x += part->targetOffset.x;
if (!(actor1->flags & 0x800)) {
if (!(actor1->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) {
y += part->targetOffset.y;
} else {
y -= part->targetOffset.y;
@ -199,8 +199,8 @@ void func_80263300(void) {
if (itemID != 0) {
ItemData* itemData = &gItemTable[itemID];
if (itemData->typeFlags & 2) {
battleStatus->moveCategory = 2;
if (itemData->typeFlags & ITEM_TYPE_FLAG_BATTLE_USABLE) {
battleStatus->moveCategory = BTL_MENU_TYPE_ITEM;
battleStatus->selectedItemID = playerData->invItems[i];
battleStatus->currentTargetListFlags = itemData->targetFlags;
player_create_target_list(player);
@ -314,7 +314,7 @@ void btl_init_menu_boots(void) {
}
// See if there are any targets for this move
battleStatus->moveCategory = 0;
battleStatus->moveCategory = BTL_MENU_TYPE_JUMP;
battleStatus->selectedItemID = playerData->bootsLevel;
battleStatus->currentTargetListFlags = move->flags; // Controls target filters
player_create_target_list(player);
@ -408,7 +408,7 @@ void btl_init_menu_hammer(void) {
}
// See if there are any targets for this move
battleStatus->moveCategory = 1;
battleStatus->moveCategory = BTL_MENU_TYPE_SMASH;
battleStatus->selectedItemID = playerData->hammerLevel;
battleStatus->currentTargetListFlags = move->flags;
player_create_target_list(player);
@ -496,7 +496,7 @@ void btl_init_menu_partner(void) {
}
}
battleStatus->moveCategory = 5;
battleStatus->moveCategory = BTL_MENU_TYPE_5;
battleStatus->selectedItemID = partner->actorBlueprint->level;
battleStatus->currentTargetListFlags = move->flags;
player_create_target_list(partner);
@ -1494,8 +1494,8 @@ Actor* create_actor(Formation formation) {
ASSERT(part->movement != NULL);
}
if (actor->flags & 0x4000) {
part->flags |= 0x4000;
if (actor->flags & ACTOR_FLAG_TARGET_ONLY) {
part->flags |= ACTOR_PART_FLAG_4000;
}
part->animationRate = 1.0f;

View File

@ -276,9 +276,9 @@ s32 calc_player_damage_enemy(void) {
target->lastDamageTaken = 0;
if (gBattleStatus.flags1 & BS_FLAGS1_800) {
if (gBattleStatus.flags1 & BS_FLAGS1_FORCE_HIT_IMMUNE) {
retVal = 2;
dispatchEvent = EVENT_UNKNOWN_TRIGGER;
dispatchEvent = EVENT_SCRIPTED_IMMUNE;
} else {
if (player_team_is_ability_active(player, ABILITY_ICE_POWER)) {
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)) {
@ -461,7 +461,7 @@ s32 calc_player_damage_enemy(void) {
battleStatus->hpDrainCount += currentAttackDamage;
}
gBattleStatus.flags2 |= BS_FLAGS2_4000000;
gBattleStatus.flags2 |= BS_FLAGS2_HAS_DRAINED_HP;
if (battleStatus->hpDrainCount > 5) {
battleStatus->hpDrainCount = 5;
@ -476,7 +476,7 @@ s32 calc_player_damage_enemy(void) {
battleStatus->hpDrainCount += currentAttackDamage;
}
gBattleStatus.flags2 |= BS_FLAGS2_4000000;
gBattleStatus.flags2 |= BS_FLAGS2_HAS_DRAINED_HP;
if (battleStatus->hpDrainCount > 5) {
battleStatus->hpDrainCount = 5;
@ -560,10 +560,10 @@ s32 calc_player_damage_enemy(void) {
retVal = 2;
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
dispatchEvent = EVENT_UNKNOWN_TRIGGER;
dispatchEvent = EVENT_SCRIPTED_IMMUNE;
sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
dispatchEvent = (target->currentHP <= 0) ? EVENT_DEATH : EVENT_UNKNOWN_TRIGGER;
dispatchEvent = (target->currentHP <= 0) ? EVENT_DEATH : EVENT_SCRIPTED_IMMUNE;
}
battleStatus->lastAttackDamage = 0;
@ -592,7 +592,7 @@ s32 calc_player_damage_enemy(void) {
if (is_ability_active(ABILITY_ZAP_TAP) || player->staticStatus == STATUS_STATIC || (target->staticStatus != STATUS_STATIC &&
!(targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)) || battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT ||
battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_8 || battleStatus->currentAttackElement & DAMAGE_TYPE_ELECTRIC) {
dispatchEvent = (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) ? EVENT_UNKNOWN_TRIGGER : EVENT_IMMUNE;
dispatchEvent = (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) ? EVENT_SCRIPTED_IMMUNE : EVENT_IMMUNE;
sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, dispatchEvent);
func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
@ -625,7 +625,7 @@ s32 calc_player_damage_enemy(void) {
dispatchEvent = EVENT_HIT;
}
if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) {
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
dispatchEvent = EVENT_IMMUNE;
}
@ -653,7 +653,7 @@ s32 calc_player_damage_enemy(void) {
dispatchEvent = EVENT_SPIN_SMASH_HIT;
}
if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) {
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
dispatchEvent = EVENT_SPIN_SMASH_HIT;
}
@ -677,7 +677,7 @@ s32 calc_player_damage_enemy(void) {
dispatchEvent = EVENT_POWER_BOUNCE_HIT;
}
if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) {
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
dispatchEvent = EVENT_POWER_BOUNCE_HIT;
}
@ -730,7 +730,7 @@ s32 calc_player_damage_enemy(void) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) {
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
@ -789,7 +789,7 @@ s32 calc_player_damage_enemy(void) {
#undef INFLICT_STATUS
if (wasStatusInflicted) {
if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) {
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
dispatchEvent = EVENT_HIT_COMBO;
}
@ -998,7 +998,7 @@ s32 dispatch_damage_event_player(s32 damageAmount, s32 event, s32 arg2) {
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_HIT;
}
if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) {
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
dispatchEvent = EVENT_IMMUNE;
}
@ -1486,10 +1486,10 @@ ApiStatus PlayerDamageEnemy(Evt* script, s32 isInitialCall) {
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_80;
}
if (flags & BS_FLAGS1_800) {
gBattleStatus.flags1 |= BS_FLAGS1_800;
if (flags & BS_FLAGS1_FORCE_HIT_IMMUNE) {
gBattleStatus.flags1 |= BS_FLAGS1_FORCE_HIT_IMMUNE;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_800;
gBattleStatus.flags1 &= ~BS_FLAGS1_FORCE_HIT_IMMUNE;
}
target = get_actor(script->owner1.actorID);
@ -1557,10 +1557,10 @@ ApiStatus PlayerPowerBounceEnemy(Evt* script, s32 isInitialCall) {
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_80;
}
if (flags & BS_FLAGS1_800) {
gBattleStatus.flags1 |= BS_FLAGS1_800;
if (flags & BS_FLAGS1_FORCE_HIT_IMMUNE) {
gBattleStatus.flags1 |= BS_FLAGS1_FORCE_HIT_IMMUNE;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_800;
gBattleStatus.flags1 &= ~BS_FLAGS1_FORCE_HIT_IMMUNE;
}
target = get_actor(script->owner1.actorID);
@ -1628,10 +1628,10 @@ ApiStatus PlayerTestEnemy(Evt* script, s32 isInitialCall) {
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_80;
}
if (flags & BS_FLAGS1_800) {
gBattleStatus.flags1 |= BS_FLAGS1_800;
if (flags & BS_FLAGS1_FORCE_HIT_IMMUNE) {
gBattleStatus.flags1 |= BS_FLAGS1_FORCE_HIT_IMMUNE;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_800;
gBattleStatus.flags1 &= ~BS_FLAGS1_FORCE_HIT_IMMUNE;
}
target = get_actor(script->owner1.actorID);

View File

@ -458,10 +458,10 @@ s32 calc_enemy_damage_target(Actor* attacker) {
target->hpChangeCounter = 0;
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
hitResult = HIT_RESULT_QUAKE_IMMUNE;
event = EVENT_UNKNOWN_TRIGGER;
event = EVENT_SCRIPTED_IMMUNE;
} else {
hitResult = HIT_RESULT_QUAKE_IMMUNE;
event = EVENT_UNKNOWN_TRIGGER;
event = EVENT_SCRIPTED_IMMUNE;
if (target->currentHP <= 0) {
event = EVENT_DEATH;
}
@ -498,7 +498,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
if (event == EVENT_HIT_COMBO) {
event = EVENT_HIT;
}
if (event == EVENT_UNKNOWN_TRIGGER) {
if (event == EVENT_SCRIPTED_IMMUNE) {
event = EVENT_IMMUNE;
}
if (target->currentHP <= 0 && event == EVENT_IMMUNE) {
@ -531,7 +531,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
if (event == EVENT_HIT_COMBO) {
event = EVENT_FLIP_TRIGGER;
}
if (event == EVENT_UNKNOWN_TRIGGER) {
if (event == EVENT_SCRIPTED_IMMUNE) {
event = EVENT_FLIP_TRIGGER;
}
}
@ -557,7 +557,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
if (event == EVENT_HIT) {
event = EVENT_BLOCK;
}
if (event == EVENT_UNKNOWN_TRIGGER) {
if (event == EVENT_SCRIPTED_IMMUNE) {
event = EVENT_18;
}
if (event == EVENT_IMMUNE) {
@ -627,7 +627,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
}
if (statusInflicted) {
if (event == EVENT_UNKNOWN_TRIGGER) {
if (event == EVENT_SCRIPTED_IMMUNE) {
event = EVENT_HIT_COMBO;
}
if (event == EVENT_IMMUNE) {
@ -827,7 +827,7 @@ s32 dispatch_damage_event_actor(Actor* actor, s32 damageAmount, s32 originalEven
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_HIT;
}
if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) {
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
dispatchEvent = EVENT_IMMUNE;
}
}

View File

@ -190,9 +190,9 @@ s32 calc_partner_damage_enemy(void) {
target->lastDamageTaken = 0;
if (gBattleStatus.flags1 & BS_FLAGS1_800) {
if (gBattleStatus.flags1 & BS_FLAGS1_FORCE_HIT_IMMUNE) {
retVal = 2;
dispatchEvent = EVENT_UNKNOWN_TRIGGER;
dispatchEvent = EVENT_SCRIPTED_IMMUNE;
sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY || target->transparentStatus == STATUS_TRANSPARENT ||
@ -368,11 +368,11 @@ s32 calc_partner_damage_enemy(void) {
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
retVal = 2;
dispatchEvent = EVENT_UNKNOWN_TRIGGER;
dispatchEvent = EVENT_SCRIPTED_IMMUNE;
sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
retVal = 2;
dispatchEvent = (target->currentHP <= 0) ? EVENT_DEATH : EVENT_UNKNOWN_TRIGGER;
dispatchEvent = (target->currentHP <= 0) ? EVENT_DEATH : EVENT_SCRIPTED_IMMUNE;
}
battleStatus->lastAttackDamage = 0;
@ -401,7 +401,7 @@ s32 calc_partner_damage_enemy(void) {
if (partner->staticStatus == STATUS_STATIC || (target->staticStatus != STATUS_STATIC &&
!(targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)) || battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT ||
battleStatus->currentAttackEventSuppression & ATTACK_EVENT_FLAG_8) {
dispatchEvent = (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) ? EVENT_UNKNOWN_TRIGGER : EVENT_IMMUNE;
dispatchEvent = (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) ? EVENT_SCRIPTED_IMMUNE : EVENT_IMMUNE;
sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
dispatch_event_actor(target, dispatchEvent);
func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
@ -420,7 +420,7 @@ s32 calc_partner_damage_enemy(void) {
dispatchEvent = EVENT_HIT;
}
if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) {
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
dispatchEvent = EVENT_IMMUNE;
}
@ -457,7 +457,7 @@ s32 calc_partner_damage_enemy(void) {
dispatchEvent = EVENT_POWER_BOUNCE_HIT;
}
if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) {
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
dispatchEvent = EVENT_POWER_BOUNCE_HIT;
}
@ -508,7 +508,7 @@ s32 calc_partner_damage_enemy(void) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) {
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
@ -591,7 +591,7 @@ s32 calc_partner_damage_enemy(void) {
wasStatusInflicted = TRUE;
retVal = 0;
tempBinary = TRUE;
gBattleStatus.flags1 |= (BS_FLAGS1_40 | BS_FLAGS1_SP_EVT_ACTIVE | BS_FLAGS1_10 | BS_FLAGS1_8 | BS_FLAGS1_1);
gBattleStatus.flags1 |= (BS_FLAGS1_40 | BS_FLAGS1_SP_EVT_ACTIVE | BS_FLAGS1_10 | BS_FLAGS1_8 | BS_FLAGS1_ACTORS_VISIBLE);
sfx_play_sound_at_position(SOUND_231, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
dispatchEvent = EVENT_IMMUNE;
@ -604,7 +604,7 @@ s32 calc_partner_damage_enemy(void) {
}
if (wasStatusInflicted) {
if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) {
if (dispatchEvent == EVENT_SCRIPTED_IMMUNE) {
dispatchEvent = EVENT_HIT_COMBO;
}
@ -633,7 +633,7 @@ s32 calc_partner_damage_enemy(void) {
wasStatusInflicted = TRUE;
retVal = 0;
tempBinary = TRUE;
gBattleStatus.flags1 |= (BS_FLAGS1_40 | BS_FLAGS1_SP_EVT_ACTIVE | BS_FLAGS1_10 | BS_FLAGS1_8 | BS_FLAGS1_1);
gBattleStatus.flags1 |= (BS_FLAGS1_40 | BS_FLAGS1_SP_EVT_ACTIVE | BS_FLAGS1_10 | BS_FLAGS1_8 | BS_FLAGS1_ACTORS_VISIBLE);
sfx_play_sound_at_position(SOUND_231, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
dispatchEvent = EVENT_IMMUNE;
@ -987,10 +987,10 @@ ApiStatus PartnerDamageEnemy(Evt* script, s32 isInitialCall) {
gBattleStatus.flags1 &= ~BS_FLAGS1_80;
}
if (flags & BS_FLAGS1_800) {
gBattleStatus.flags1 |= BS_FLAGS1_800;
if (flags & BS_FLAGS1_FORCE_HIT_IMMUNE) {
gBattleStatus.flags1 |= BS_FLAGS1_FORCE_HIT_IMMUNE;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_800;
gBattleStatus.flags1 &= ~BS_FLAGS1_FORCE_HIT_IMMUNE;
}
statusChance = battleStatus->currentAttackStatus;
@ -1064,10 +1064,10 @@ ApiStatus PartnerAfflictEnemy(Evt* script, s32 isInitialCall) {
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_80;
}
if (flags & BS_FLAGS1_800) {
gBattleStatus.flags1 |= BS_FLAGS1_800;
if (flags & BS_FLAGS1_FORCE_HIT_IMMUNE) {
gBattleStatus.flags1 |= BS_FLAGS1_FORCE_HIT_IMMUNE;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_800;
gBattleStatus.flags1 &= ~BS_FLAGS1_FORCE_HIT_IMMUNE;
}
statusChance = battleStatus->currentAttackStatus;
@ -1140,10 +1140,10 @@ ApiStatus PartnerPowerBounceEnemy(Evt* script, s32 isInitialCall) {
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_80;
}
if (flags & BS_FLAGS1_800) {
gBattleStatus.flags1 |= BS_FLAGS1_800;
if (flags & BS_FLAGS1_FORCE_HIT_IMMUNE) {
gBattleStatus.flags1 |= BS_FLAGS1_FORCE_HIT_IMMUNE;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_800;
gBattleStatus.flags1 &= ~BS_FLAGS1_FORCE_HIT_IMMUNE;
}
statusChance = battleStatus->currentAttackStatus;
@ -1221,10 +1221,10 @@ ApiStatus PartnerTestEnemy(Evt* script, s32 isInitialCall) {
gBattleStatus.flags1 &= ~BS_FLAGS1_80;
}
if (flags & BS_FLAGS1_800) {
gBattleStatus.flags1 |= BS_FLAGS1_800;
if (flags & BS_FLAGS1_FORCE_HIT_IMMUNE) {
gBattleStatus.flags1 |= BS_FLAGS1_FORCE_HIT_IMMUNE;
} else {
gBattleStatus.flags1 &= ~BS_FLAGS1_800;
gBattleStatus.flags1 &= ~BS_FLAGS1_FORCE_HIT_IMMUNE;
}
statusChance = battleStatus->currentAttackStatus;

View File

@ -178,28 +178,66 @@ IconHudScriptPair battle_menu_DoNothingHudScripts = { &HES_MenuDoNothing, &HES_M
IconHudScriptPair battle_menu_FleeHudScripts = { &HES_MenuFlee, &HES_MenuFleeDisabled };
// Jump, Hammer, Items, RunAway, Defense
s32 battle_menu_leftJustfiedMessagesA[] = { MSG_Menus_0039, MSG_Menus_0038, MSG_Menus_003F, MSG_Menus_003B, MSG_Menus_0044 };
s32 battle_menu_leftJustfiedMessagesA[] = {
MSG_Menus_Jump,
MSG_Menus_Hammer,
MSG_Menus_Items,
MSG_Menus_RunAway,
MSG_Menus_Defense,
};
// Change Member, Abilities, Strategies, Star Spirits
s32 battle_menu_leftJustfiedMessagesB[] = { MSG_Menus_003E, MSG_Menus_0045, MSG_Menus_0043, MSG_Menus_003A };
s32 battle_menu_leftJustfiedMessagesB[] = {
MSG_Menus_ChangeMember,
MSG_Menus_Abilities,
MSG_Menus_Strategies,
MSG_Menus_StarSpirits,
};
// Do Nothing, Act Later, Focus
s32 battle_menu_leftJustfiedMessagesC[] = { MSG_Menus_003C, MSG_Menus_0046, MSG_Menus_0048 };
s32 battle_menu_leftJustfiedMessagesC[] = {
MSG_Menus_DoNothing,
MSG_Menus_ActLater,
MSG_Menus_Focus,
};
// Jump, Hammer
s32 battle_menu_centeredMessagesA[] = { MSG_Menus_004B, MSG_Menus_004A };
s32 battle_menu_centeredMessagesA[] = {
MSG_Menus_Jump_Centered,
MSG_Menus_Hammer_Centered,
};
// Items, RunAway, Defense, Change Member, Abilities
s32 battle_menu_centeredMessagesB[] = { MSG_Menus_0050, MSG_Menus_004D, MSG_Menus_0052, MSG_Menus_004F, MSG_Menus_0053 };
s32 battle_menu_centeredMessagesB[] = {
MSG_Menus_Items_Centered,
MSG_Menus_RunAway_Centered,
MSG_Menus_Defense_Centered,
MSG_Menus_ChangeMember_Centered,
MSG_Menus_Abilities_Centered,
};
// Strategies
s32 battle_menu_centeredMessagesC[] = { MSG_Menus_0051 };
s32 battle_menu_centeredMessagesC[] = {
MSG_Menus_Strategies_Centered,
};
// Star Spirits, Do Nothing, Act Later, Focus
s32 battle_menu_centeredMessagesD[] = { MSG_Menus_004C, MSG_Menus_004E, MSG_Menus_0056, MSG_Menus_0055 };
s32 battle_menu_centeredMessagesD[] = {
MSG_Menus_StarSpirits_Centered,
MSG_Menus_DoNothing_Centered,
MSG_Menus_ActLater_Centered,
MSG_Menus_Focus_Centered,
};
s32 D_802AB4F0[] = { 0x2, 0x1, 0x4, 0x6, 0x3, 0x5, 0x1A, 0x3, 0x34, 0x39, 0x31, 0x37 };
s32 D_802AB4F0[] = {
[BTL_MENU_TYPE_JUMP] MOVE_TYPE_JUMP,
[BTL_MENU_TYPE_SMASH] MOVE_TYPE_HAMMER,
[BTL_MENU_TYPE_ITEM] MOVE_TYPE_ITEMS,
[BTL_MENU_TYPE_3] MOVE_TYPE_6,
[BTL_MENU_TYPE_4] MOVE_TYPE_3,
[BTL_MENU_TYPE_5] MOVE_TYPE_TACTICS,
[BTL_MENU_TYPE_6] 0x1A,
[BTL_MENU_TYPE_7] MOVE_TYPE_3,
[BTL_MENU_TYPE_8] 0x34,
[BTL_MENU_TYPE_9] 0x39,
[BTL_MENU_TYPE_A] 0x31,
[BTL_MENU_TYPE_B] 0x37
};
AnimID battle_menu_partnerChooseMoveAnimations[] = {
[PARTNER_NONE] 0,
@ -237,30 +275,44 @@ AnimID D_802AB558[] = {
HudScript* battle_menu_PartnerMoveHudScripts[10][10] = {
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, },
{ &HES_Goombario, &HES_GoombarioDisabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled, },
{ &HES_Kooper, &HES_KooperDisabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled, },
{ &HES_Bombette, &HES_BombetteDisabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled, },
{ &HES_Parakarry, &HES_ParakarryDisabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled, },
{ &HES_Partner0, &HES_Partner0Disabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled, },
{ &HES_Watt, &HES_WattDisabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled, },
{ &HES_Sushie, &HES_SushieDisabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled, },
{ &HES_Lakilester, &HES_LakilesterDisabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled, },
{ &HES_Bow, &HES_BowDisabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled },
[PARTNER_GOOMBARIO] { &HES_Goombario, &HES_GoombarioDisabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled, },
[PARTNER_KOOPER] { &HES_Kooper, &HES_KooperDisabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled, },
[PARTNER_BOMBETTE] { &HES_Bombette, &HES_BombetteDisabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled, },
[PARTNER_PARAKARRY] { &HES_Parakarry, &HES_ParakarryDisabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled, },
[PARTNER_GOOMPA] { &HES_Partner0, &HES_Partner0Disabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled, },
[PARTNER_WATT] { &HES_Watt, &HES_WattDisabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled, },
[PARTNER_SUSHIE] { &HES_Sushie, &HES_SushieDisabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled, },
[PARTNER_LAKILESTER] { &HES_Lakilester, &HES_LakilesterDisabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled, },
[PARTNER_BOW] { &HES_Bow, &HES_BowDisabled, &HES_MoveDiamond, &HES_MoveDiamondDisabled, &HES_MoveBlueOrb, &HES_MoveBlueOrbDisabled, &HES_MoveGreenOrb, &HES_MoveGreenOrbDisabled, &HES_MoveRedOrb, &HES_MoveRedOrbDisabled },
};
IconHudScriptPair battle_menu_PeachStarPowerHudScripts = { &HES_MenuStarPower, &HES_MenuStarPowerDisabled };
// Focus
s32 D_802AB728[] = { MSG_Menus_0055 };
s32 D_802AB728[] = {
MSG_Menus_Focus_Centered,
};
HudScript* battle_menu_TwinkStarPowerHudScripts[] = { &HES_MenuStarPower, &HES_MenuStarPowerDisabled };
// Dash
s32 D_802AB734[] = { MSG_Menus_0057 };
s32 D_802AB734[] = {
MSG_Menus_Dash_Centered,
};
s32 D_802AB738[] = {
0x00000000, MSG_Menus_Party_Goombario, MSG_Menus_Party_Kooper, MSG_Menus_Party_Bombette, MSG_Menus_Party_Parakarry, MSG_Menus_Party_Goompa, MSG_Menus_Party_Watt, MSG_Menus_Party_Sushie, MSG_Menus_Party_Lakilester,
MSG_Menus_Party_Bow, MSG_Menus_Party_Goombaria, MSG_Menus_Party_Twink, MSG_Menus_Party_Peach, 0x00000000
0x00000000,
MSG_Menus_Party_Goombario,
MSG_Menus_Party_Kooper,
MSG_Menus_Party_Bombette,
MSG_Menus_Party_Parakarry,
MSG_Menus_Party_Goompa,
MSG_Menus_Party_Watt,
MSG_Menus_Party_Sushie,
MSG_Menus_Party_Lakilester,
MSG_Menus_Party_Bow,
MSG_Menus_Party_Goombaria,
MSG_Menus_Party_Twink,
MSG_Menus_Party_Peach,
0x00000000
};
BSS s32 D_802ACC60;
@ -1343,7 +1395,7 @@ s32 func_802A2C84(void) {
}
set_window_update(8, 2);
msgID = MSG_Menus_00C3;
msgID = MSG_Menus_Battle_CantSelectNow;
if (D_802AD258 == 0) {
if (!battle_menu_hasSpiritsMenu) {
msgID = MSG_Menus_NotEnoughFP;
@ -1880,13 +1932,13 @@ s32 func_802A4A54(void) {
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE);
switch (D_802AD610) {
case 0:
msgID = MSG_Menus_00CB;
msgID = MSG_Menus_Battle_CantSwitch2;
break;
case 1:
msgID = MSG_Menus_00CC;
msgID = MSG_Menus_Battle_CantRunAway;
break;
default:
msgID = MSG_Menus_00CC;
msgID = MSG_Menus_Battle_CantRunAway;
break;
}
width = get_msg_width(msgID, 0) + 23;
@ -2015,7 +2067,7 @@ INCLUDE_ASM(s32, "415D90", func_802A5290);
#endif
void func_802A56F8(s32 arg0, s32 x, s32 y) {
draw_msg(MSG_Menus_0043, x + 15, y + 2, D_802AD624, MSG_PAL_33, DRAW_MSG_STYLE_MENU);
draw_msg(MSG_Menus_Strategies, x + 15, y + 2, D_802AD624, MSG_PAL_33, DRAW_MSG_STYLE_MENU);
}
void func_802A5738(s32 arg0, s32 x, s32 y) {
@ -2039,13 +2091,13 @@ void func_802A57C8(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s
switch (D_802AD610) {
case 0:
msgID = MSG_Menus_00CB;
msgID = MSG_Menus_Battle_CantSwitch2;
break;
case 1:
msgID = MSG_Menus_00CC;
msgID = MSG_Menus_Battle_CantRunAway;
break;
default:
msgID = MSG_Menus_00CC;
msgID = MSG_Menus_Battle_CantRunAway;
break;
}
draw_msg(msgID, x, y, 255, MSG_PAL_0F, 0);
@ -2166,7 +2218,7 @@ void btl_state_update_player_menu(void) {
switch (gBattleSubState) {
case BTL_SUBSTATE_PLAYER_MENU_NONE:
battleStatus->moveCategory = -1;
battleStatus->moveCategory = BTL_MENU_TYPE_INVALID;
battleStatus->selectedMoveID = 0;
battleStatus->currentAttackElement = 0;
if (!can_btl_state_update_switch_to_player()) {
@ -2244,16 +2296,16 @@ void btl_state_update_player_menu(void) {
battle_menu_messageIDs[0] = battle_menu_centeredMessagesC[0];
if (battleStatus->actionCommandMode != ACTION_COMMAND_MODE_TUTORIAL) {
if (gBattleStatus.flags1 & BS_FLAGS1_2000000) {
battle_menu_messageIDs[0] = MSG_Menus_0054;
battle_menu_messageIDs[0] = MSG_Menus_EndTraining_Centered;
}
} else {
battle_menu_messageIDs[0] = MSG_Menus_0054;
battle_menu_messageIDs[0] = MSG_Menus_EndTraining_Centered;
}
battle_menu_isMessageDisabled[entryIdx] = 0;
if (!(battleStatus->menuDisableFlags & 0x80)) {
main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_StrategiesHudScript.disabled;
battle_menu_isEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = 0x48;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_48;
}
if (battleStatus->unk_4C[0] == 7) {
initialPos = entryIdx;
@ -2268,19 +2320,19 @@ void btl_state_update_player_menu(void) {
if(battleStatus->menuStatus[0] == 0) {
main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_ItemHudScripts.disabled;
battle_menu_isEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = 0x45;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_45;
}
if (!(battleStatus->menuDisableFlags & 0x4)) {
main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_ItemHudScripts.disabled;
battle_menu_isEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = 0x48;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_48;
}
if (battleStatus->itemLossTurns >= 0) {
main_battle_menu_JumpHudScripts[entryIdx] = battle_menu_ItemHudScripts.disabled;
battle_menu_isEnabled[entryIdx] = FALSE;
battle_menu_isMessageDisabled[entryIdx] = 0x48;
battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_48;
}
if (battleStatus->unk_4C[0] == 2) {
@ -2416,7 +2468,7 @@ void btl_state_update_player_menu(void) {
}
itemData = &gItemTable[playerData->invItems[i]];
battleStatus->moveCategory = 2;
battleStatus->moveCategory = BTL_MENU_TYPE_ITEM;
battleStatus->selectedItemID = playerData->invItems[i];
battleStatus->currentTargetListFlags = itemData->targetFlags;
player_create_target_list(playerActor);
@ -2471,7 +2523,7 @@ void btl_state_update_player_menu(void) {
moveData = &gMoveTable[MOVE_REFRESH + i];
battleStatus->submenuMoves[entryIdx] = MOVE_REFRESH + i;
battleStatus->submenuIcons[entryIdx] = 0;
battleStatus->moveCategory = 8;
battleStatus->moveCategory = BTL_MENU_TYPE_8;
battleStatus->selectedItemID = MOVE_REFRESH + i;
battleStatus->currentTargetListFlags = moveData->flags;
player_create_target_list(playerActor);
@ -2493,7 +2545,7 @@ void btl_state_update_player_menu(void) {
moveData = &gMoveTable[MOVE_STAR_BEAM];
battleStatus->submenuMoves[entryIdx] = MOVE_STAR_BEAM;
battleStatus->submenuIcons[entryIdx] = 0;
battleStatus->moveCategory = 8;
battleStatus->moveCategory = BTL_MENU_TYPE_8;
battleStatus->selectedItemID = MOVE_REFRESH + i;
battleStatus->currentTargetListFlags = moveData->flags;
player_create_target_list(playerActor);
@ -2516,7 +2568,7 @@ void btl_state_update_player_menu(void) {
moveData = &gMoveTable[MOVE_PEACH_BEAM];
battleStatus->submenuMoves[entryIdx] = MOVE_PEACH_BEAM;
battleStatus->submenuIcons[entryIdx] = 0;
battleStatus->moveCategory = 8;
battleStatus->moveCategory = BTL_MENU_TYPE_8;
battleStatus->selectedItemID = MOVE_REFRESH + i;
battleStatus->currentTargetListFlags = moveData->flags;
player_create_target_list(playerActor);
@ -2540,12 +2592,12 @@ void btl_state_update_player_menu(void) {
}
currentSubmenu = battleStatus->currentSubmenu;
if (currentSubmenu == 8) {
if (currentSubmenu == BTL_MENU_TYPE_8) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_1;
btl_state_update_player_menu();
btl_state_update_player_menu();
break;
} else if (currentSubmenu == 7) {
} else if (currentSubmenu == BTL_MENU_TYPE_7) {
if (battleStatus->actionCommandMode != ACTION_COMMAND_MODE_TUTORIAL && !(gBattleStatus.flags1 & BS_FLAGS1_2000000)) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_BUILD_STRATEGIES;
btl_state_update_player_menu();
@ -2561,7 +2613,7 @@ void btl_state_update_player_menu(void) {
}
} else {
if (battleStatus->submenuMoveCount == 0) {
if (currentSubmenu != 2) {
if (currentSubmenu != BTL_MENU_TYPE_ITEM) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_10;
break;
} else {
@ -2573,19 +2625,19 @@ void btl_state_update_player_menu(void) {
}
initialPos = 0;
if (currentSubmenu == 0) {
if (currentSubmenu == BTL_MENU_TYPE_JUMP) {
if (battleStatus->unk_4C[1] < 0) {
battleStatus->unk_4C[1] = 0;
}
initialPos = battleStatus->unk_4C[1];
}
if (battleStatus->currentSubmenu == 1) {
if (battleStatus->currentSubmenu == BTL_MENU_TYPE_SMASH) {
if (battleStatus->unk_4C[2] < 0) {
battleStatus->unk_4C[2] = 0;
}
initialPos = battleStatus->unk_4C[2];
}
if (battleStatus->currentSubmenu == 2) {
if (battleStatus->currentSubmenu == BTL_MENU_TYPE_ITEM) {
if (battleStatus->unk_4C[3] < 0) {
battleStatus->unk_4C[3] = 0;
}
@ -2663,14 +2715,14 @@ void btl_state_update_player_menu(void) {
} else {
battleStatus->unk_49 = battle_menu_moveIndices[submenuResult - 1];
battleStatus->selectedMoveID = battleStatus->submenuMoves[battleStatus->unk_49];
if (battleStatus->currentSubmenu == 0) {
if (battleStatus->currentSubmenu == BTL_MENU_TYPE_JUMP) {
battleStatus->unk_4C[1] = battle_menu_moveOptionActive;
}
if (battleStatus->currentSubmenu == 1) {
if (battleStatus->currentSubmenu == BTL_MENU_TYPE_SMASH) {
battleStatus->unk_4C[2] = battle_menu_moveOptionActive;
}
currentSubmenu2 = battleStatus->currentSubmenu;
if (battleStatus->currentSubmenu == 2) {
if (battleStatus->currentSubmenu == BTL_MENU_TYPE_ITEM) {
battleStatus->unk_4C[3] = battle_menu_moveOptionActive;
if (battleStatus->currentSubmenu == currentSubmenu2) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_UNKNOWN_1;
@ -2695,26 +2747,26 @@ void btl_state_update_player_menu(void) {
if (func_802A11B0() == 0) {
break;
}
battleStatus->unk_6C = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_5;
battleStatus->unk_6E = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_6;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_6;
battleStatus->selectedMoveID = battleStatus->submenuMoves[battleStatus->unk_49];
battleStatus->currentTargetListFlags = gMoveTable[battleStatus->submenuMoves[battleStatus->unk_49]].flags;
currentSubmenu = battleStatus->currentSubmenu;
switch (currentSubmenu) {
case 0:
battleStatus->moveCategory = 0;
case BTL_MENU_TYPE_JUMP:
battleStatus->moveCategory = BTL_MENU_TYPE_JUMP;
battleStatus->selectedItemID = playerData->bootsLevel;
btl_set_state(BATTLE_STATE_SELECT_TARGET);
break;
case 1:
battleStatus->moveCategory = 1;
case BTL_MENU_TYPE_SMASH:
battleStatus->moveCategory = BTL_MENU_TYPE_SMASH;
battleStatus->selectedItemID = playerData->hammerLevel;
btl_set_state(BATTLE_STATE_SELECT_TARGET);
break;
case 4:
gBattleSubState = battleStatus->unk_6E;
case BTL_MENU_TYPE_4:
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
btl_state_update_player_menu();
battleStatus->moveCategory = 4;
battleStatus->moveCategory = BTL_MENU_TYPE_4;
btl_set_state(BATTLE_STATE_DEFEND);
break;
}
@ -2766,18 +2818,18 @@ void btl_state_update_player_menu(void) {
func_802A1078();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_12;
} else if (submenuResult != 0) {
battleStatus->unk_6C = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_13;
battleStatus->unk_6E = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_14;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_13;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_MAIN_MENU_14;
switch (battleStatus->currentSubmenu) {
case 0:
battleStatus->moveCategory = 0;
case BTL_MENU_TYPE_JUMP:
battleStatus->moveCategory = BTL_MENU_TYPE_JUMP;
battleStatus->selectedItemID = playerData->bootsLevel;
battleStatus->selectedMoveID = playerData->bootsLevel + MOVE_JUMP1;
battleStatus->currentTargetListFlags = gMoveTable[battleStatus->selectedMoveID].flags;
btl_set_state(BATTLE_STATE_SELECT_TARGET);
break;
case 1:
battleStatus->moveCategory = 1;
case BTL_MENU_TYPE_SMASH:
battleStatus->moveCategory = BTL_MENU_TYPE_SMASH;
battleStatus->selectedItemID = playerData->hammerLevel;
battleStatus->selectedMoveID = playerData->hammerLevel + MOVE_HAMMER1;
battleStatus->currentTargetListFlags = gMoveTable[battleStatus->selectedMoveID].flags;
@ -2820,7 +2872,7 @@ void btl_state_update_player_menu(void) {
if (!(itemData->typeFlags & ITEM_TYPE_FLAG_BATTLE_USABLE)) {
continue;
}
battleStatus->moveCategory = 2;
battleStatus->moveCategory = BTL_MENU_TYPE_ITEM;
battleStatus->selectedItemID = playerData->invItems[i];
battleStatus->currentTargetListFlags = itemData->targetFlags;
player_create_target_list(playerActor);
@ -2866,10 +2918,10 @@ void btl_state_update_player_menu(void) {
btl_state_update_player_menu();
btl_state_update_player_menu();
} else {
battleStatus->unk_6C = BTL_SUBSTATE_PLAYER_MENU_UNKNOWN_5;
battleStatus->unk_6E = BTL_SUBSTATE_PLAYER_MENU_UNKNOWN_6;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_UNKNOWN_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_UNKNOWN_6;
battleStatus->unk_1AA = popup->userIndex[popup->result - 1];
battleStatus->moveCategory = 2;
battleStatus->moveCategory = BTL_MENU_TYPE_ITEM;
battleStatus->selectedItemID = battleStatus->unk_1AA;
battleStatus->currentTargetListFlags = gItemTable[battleStatus->selectedItemID].targetFlags | ITEM_TARGET_FLAG_8000;
battleStatus->currentAttackElement = 0;
@ -2924,7 +2976,7 @@ void btl_state_update_player_menu(void) {
if (!(itemData->typeFlags & ITEM_TYPE_FLAG_BATTLE_USABLE)) {
continue;
}
battleStatus->moveCategory = 2;
battleStatus->moveCategory = BTL_MENU_TYPE_ITEM;
battleStatus->selectedItemID = playerData->invItems[i];
battleStatus->currentTargetListFlags = itemData->targetFlags;
player_create_target_list(playerActor);
@ -2963,10 +3015,10 @@ void btl_state_update_player_menu(void) {
btl_state_update_player_menu();
btl_state_update_player_menu();
} else {
battleStatus->unk_6C = BTL_SUBSTATE_PLAYER_MENU_ITEMS_5;
battleStatus->unk_6E = BTL_SUBSTATE_PLAYER_MENU_ITEMS_6;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_ITEMS_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_ITEMS_6;
battleStatus->unk_1AA = popup->userIndex[popup->result - 1];
battleStatus->moveCategory = 2;
battleStatus->moveCategory = BTL_MENU_TYPE_ITEM;
battleStatus->selectedItemID = battleStatus->unk_1AA;
battleStatus->selectedMoveID = MOVE_ITEMS;
battleStatus->currentTargetListFlags = gItemTable[battleStatus->selectedItemID].targetFlags | ITEM_TARGET_FLAG_8000;
@ -3076,9 +3128,9 @@ void btl_state_update_player_menu(void) {
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_4;
} else if (func_802A11B0() != 0) {
battleStatus->unk_6C = BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_5;
battleStatus->unk_6E = BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_6;
battleStatus->moveCategory = 8;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_STAR_SPIRITS_6;
battleStatus->moveCategory = BTL_MENU_TYPE_8;
battleStatus->selectedMoveID = battleStatus->submenuMoves[battleStatus->unk_49];
battleStatus->currentTargetListFlags = gMoveTable[battleStatus->submenuMoves[battleStatus->unk_49]].flags;
battleStatus->selectedItemID = battleStatus->unk_49;
@ -3124,7 +3176,7 @@ void btl_state_update_player_menu(void) {
continue;
}
battleStatus->moveCategory = 2;
battleStatus->moveCategory = BTL_MENU_TYPE_ITEM;
battleStatus->selectedItemID = playerData->invItems[i];
battleStatus->currentTargetListFlags = itemData->targetFlags;
player_create_target_list(playerActor);
@ -3172,10 +3224,10 @@ void btl_state_update_player_menu(void) {
battleStatus->itemUsesLeft = 1;
btl_set_state(BATTLE_STATE_END_PLAYER_TURN);
} else {
battleStatus->unk_6C = BTL_SUBSTATE_PLAYER_MENU_UNUSED_5;
battleStatus->unk_6E = BTL_SUBSTATE_PLAYER_MENU_UNUSED_6;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_UNUSED_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_UNUSED_6;
battleStatus->unk_1AA = popup->userIndex[popup->result - 1];
battleStatus->moveCategory = 2;
battleStatus->moveCategory = BTL_MENU_TYPE_ITEM;
battleStatus->selectedItemID = battleStatus->unk_1AA;
battleStatus->currentTargetListFlags = gItemTable[battleStatus->selectedItemID].targetFlags | ITEM_TARGET_FLAG_8000;
battleStatus->currentAttackElement = 0;
@ -3226,7 +3278,7 @@ void btl_state_update_player_menu(void) {
}
if (jumpTargetCount <= 0 && hammerTargetCount <= 0) {
battleStatus->moveCategory = 9;
battleStatus->moveCategory = BTL_MENU_TYPE_9;
battleStatus->unk_95 = 0;
btl_set_state(BATTLE_STATE_END_PLAYER_TURN);
} else {
@ -3239,13 +3291,13 @@ void btl_state_update_player_menu(void) {
}
if (rand_int(100) < jumpChance) {
battleStatus->selectedMoveID = MOVE_UNUSED_JUMP5;
battleStatus->moveCategory = 0;
battleStatus->moveCategory = BTL_MENU_TYPE_JUMP;
battleStatus->currentTargetListFlags = gMoveTable[MOVE_UNUSED_JUMP5].flags;
battleStatus->selectedItemID = playerData->bootsLevel;
player_create_target_list(playerActor);
} else {
battleStatus->selectedMoveID = MOVE_UNUSED_HAMMER5;
battleStatus->moveCategory = 1;
battleStatus->moveCategory = BTL_MENU_TYPE_SMASH;
battleStatus->currentTargetListFlags = gMoveTable[MOVE_UNUSED_HAMMER5].flags;
battleStatus->selectedItemID = playerData->hammerLevel;
player_create_target_list(playerActor);
@ -3331,20 +3383,20 @@ void btl_state_update_player_menu(void) {
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_4;
} else if (func_802A11B0() != 0) {
battleStatus->unk_6C = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_5;
battleStatus->unk_6E = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_6;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_6;
switch (battleStatus->currentSubmenu) {
case 3:
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_6;
btl_state_update_player_menu();
battleStatus->moveCategory = 3;
battleStatus->moveCategory = BTL_MENU_TYPE_3;
battleStatus->selectedMoveID = MOVE_UNUSED_39;
btl_set_state(BATTLE_STATE_RUN_AWAY);
break;
case 9:
battleStatus->hustleTurns = 0;
gBattleStatus.flags1 &= ~BS_FLAGS1_HUSTLED;
gBattleSubState = battleStatus->unk_6E;
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
btl_state_update_player_menu();
btl_set_state(BATTLE_STATE_END_PLAYER_TURN);
break;
@ -3352,7 +3404,7 @@ void btl_state_update_player_menu(void) {
gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_STRATEGIES_6;
btl_state_update_player_menu();
battleStatus->selectedMoveID = MOVE_UNUSED_DEFEND_PLUS;
battleStatus->moveCategory = 4;
battleStatus->moveCategory = BTL_MENU_TYPE_4;
btl_set_state(BATTLE_STATE_DEFEND);
break;
case 10:
@ -3426,10 +3478,10 @@ void btl_state_update_player_menu(void) {
btl_state_update_player_menu();
btl_state_update_player_menu();
} else {
battleStatus->unk_6C = BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_5;
battleStatus->unk_6E = BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_6;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_6;
battleStatus->unk_1AC = popup->userIndex[popup->result - 1];
battleStatus->moveCategory = 5;
battleStatus->moveCategory = BTL_MENU_TYPE_5;
battleStatus->selectedMoveID = MOVE_UNUSED_37;
battleStatus->currentTargetListFlags = ITEM_TARGET_FLAG_2;
battleStatus->selectedItemID = battleStatus->unk_1AC;
@ -3450,7 +3502,7 @@ void btl_state_update_player_menu(void) {
} else {
func_802A4A54();
if (func_802A11B0() != 0) {
gBattleSubState = battleStatus->unk_6E;
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
btl_state_update_player_menu();
btl_set_state(BATTLE_STATE_CHANGE_PARTNER);
}
@ -3555,7 +3607,7 @@ void btl_state_update_partner_menu(void) {
PartnerPopupProperties* popupProps;
if (gBattleSubState == BTL_SUBSTATE_PARTNER_MENU_NONE) {
battleStatus->moveCategory = -1;
battleStatus->moveCategory = BTL_MENU_TYPE_INVALID;
battleStatus->selectedMoveID = MOVE_NONE;
battleStatus->currentAttackElement = 0;
if (!func_802A58D0()) {
@ -3733,8 +3785,8 @@ void btl_state_update_partner_menu(void) {
btl_state_update_partner_menu();
btl_state_update_partner_menu();
} else {
battleStatus->unk_6C = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_5;
battleStatus->unk_6E = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_6;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_6;
func_802A1030();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_MAIN_MENU_3;
}
@ -3748,7 +3800,7 @@ void btl_state_update_partner_menu(void) {
return;
}
if (numOptions != 0) {
battleStatus->moveCategory = 8;
battleStatus->moveCategory = BTL_MENU_TYPE_8;
battleStatus->selectedMoveID = MOVE_FOCUS;
battleStatus->selectedItemID = 0;
battleStatus->currentTargetListFlags = gMoveTable[MOVE_FOCUS].flags;
@ -3863,12 +3915,12 @@ void btl_state_update_partner_menu(void) {
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_ABILITIES_4;
} else if (func_802A11B0() != 0) {
battleStatus->moveCategory = 6;
battleStatus->moveCategory = BTL_MENU_TYPE_6;
battleStatus->selectedMoveID = battle_menu_moveIndices[battleStatus->unk_4B];
battleStatus->currentTargetListFlags = gMoveTable[battleStatus->selectedMoveID].flags;
battleStatus->unk_5C[1] = battle_menu_moveOptionActive;
battleStatus->unk_6C = BTL_SUBSTATE_PARTNER_MENU_ABILITIES_5;
battleStatus->unk_6E = BTL_SUBSTATE_PARTNER_MENU_ABILITIES_6;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_ABILITIES_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_ABILITIES_6;
btl_set_state(0x11);
}
break;
@ -3936,10 +3988,10 @@ void btl_state_update_partner_menu(void) {
btl_state_update_partner_menu();
btl_state_update_partner_menu();
} else {
battleStatus->unk_6C = BTL_SUBSTATE_PARTNER_MENU_ITEMS_5;
battleStatus->unk_6E = BTL_SUBSTATE_PARTNER_MENU_ITEMS_6;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_ITEMS_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_ITEMS_6;
battleStatus->unk_1AA = popupMenu->userIndex[popupMenu->result - 1];
battleStatus->moveCategory = 2;
battleStatus->moveCategory = BTL_MENU_TYPE_ITEM;
battleStatus->selectedItemID = battleStatus->unk_1AA;
battleStatus->currentTargetListFlags = gItemTable[battleStatus->selectedItemID].targetFlags | ITEM_TARGET_FLAG_8000;
battleStatus->currentAttackElement = 0;
@ -4016,10 +4068,10 @@ void btl_state_update_partner_menu(void) {
btl_state_update_partner_menu();
btl_state_update_partner_menu();
} else {
battleStatus->unk_6C = BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_5;
battleStatus->unk_6E = BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_6;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_6;
battleStatus->unk_1AC = popupMenu->userIndex[popupMenu->result - 1];
battleStatus->moveCategory = 5;
battleStatus->moveCategory = BTL_MENU_TYPE_5;
battleStatus->selectedMoveID = MOVE_UNUSED_37;
battleStatus->currentTargetListFlags = ITEM_TARGET_FLAG_2;
battleStatus->selectedItemID = battleStatus->unk_1AC;
@ -4036,7 +4088,7 @@ void btl_state_update_partner_menu(void) {
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_UNUSED_CHANGE_PARTNER_4;
} else if (func_802A11B0() != 0) {
gBattleSubState = battleStatus->unk_6E;
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
btl_state_update_partner_menu();
btl_set_state(BATTLE_STATE_CHANGE_PARTNER);
}
@ -4117,9 +4169,9 @@ void btl_state_update_partner_menu(void) {
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_FOCUS_4;
} else if (func_802A11B0() != 0) {
battleStatus->unk_6C = BTL_SUBSTATE_PARTNER_MENU_FOCUS_5;
battleStatus->unk_6E = BTL_SUBSTATE_PARTNER_MENU_FOCUS_6;
battleStatus->moveCategory = 8;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_FOCUS_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_FOCUS_6;
battleStatus->moveCategory = BTL_MENU_TYPE_8;
battleStatus->selectedMoveID = battleStatus->submenuMoves[battleStatus->unk_4B];
battleStatus->currentTargetListFlags = gMoveTable[battleStatus->submenuMoves[battleStatus->unk_4B]].flags;
battleStatus->selectedItemID = battleStatus->unk_4B;
@ -4206,8 +4258,8 @@ void btl_state_update_partner_menu(void) {
func_802A1098();
gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_4;
} else if (func_802A11B0() != 0) {
battleStatus->unk_6C = BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_5;
battleStatus->unk_6E = BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_6;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_STRATEGIES_6;
numOptions = battleStatus->unk_4A;
switch (numOptions) {
case 9:
@ -4288,10 +4340,10 @@ void btl_state_update_partner_menu(void) {
btl_state_update_partner_menu();
btl_state_update_partner_menu();
} else {
battleStatus->unk_6C = BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_5;
battleStatus->unk_6E = BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_6;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_5;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_6;
battleStatus->unk_1AC = popupMenu->userIndex[popupMenu->result - 1];
battleStatus->moveCategory = 5;
battleStatus->moveCategory = BTL_MENU_TYPE_5;
battleStatus->selectedMoveID = MOVE_UNUSED_37;
battleStatus->currentTargetListFlags = ITEM_TARGET_FLAG_2;
battleStatus->selectedItemID = battleStatus->unk_1AC;
@ -4312,7 +4364,7 @@ void btl_state_update_partner_menu(void) {
} else {
func_802A4A54();
if (func_802A11B0() != 0) {
gBattleSubState = battleStatus->unk_6E;
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
btl_state_update_partner_menu();
btl_set_state(BATTLE_STATE_CHANGE_PARTNER);
}
@ -4515,9 +4567,9 @@ void btl_state_update_peach_menu(void) {
break;
case BTL_SUBSTATE_PEACH_MENU_UNK_2:
if (func_802A11B0() != 0) {
battleStatus->unk_6C = BTL_SUBSTATE_PEACH_MENU_UNK_4;
battleStatus->unk_6E = BTL_SUBSTATE_PEACH_MENU_UNK_5;
battleStatus->moveCategory = 8;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PEACH_MENU_UNK_4;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PEACH_MENU_UNK_5;
battleStatus->moveCategory = BTL_MENU_TYPE_8;
battleStatus->selectedMoveID = MOVE_PEACH_FOCUS;
battleStatus->selectedItemID = ITEM_FIRST_DEGREE_CARD;
battleStatus->currentTargetListFlags = gMoveTable[MOVE_PEACH_FOCUS].flags;
@ -4718,9 +4770,9 @@ void btl_state_update_twink_menu(void) {
break;
case BTL_SUBSTATE_TWINK_MENU_UNK_2:
if (func_802A11B0() != 0) {
battleStatus->unk_6C = BTL_SUBSTATE_TWINK_MENU_UNK_4;
battleStatus->unk_6E = BTL_SUBSTATE_TWINK_MENU_UNK_5;
battleStatus->moveCategory = 8;
battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_TWINK_MENU_UNK_4;
battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_TWINK_MENU_UNK_5;
battleStatus->moveCategory = BTL_MENU_TYPE_8;
battleStatus->selectedMoveID = MOVE_TWINK_DASH;
battleStatus->selectedItemID = ITEM_NONE;
battleStatus->currentTargetListFlags = gMoveTable[MOVE_TWINK_DASH].flags;
@ -4825,7 +4877,7 @@ void btl_state_update_select_target(void) {
if (battleStatus->currentTargetListFlags & 0x80000000) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_80000)) {
gBattleSubState = battleStatus->unk_6E;
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_player_menu();
} else {
@ -4833,7 +4885,7 @@ void btl_state_update_select_target(void) {
}
btl_set_state(BATTLE_STATE_PLAYER_MOVE);
} else {
gBattleSubState = battleStatus->unk_6E;
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_twink_menu();
} else {
@ -4846,7 +4898,7 @@ void btl_state_update_select_target(void) {
if (targetListLength == 0) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_80000)) {
gBattleSubState = battleStatus->unk_6E;
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_player_menu();
} else {
@ -4854,7 +4906,7 @@ void btl_state_update_select_target(void) {
}
btl_set_state(BATTLE_STATE_PLAYER_MOVE);
} else {
gBattleSubState = battleStatus->unk_6E;
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_twink_menu();
} else {
@ -4943,7 +4995,7 @@ void btl_state_update_select_target(void) {
}
if (!(gBattleStatus.flags1 & BS_FLAGS1_80000)) {
gBattleSubState = battleStatus->unk_6E;
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_peach_menu();
} else {
@ -4951,7 +5003,7 @@ void btl_state_update_select_target(void) {
}
btl_set_state(BATTLE_STATE_PLAYER_MOVE);
} else {
gBattleSubState = battleStatus->unk_6E;
gBattleSubState = battleStatus->acceptTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_twink_menu();
} else {
@ -4969,7 +5021,7 @@ void btl_state_update_select_target(void) {
if (battleStatus->itemUsesLeft != 0) {
btl_set_state(BATTLE_STATE_PLAYER_MENU);
gBattleSubState = battleStatus->unk_6C;
gBattleSubState = battleStatus->cancelTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_peach_menu();
} else {
@ -4977,7 +5029,7 @@ void btl_state_update_select_target(void) {
}
} else if (!(gBattleStatus.flags1 & BS_FLAGS1_80000)) {
btl_set_state(BATTLE_STATE_PLAYER_MENU);
gBattleSubState = battleStatus->unk_6C;
gBattleSubState = battleStatus->cancelTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_peach_menu();
} else {
@ -4985,7 +5037,7 @@ void btl_state_update_select_target(void) {
}
} else {
btl_set_state(BATTLE_STATE_PARTNER_MENU);
gBattleSubState = battleStatus->unk_6C;
gBattleSubState = battleStatus->cancelTargetMenuSubstate;
if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
btl_state_update_twink_menu();
} else {
@ -5095,7 +5147,7 @@ void btl_state_draw_select_target(void) {
if ((battleStatus->currentTargetListFlags & 1) || targetListLength == 1) {
actorID = target->actorID;
if (actorID == ACTOR_PLAYER) {
msgWidth = get_msg_width(MSG_Menus_00C4, 0) + 10;
msgWidth = get_msg_width(MSG_Menus_Battle_TargetMario, 0) + 10;
} else if (actorID == ACTOR_PARTNER) {
msgWidth = get_msg_width(D_802AB738[currentPartner], 0) + 10;
} else {
@ -5111,11 +5163,11 @@ void btl_state_draw_select_target(void) {
target = &actor->targetData[targetIndexList[selectedTargetIndex]];
actorID = target->actorID;
if (actorID == ACTOR_PLAYER) {
msgWidth = get_msg_width(MSG_Menus_00C4, 0) + 10;
msgWidth = get_msg_width(MSG_Menus_Battle_TargetMario, 0) + 10;
} else if (actorID == ACTOR_PARTNER) {
msgWidth = get_msg_width(D_802AB738[currentPartner], 0) + 10;
} else {
msgWidth = get_msg_width(MSG_Menus_00C5, 0) + 10;
msgWidth = get_msg_width(MSG_Menus_Battle_TargetAllEnemies, 0) + 10;
}
}
@ -5127,7 +5179,7 @@ void btl_state_draw_select_target(void) {
if ((battleStatus->currentTargetListFlags & 1) || targetListLength == 1) {
actorID = target->actorID;
if (actorID == ACTOR_PLAYER) {
draw_msg(MSG_Menus_00C4, screenX + D_802ACC68, screenY, 255, MSG_PAL_36, 0);
draw_msg(MSG_Menus_Battle_TargetMario, screenX + D_802ACC68, screenY, 255, MSG_PAL_36, 0);
} else if (actorID == ACTOR_PARTNER) {
draw_msg(D_802AB738[currentPartner], screenX + D_802ACC68, screenY, 255, MSG_PAL_36, 0);
} else {

View File

@ -303,7 +303,7 @@ block_17:
}
create_popup_menu(popup);
set_time_freeze_mode(TIME_FREEZE_PARTNER_MENU);
if (*partnerActionState == 0) {
if (*partnerActionState == PARTNER_ACTION_NONE) {
set_action_state(ACTION_STATE_IDLE);
}
D_8010CD00++;

View File

@ -1574,12 +1574,12 @@ ApiStatus GetBattleFlags(Evt* script, s32 isInitialCall) {
ApiStatus SetBattleFlagBits(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Bytecode a0 = *args++;
Bytecode flagBits = *args++;
if (evt_get_variable(script, *args)) {
gBattleStatus.flags1 |= a0;
gBattleStatus.flags1 |= flagBits;
} else {
gBattleStatus.flags1 &= ~a0;
gBattleStatus.flags1 &= ~flagBits;
}
return ApiStatus_DONE2;
@ -1592,14 +1592,14 @@ ApiStatus GetBattleFlags2(Evt* script, s32 isInitialCall) {
ApiStatus SetBattleFlagBits2(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Bytecode a0 = *args++;
Bytecode flagBits = *args++;
if (evt_get_variable(script, *args)) {
BattleStatus* battleStatus = &gBattleStatus;
battleStatus->flags2 |= a0;
battleStatus->flags2 |= flagBits;
} else {
BattleStatus* battleStatus = &gBattleStatus;
battleStatus->flags2 &= ~a0;
battleStatus->flags2 &= ~flagBits;
}
return ApiStatus_DONE2;
@ -1608,14 +1608,14 @@ ApiStatus SetBattleFlagBits2(Evt* script, s32 isInitialCall) {
ApiStatus SetActorFlags(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 a1;
s32 flagBits;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
a1 = *args++;
get_actor(actorID)->flags = a1;
flagBits = *args++;
get_actor(actorID)->flags = flagBits;
return ApiStatus_DONE2;
}
@ -1623,22 +1623,22 @@ ApiStatus SetActorFlags(Evt* script, s32 isInitialCall) {
ApiStatus SetActorFlagBits(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 a1;
s32 var1;
s32 flagBits;
s32 mode;
Actor* actor;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
a1 = *args++;
var1 = evt_get_variable(script, *args++);
flagBits = *args++;
mode = evt_get_variable(script, *args++);
actor = get_actor(actorID);
if (var1 != 0) {
actor->flags |= a1;
if (mode != 0) {
actor->flags |= flagBits;
} else {
actor->flags &= ~a1;
actor->flags &= ~flagBits;
}
return ApiStatus_DONE2;
@ -1647,15 +1647,15 @@ ApiStatus SetActorFlagBits(Evt* script, s32 isInitialCall) {
ApiStatus GetActorFlags(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 a1;
s32 outVar;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
a1 = *args++;
outVar = *args++;
evt_set_variable(script, a1, get_actor(actorID)->flags);
evt_set_variable(script, outVar, get_actor(actorID)->flags);
return ApiStatus_DONE2;
}
@ -1663,7 +1663,7 @@ ApiStatus GetActorFlags(Evt* script, s32 isInitialCall) {
ApiStatus SetPartFlags(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 a1;
s32 flagBits;
s32 partIndex;
if (actorID == ACTOR_SELF) {
@ -1671,9 +1671,9 @@ ApiStatus SetPartFlags(Evt* script, s32 isInitialCall) {
}
partIndex = evt_get_variable(script, *args++);
a1 = *args++;
flagBits = *args++;
get_actor_part(get_actor(actorID), partIndex)->flags = a1;
get_actor_part(get_actor(actorID), partIndex)->flags = flagBits;
return ApiStatus_DONE2;
}
@ -1682,24 +1682,24 @@ ApiStatus SetPartFlagBits(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
ActorPart* actorPart;
s32 bits;
s32 flagBits;
s32 partIndex;
s32 cond;
s32 mode;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
partIndex = evt_get_variable(script, *args++);
bits = *args++;
cond = evt_get_variable(script, *args++);
flagBits = *args++;
mode = evt_get_variable(script, *args++);
actorPart = get_actor_part(get_actor(actorID), partIndex);
if (cond != 0) {
actorPart->flags |= bits;
if (mode != 0) {
actorPart->flags |= flagBits;
} else {
actorPart->flags &= ~bits;
actorPart->flags &= ~flagBits;
}
return ApiStatus_DONE2;
@ -1709,18 +1709,17 @@ ApiStatus SetPartTargetFlags(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
ActorPart* actorPart;
s32 flags;
s32 flagBits;
s32 partIndex;
s32 cond;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
partIndex = evt_get_variable(script, *args++);
flags = *args++;
flagBits = *args++;
get_actor_part(get_actor(actorID), partIndex)->targetFlags = flags;
get_actor_part(get_actor(actorID), partIndex)->targetFlags = flagBits;
return ApiStatus_DONE2;
}
@ -1730,23 +1729,23 @@ ApiStatus SetPartTargetFlagBits(Evt* script, s32 isInitialCall) {
s32 actorID = evt_get_variable(script, *args++);
ActorPart* actorPart;
s32 partIndex;
s32 bits;
s32 cond;
s32 flagBits;
s32 mode;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
partIndex = evt_get_variable(script, *args++);
bits = *args++;
cond = evt_get_variable(script, *args++);
flagBits = *args++;
mode = evt_get_variable(script, *args++);
actorPart = get_actor_part(get_actor(actorID), partIndex);
if (cond != 0) {
actorPart->targetFlags |= bits;
if (mode != 0) {
actorPart->targetFlags |= flagBits;
} else {
actorPart->targetFlags &= ~bits;
actorPart->targetFlags &= ~flagBits;
}
return ApiStatus_DONE2;
@ -1757,16 +1756,16 @@ ApiStatus GetPartFlags(Evt* script, s32 isInitialCall) {
s32 actorID = evt_get_variable(script, *args++);
s32 partIndex;
ActorPart* actorPart;
s32 a2;
s32 outVar;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
partIndex = evt_get_variable(script, *args++);
a2 = *args++;
outVar = *args++;
evt_set_variable(script, a2, get_actor_part(get_actor(actorID), partIndex)->flags);
evt_set_variable(script, outVar, get_actor_part(get_actor(actorID), partIndex)->flags);
return ApiStatus_DONE2;
}
@ -1776,16 +1775,16 @@ ApiStatus GetPartTargetFlags(Evt* script, s32 isInitialCall) {
s32 actorID = evt_get_variable(script, *args++);
s32 partIndex;
ActorPart* actorPart;
s32 a2;
s32 outVar;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
partIndex = evt_get_variable(script, *args++);
a2 = *args++;
outVar = *args++;
evt_set_variable(script, a2, get_actor_part(get_actor(actorID), partIndex)->targetFlags);
evt_set_variable(script, outVar, get_actor_part(get_actor(actorID), partIndex)->targetFlags);
return ApiStatus_DONE2;
}
@ -1794,18 +1793,17 @@ ApiStatus SetPartEventFlags(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
ActorPart* actorPart;
s32 flags;
s32 flagBits;
s32 partIndex;
s32 cond;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
partIndex = evt_get_variable(script, *args++);
flags = *args++;
flagBits = *args++;
get_actor_part(get_actor(actorID), partIndex)->eventFlags = flags;
get_actor_part(get_actor(actorID), partIndex)->eventFlags = flagBits;
return ApiStatus_DONE2;
}
@ -1815,23 +1813,23 @@ ApiStatus SetPartEventBits(Evt* script, s32 isInitialCall) {
s32 actorID = evt_get_variable(script, *args++);
ActorPart* actorPart;
s32 partIndex;
s32 bits;
s32 cond;
s32 flagBits;
s32 mode;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
partIndex = evt_get_variable(script, *args++);
bits = *args++;
cond = evt_get_variable(script, *args++);
flagBits = *args++;
mode = evt_get_variable(script, *args++);
actorPart = get_actor_part(get_actor(actorID), partIndex);
if (cond != 0) {
actorPart->eventFlags |= bits;
if (mode != 0) {
actorPart->eventFlags |= flagBits;
} else {
actorPart->eventFlags &= ~bits;
actorPart->eventFlags &= ~flagBits;
}
return ApiStatus_DONE2;
@ -1842,16 +1840,16 @@ ApiStatus GetPartEventFlags(Evt* script, s32 isInitialCall) {
s32 actorID = evt_get_variable(script, *args++);
s32 partIndex;
ActorPart* actorPart;
s32 a2;
s32 outVar;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
partIndex = evt_get_variable(script, *args++);
a2 = *args++;
outVar = *args++;
evt_set_variable(script, a2, get_actor_part(get_actor(actorID), partIndex)->eventFlags);
evt_set_variable(script, outVar, get_actor_part(get_actor(actorID), partIndex)->eventFlags);
return ApiStatus_DONE2;
}
@ -1860,18 +1858,17 @@ ApiStatus func_8026D51C(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
ActorPart* actorPart;
s32 flags;
s32 flagBits;
s32 partIndex;
s32 cond;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
partIndex = evt_get_variable(script, *args++);
flags = *args++;
flagBits = *args++;
get_actor_part(get_actor(actorID), partIndex)->partFlags3 = flags;
get_actor_part(get_actor(actorID), partIndex)->partFlags3 = flagBits;
return ApiStatus_DONE2;
}
@ -1881,23 +1878,23 @@ ApiStatus func_8026D5A4(Evt* script, s32 isInitialCall) {
s32 actorID = evt_get_variable(script, *args++);
ActorPart* actorPart;
s32 partIndex;
s32 bits;
s32 cond;
s32 flagBits;
s32 mode;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
partIndex = evt_get_variable(script, *args++);
bits = *args++;
cond = evt_get_variable(script, *args++);
flagBits = *args++;
mode = evt_get_variable(script, *args++);
actorPart = get_actor_part(get_actor(actorID), partIndex);
if (cond != 0) {
actorPart->partFlags3 |= bits;
if (mode != 0) {
actorPart->partFlags3 |= flagBits;
} else {
actorPart->partFlags3 &= ~bits;
actorPart->partFlags3 &= ~flagBits;
}
return ApiStatus_DONE2;

View File

@ -278,7 +278,7 @@ void action_command_init_status(void) {
actionCommandStatus->autoSucceed = TRUE;
}
if (gBattleStatus.flags1 & BS_FLAGS1_1000) {
if (gBattleStatus.flags1 & BS_FLAGS1_AUTO_SUCCEED_ACTION) {
actionCommandStatus->autoSucceed = TRUE;
actionCommandStatus->showHud = FALSE;
}

View File

@ -591,7 +591,7 @@ EvtScript N(handleEvent_80222140) = {
EVT_END_IF
EVT_CALL(PlayEffect, EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_WAIT(20)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)

View File

@ -598,7 +598,7 @@ EvtScript N(handleEvent_8021C9C4) = {
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_Idle)
EVT_EXEC_WAIT(DoImmune)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 2)
@ -1264,7 +1264,7 @@ EvtScript N(handleEvent_8021F41C) = {
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Idle)
EVT_EXEC_WAIT(DoImmune)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -498,7 +498,7 @@ EvtScript N(handleEvent_80219BD8) = {
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Idle)
EVT_EXEC_WAIT(DoImmune)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -207,7 +207,7 @@ EvtScript N(handleEvent_802260D0) = {
EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14)
EVT_EXEC_WAIT(DoJumpBack)
EVT_EXEC_WAIT(N(80225FD4))
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -227,7 +227,7 @@ EvtScript N(handleEvent_80224038) = {
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_TubbasHeart_Anim03)
EVT_EXEC_WAIT(N(802244DC))
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET(LVar1, 7077889)

View File

@ -249,7 +249,7 @@ EvtScript N(handleEvent_80219338) = {
EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14)
EVT_EXEC_WAIT(DoJumpBack)
EVT_EXEC_WAIT(N(80219238))
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_EXEC_WAIT(N(802192E0))

View File

@ -10,7 +10,7 @@ ApiStatus func_80218644_6DE404(Evt* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor;
SelectableTarget* selectableTarget;
battleStatus->moveCategory = 1;
battleStatus->moveCategory = BTL_MENU_TYPE_SMASH;
battleStatus->selectedMoveID = MOVE_HAMMER1;
battleStatus->selectedItemID = gCurrentEncounter.hitTier;
battleStatus->currentTargetListFlags = gMoveTable[MOVE_HAMMER1].flags;

View File

@ -8,7 +8,7 @@ ApiStatus func_802186E0_6DE4A0(Evt* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor;
SelectableTarget* selectableTarget;
battleStatus->moveCategory = 0;
battleStatus->moveCategory = BTL_MENU_TYPE_JUMP;
battleStatus->selectedMoveID = MOVE_POWER_BOUNCE;
battleStatus->selectedItemID = gCurrentEncounter.hitTier;
battleStatus->currentTargetListFlags = gMoveTable[MOVE_POWER_BOUNCE].flags;

View File

@ -8,7 +8,7 @@ ApiStatus func_80218770_6DE530(Evt* script, s32 isInitialCall) {
Actor* partner = battleStatus->partnerActor;
SelectableTarget* selectableTarget;
battleStatus->moveCategory = 6;
battleStatus->moveCategory = BTL_MENU_TYPE_6;
battleStatus->selectedItemID = 0;
battleStatus->selectedMoveID = MOVE_SHELL_SHOT;
battleStatus->currentTargetListFlags = gMoveTable[MOVE_SHELL_SHOT].flags;

View File

@ -10,7 +10,7 @@ ApiStatus func_802187F0_6DE5B0(Evt* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor;
SelectableTarget* selectableTarget;
battleStatus->moveCategory = 2;
battleStatus->moveCategory = BTL_MENU_TYPE_ITEM;
battleStatus->selectedItemID = ITEM_THUNDER_RAGE;
selectedItemID = battleStatus->selectedItemID;
battleStatus->selectedMoveID = 0;

View File

@ -174,7 +174,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -167,7 +167,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -210,7 +210,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -181,7 +181,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_TuffPuff_Hurt)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -994,7 +994,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(N(OnBurn))
EVT_EXEC_WAIT(N(OnBurnDeath))
EVT_RETURN
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_EXEC_WAIT(N(OnImmune))
EVT_CASE_EQ(EVENT_IMMUNE)
EVT_EXEC_WAIT(N(OnImmune))

View File

@ -263,7 +263,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(GetLastElement, LVar0)
EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SMASH)

View File

@ -187,7 +187,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Dead)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -305,7 +305,7 @@ EvtScript N(handleEvent) = {
EVT_END_IF
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_IS_BIG), LVar1)
EVT_IF_EQ(LVar1, 0)

View File

@ -397,7 +397,7 @@ EvtScript N(handleEvent_80219050) = {
EVT_CALL(GetActorVar, ACTOR_SELF, 3, LVar1)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, 1, LVar1)

View File

@ -631,7 +631,7 @@ EvtScript N(handleEvent_80222364) = {
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartPos, ACTOR_SELF, 2, LVar0, LVar1, LVar2)
EVT_CALL(SetActorVar, ACTOR_SELF, 8, 0)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_StoneChomp_Anim01)

View File

@ -630,7 +630,7 @@ EvtScript N(handleEvent_802197C4) = {
EVT_SET_CONST(LVar1, ANIM_ChainChomp_Anim01)
EVT_EXEC_WAIT(DoImmune)
EVT_CALL(SetAnimationRate, ACTOR_SELF, 1, EVT_FLOAT(1.0))
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_ChainChomp_Anim01)

View File

@ -338,7 +338,7 @@ EvtScript N(handleEvent_8021BFD0) = {
EVT_EXEC_WAIT(DoReturnHome)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6))
EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -229,7 +229,7 @@ EvtScript N(handleEvent_8021B940) = {
EVT_SET_CONST(LVar1, ANIM_Buzzar_Anim0B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -299,7 +299,7 @@ EvtScript N(handleEvent_80218C3C) = {
EVT_END_IF
EVT_CALL(PlayEffect, EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_WAIT(20)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)

View File

@ -199,7 +199,7 @@ EvtScript N(handleEvent_8021DCF4) = {
EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim0E)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -178,7 +178,7 @@ EvtScript N(handleEvent_8021EB9C) = {
EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_HurtShock)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Idle)

View File

@ -170,7 +170,7 @@ EvtScript N(handleEvent_80221A74) = {
EVT_SET_CONST(LVar1, ANIM_MBush_Anim07)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -402,7 +402,7 @@ EvtScript N(handleEvent_80218E3C) = {
EVT_SET_CONST(LVar1, ANIM_JungleGuy_Anim09)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 2)
@ -1194,7 +1194,7 @@ EvtScript N(handleEvent_8021C14C) = {
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -366,7 +366,7 @@ EvtScript N(handleEvent_802197FC) = {
EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim04)
@ -477,7 +477,7 @@ EvtScript N(handleEvent_80219ED4) = {
EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_RECOVER_STATUS)
EVT_SET_CONST(LVar0, 1)

View File

@ -114,7 +114,7 @@ EvtScript N(init) = {
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(SetBattleFlagBits2, BS_FLAGS2_2000000, 1)
EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_DONT_STOP_MUSIC, 1)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_RETURN
@ -154,7 +154,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(DoNormalHit)
EVT_EXEC_WAIT(N(speakOnHit))
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BattleKammy_Anim05)

View File

@ -355,7 +355,7 @@ EvtScript N(handleEvent_normal) = {
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim0E)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -579,7 +579,7 @@ EvtScript N(handleEvent_spiky) = {
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim0F)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim11)
@ -944,7 +944,7 @@ EvtScript N(handleEvent_flipped) = {
EVT_END_LOOP
EVT_WAIT(20)
EVT_CASE_OR_EQ(EVENT_SCARE_AWAY)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
@ -1076,7 +1076,7 @@ EvtScript N(handleEvent_spiky_flipped) = {
EVT_END_LOOP
EVT_WAIT(20)
EVT_CASE_OR_EQ(EVENT_SCARE_AWAY)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -322,7 +322,7 @@ EvtScript N(handleEvent) = {
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_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_IF_EQ(LVar0, 0)

View File

@ -161,7 +161,7 @@ EvtScript N(handleEvent) = {
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_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET(LVar1, ANIM_BattleBowser_Hurt)
EVT_EXEC_WAIT(N(onHit))

View File

@ -166,7 +166,7 @@ EvtScript N(init) = {
EVT_CALL(ModifyActorDecoration, ACTOR_SELF, 1, 1, 100, 0, 0, 0)
EVT_EXEC(N(unkDecorationScript))
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_NO_GAME_OVER, 1)
EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_2000000, 1)
EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_DONT_STOP_MUSIC, 1)
EVT_RETURN
EVT_END
};
@ -252,7 +252,7 @@ EvtScript N(handleEvent) = {
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_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET(LVar1, ANIM_BattleBowser_Idle)

View File

@ -324,7 +324,7 @@ EvtScript N(handleEvent) = {
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_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(func_80269E80, LVar2)
EVT_SWITCH(LVar2)

View File

@ -185,7 +185,7 @@ 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(SetBattleFlagBits2, BS_FLAGS2_400 | BS_FLAGS2_2000000, 1)
EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_400 | BS_FLAGS2_DONT_STOP_MUSIC, 1)
EVT_RETURN
EVT_END
};
@ -264,7 +264,7 @@ EvtScript N(handleEvent) = {
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0))
EVT_SET(LVar1, ANIM_BattleBowser_Walk)
EVT_EXEC_WAIT(N(returnHome))
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(func_80269E80, LVar2)
EVT_SWITCH(LVar2)

View File

@ -237,7 +237,7 @@ EvtScript N(init) = {
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(SetBattleFlagBits2, BS_FLAGS2_2000000, 1)
EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_DONT_STOP_MUSIC, 1)
EVT_RETURN
EVT_END
};
@ -403,7 +403,7 @@ EvtScript N(handleEvent) = {
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_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(func_80269E80, LVar2)
EVT_SWITCH(LVar2)

View File

@ -184,7 +184,7 @@ EvtScript N(handleEvent) = {
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_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -185,7 +185,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(DoShockHit)
EVT_EXEC_WAIT(N(explode))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -133,7 +133,7 @@ EvtScript N(handleEvent) = {
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_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -295,7 +295,7 @@ EvtScript N(handleEvent_80219500) = {
EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim07)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CASE_OR_EQ(EVENT_BURN_TAUNT)

View File

@ -280,7 +280,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(DoShockHit)
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_EXEC_WAIT(DoShockHit)
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_IF_NOT_FLAG(LVarE, DAMAGE_TYPE_FIRE)
EVT_EXEC_WAIT(N(onHitCombo))
EVT_END_IF

View File

@ -976,7 +976,7 @@ EvtScript N(handleEvent) = {
EVT_CASE_EQ(EVENT_SHOCK_DEATH)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_IF_NOT_FLAG(LVarE, DAMAGE_TYPE_FIRE)
EVT_EXEC_WAIT(N(onComboHit))
EVT_EXEC_WAIT(N(playHitAnimation))

View File

@ -170,7 +170,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim03)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -176,7 +176,7 @@ EvtScript N(handleEvent_80218584) = {
EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_HurtShock)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Idle)

View File

@ -184,7 +184,7 @@ EvtScript N(handleEvent_8021D60C) = {
EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim09)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -184,7 +184,7 @@ EvtScript N(handleEvent_80221C20) = {
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_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -185,7 +185,7 @@ EvtScript N(handleEvent_8021B028) = {
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Blue_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -185,7 +185,7 @@ EvtScript N(handleEvent_80220128) = {
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Green_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -198,7 +198,7 @@ EvtScript N(handleEvent_80224D10) = {
EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim08)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim01)

View File

@ -185,7 +185,7 @@ EvtScript N(handleEvent_8021E628) = {
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Pink_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -191,7 +191,7 @@ EvtScript N(handleEvent_8022CE60) = {
EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim06)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -430,7 +430,7 @@ EvtScript N(handleEvent_8022A398) = {
EVT_SET_CONST(LVar1, ANIM_SkyGuy_Anim0A)
EVT_EXEC_WAIT(N(80229A34))
EVT_RETURN
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CALL(func_8026E914, LVar0, LVar1)
EVT_IF_GE(LVar1, 3)
EVT_EXEC_WAIT(N(80229CB0))
@ -699,7 +699,7 @@ EvtScript N(handleEvent_8022B310) = {
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -250,7 +250,7 @@ EvtScript N(handleEvent_80227ABC) = {
EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, 2, LVar1)
EVT_IF_EQ(LVar1, 0)

View File

@ -185,7 +185,7 @@ EvtScript N(handleEvent_8021CB28) = {
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Yellow_Anim0C)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -226,7 +226,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim0E)
EVT_EXEC_WAIT(DoReturnHome)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -128,7 +128,7 @@ EvtScript N(handleEvent) = {
EVT_END_CASE_GROUP
EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT)
EVT_EXEC_WAIT(N(onHit))
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CALL(GetActorVar, ACTOR_ENEMY1, 9, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(func_8026E914, LVar0, LVar1)

View File

@ -255,7 +255,7 @@ EvtScript N(handleEvent) = {
EVT_CALL(SetPartFlagBits, ACTOR_ENEMY0, 1, ACTOR_PART_FLAG_INVISIBLE, 1)
EVT_CALL(PlayModelAnimation, 0, EVT_PTR(toy_tank_as_close_hatch))
EVT_CALL(PlaySoundAtPart, ACTOR_ENEMY0, 1, SOUND_206B)
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CALL(func_8026E914, LVar0, LVar1)
EVT_CALL(PlayModelAnimation, 0, EVT_PTR(toy_tank_as_close_hatch))
EVT_CALL(PlaySoundAtPart, ACTOR_ENEMY0, 1, SOUND_206B)

View File

@ -896,7 +896,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_SPIKE_TAUNT)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)

View File

@ -479,7 +479,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim06)
EVT_EXEC_WAIT(DoNormalHit)
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim06)
EVT_EXEC_WAIT(DoNormalHit)
@ -1016,7 +1016,7 @@ EvtScript N(shy_guy_handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -813,7 +813,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(N(onSpinSmashLaunchDeath))
EVT_RETURN
EVT_CASE_EQ(EVENT_SHOCK_HIT)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_SPIKE_TAUNT)
EVT_CALL(GetBattleFlags, LVar2)

View File

@ -131,7 +131,7 @@ EvtScript N(handleEvent) = {
EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_HIT)
EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_DEATH)
EVT_CASE_OR_EQ(EVENT_SHOCK_HIT)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_SPIKE_TAUNT)
EVT_CASE_OR_EQ(EVENT_DEATH)

View File

@ -802,7 +802,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_SPIKE_TAUNT)
EVT_SET_CONST(LVar0, 1)

View File

@ -422,7 +422,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim09)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(func_8026E914, LVar0, LVar1)
EVT_IF_EQ(LVar1, 2)

View File

@ -170,7 +170,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_AlbinoDino_Anim09)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -289,7 +289,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar2, -1)
EVT_END_IF
EVT_EXEC_WAIT(DoBurnHit)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -520,7 +520,7 @@ EvtScript N(OnDeath) = {
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_FLY_THREAD_ID), LVarA)
EVT_IS_THREAD_RUNNING(LVarA, LVar0)
EVT_IF_EQ(LVar0, BS_FLAGS1_1)
EVT_IF_EQ(LVar0, TRUE)
EVT_KILL_THREAD(LVarA)
EVT_END_IF
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_CLONE1_ID), LVar9)
@ -635,7 +635,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(DoBurnHit)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_CrystalKing_Anim19)
EVT_EXEC_WAIT(N(OnHit))
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim09)

View File

@ -187,7 +187,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim0E)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -204,7 +204,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim0B)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -141,7 +141,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(N(setAnim))
EVT_EXEC_WAIT(DoNormalHit)
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_BEGIN_AIR_LIFT)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)

View File

@ -255,7 +255,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_Monstar_Hurt)
EVT_EXEC_WAIT(N(OnDeath))
EVT_RETURN
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)

View File

@ -448,7 +448,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)

View File

@ -365,7 +365,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_HurtStill)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CALL(SetActorVar, ACTOR_SELF, 0, 1)
EVT_SET_CONST(LVar0, 2)
EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_ShellEnter)
@ -1000,7 +1000,7 @@ EvtScript N(handleEvent_koopa) = {
EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CALL(GetActorVar, ACTOR_SELF, 8, LVar0)
EVT_SWITCH(LVar0)

View File

@ -230,7 +230,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_STAR_BEAM)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -323,7 +323,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_STAR_BEAM)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 2)
@ -704,7 +704,7 @@ EvtScript N(handleEvent_gloomba) = {
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_STAR_BEAM)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -231,7 +231,7 @@ EvtScript N(handleEvent) = {
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_STAR_BEAM)
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -322,7 +322,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -346,7 +346,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_BabyBlooper_Anim03)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -430,7 +430,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CASE_OR_EQ(EVENT_1D)

View File

@ -381,7 +381,7 @@ EvtScript N(handleEvent) = {
EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04)
EVT_EXEC_WAIT(N(onDeath))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_CASE_OR_EQ(EVENT_1D)

View File

@ -142,7 +142,7 @@ EvtScript N(handleEvent_80219EE0) = {
EVT_SET_CONST(LVar1, ANIM_BillBlaster_Anim03)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -291,7 +291,7 @@ EvtScript N(handleEvent_8021ACE8) = {
EVT_SET(LVar2, -12345)
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_CASE_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_SET_CONST(LVar0, 1)
EVT_SET_CONST(LVar1, ANIM_Bobomb_Anim02)
EVT_EXEC_WAIT(DoImmune)
@ -428,7 +428,7 @@ EvtScript N(handleEvent_8021B4A8) = {
EVT_EXEC_WAIT(DoDeath)
EVT_RETURN
EVT_END_CASE_GROUP
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

View File

@ -185,7 +185,7 @@ EvtScript N(handleEvent_802193E8) = {
EVT_EXEC_WAIT(DoShockHit)
EVT_EXEC_WAIT(N(80219390))
EVT_RETURN
EVT_CASE_OR_EQ(EVENT_UNKNOWN_TRIGGER)
EVT_CASE_OR_EQ(EVENT_SCRIPTED_IMMUNE)
EVT_CASE_OR_EQ(EVENT_IMMUNE)
EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED)
EVT_SET_CONST(LVar0, 1)

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