Made this build again

This commit is contained in:
LOuroboros 2023-02-27 07:45:01 -03:00
parent a54a8d9b2a
commit 8a036e6007
3 changed files with 10 additions and 10 deletions

View File

@ -3868,15 +3868,15 @@ void BattleTurnPassed(void)
BattleScriptExecute(BattleScript_ArenaTurnBeginning); BattleScriptExecute(BattleScript_ArenaTurnBeginning);
else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_LAST_LOW_HP))) else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_LAST_LOW_HP)))
BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2); BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2);
else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_LAST_HALF_HP)) else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_LAST_HALF_HP)))
BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2); BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2);
else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_FIRST_CRITICAL_HIT)) else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_FIRST_CRITICAL_HIT)))
BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2); BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2);
else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_FIRST_SUPER_EFFECTIVE_HIT)) else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_FIRST_SUPER_EFFECTIVE_HIT)))
BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2); BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2);
else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_FIRST_STAB_MOVE)) else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_FIRST_STAB_MOVE)))
BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2); BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2);
else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_PLAYER_MON_UNAFFECTED)) else if ((i = ShouldDoTrainerSlide(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), TRAINER_SLIDE_PLAYER_MON_UNAFFECTED)))
BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2); BattleScriptExecute(i == 1 ? BattleScript_TrainerASlideMsgEnd2 : BattleScript_TrainerBSlideMsgEnd2);
} }

View File

@ -3964,7 +3964,7 @@ u32 ShouldDoTrainerSlide(u32 battlerId, u32 which)
case TRAINER_SLIDE_LAST_LOW_HP: case TRAINER_SLIDE_LAST_LOW_HP:
if (sTrainerSlides[i].msgLastLowHp != NULL if (sTrainerSlides[i].msgLastLowHp != NULL
&& GetEnemyMonCount(firstId, lastId, TRUE) == 1 && GetEnemyMonCount(firstId, lastId, TRUE) == 1
&& IsBattlerHpLow(battlerId) && gBattleMons[battlerId].hp <= (gBattleMons[battlerId].maxHP / 4)
&& !gBattleStruct->trainerSlideLowHpMsgDone) && !gBattleStruct->trainerSlideLowHpMsgDone)
{ {
gBattleStruct->trainerSlideLowHpMsgDone = TRUE; gBattleStruct->trainerSlideLowHpMsgDone = TRUE;

View File

@ -11170,11 +11170,11 @@ static void Cmd_various(void)
case VARIOUS_TRY_TRAINER_SLIDE_MSG_Z_MOVE: case VARIOUS_TRY_TRAINER_SLIDE_MSG_Z_MOVE:
{ {
VARIOUS_ARGS(); VARIOUS_ARGS();
if (ShouldDoTrainerSlide(gActiveBattler, gTrainerBattleOpponent_A, TRAINER_SLIDE_Z_MOVE)) if ((i = ShouldDoTrainerSlide(gActiveBattler, TRAINER_SLIDE_Z_MOVE)))
{ {
gBattleScripting.battler = gActiveBattler; gBattleScripting.battler = gActiveBattler;
BattleScriptPush(cmd->nextInstr); BattleScriptPush(cmd->nextInstr);
gBattlescriptCurrInstr = BattleScript_TrainerSlideMsgRet; gBattlescriptCurrInstr = (i == 1 ? BattleScript_TrainerASlideMsgRet : BattleScript_TrainerBSlideMsgRet);
return; return;
} }
break; break;
@ -11182,11 +11182,11 @@ static void Cmd_various(void)
case VARIOUS_TRY_TRAINER_SLIDE_MSG_MEGA_EVOLUTION: case VARIOUS_TRY_TRAINER_SLIDE_MSG_MEGA_EVOLUTION:
{ {
VARIOUS_ARGS(); VARIOUS_ARGS();
if (ShouldDoTrainerSlide(gActiveBattler, gTrainerBattleOpponent_A, TRAINER_SLIDE_MEGA_EVOLUTION)) if ((i = ShouldDoTrainerSlide(gActiveBattler, TRAINER_SLIDE_MEGA_EVOLUTION)))
{ {
gBattleScripting.battler = gActiveBattler; gBattleScripting.battler = gActiveBattler;
BattleScriptPush(cmd->nextInstr); BattleScriptPush(cmd->nextInstr);
gBattlescriptCurrInstr = BattleScript_TrainerSlideMsgRet; gBattlescriptCurrInstr = (i == 1 ? BattleScript_TrainerASlideMsgRet : BattleScript_TrainerBSlideMsgRet);
return; return;
} }
break; break;