label battle stuff
This commit is contained in:
+10
-10
@@ -3668,10 +3668,10 @@ static void TryDoEventsBeforeFirstTurn(void)
|
||||
|
||||
*(&gBattleStruct->turnEffectsTracker) = 0;
|
||||
*(&gBattleStruct->turnEffectsBank) = 0;
|
||||
*(&gBattleStruct->field_1A0) = 0;
|
||||
*(&gBattleStruct->field_1A1) = 0;
|
||||
*(&gBattleStruct->wishPerishSongState) = 0;
|
||||
*(&gBattleStruct->wishPerishSongBank) = 0;
|
||||
gBattleScripting.atk49_state = 0;
|
||||
gBattleStruct->field_4D = 0;
|
||||
gBattleStruct->faintedActionsState = 0;
|
||||
gBattleStruct->turncountersTracker = 0;
|
||||
gBattleMoveFlags = 0;
|
||||
|
||||
@@ -3701,8 +3701,8 @@ static void HandleEndTurn_ContinueBattle(void)
|
||||
}
|
||||
gBattleStruct->turnEffectsTracker = 0;
|
||||
gBattleStruct->turnEffectsBank = 0;
|
||||
gBattleStruct->field_1A0 = 0;
|
||||
gBattleStruct->field_1A1 = 0;
|
||||
gBattleStruct->wishPerishSongState = 0;
|
||||
gBattleStruct->wishPerishSongBank = 0;
|
||||
gBattleStruct->turncountersTracker = 0;
|
||||
gBattleMoveFlags = 0;
|
||||
}
|
||||
@@ -3720,10 +3720,10 @@ void BattleTurnPassed(void)
|
||||
if (TurnBasedEffects() != 0)
|
||||
return;
|
||||
}
|
||||
if (sub_8041728() != 0)
|
||||
if (HandleFaintedMonActions() != 0)
|
||||
return;
|
||||
gBattleStruct->field_4D = 0;
|
||||
if (sub_8041364() != 0)
|
||||
gBattleStruct->faintedActionsState = 0;
|
||||
if (HandleWishPerishSongOnTurnEnd() != 0)
|
||||
return;
|
||||
|
||||
TurnValuesCleanUp(FALSE);
|
||||
@@ -5565,9 +5565,9 @@ static void HandleAction_Action9(void)
|
||||
|
||||
static void HandleAction_Action11(void)
|
||||
{
|
||||
if (!sub_8041728())
|
||||
if (!HandleFaintedMonActions())
|
||||
{
|
||||
gBattleStruct->field_4D = 0;
|
||||
gBattleStruct->faintedActionsState = 0;
|
||||
gCurrentActionFuncId = ACTION_FINISHED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1053,7 +1053,7 @@ static void atk00_attackcanceler(void)
|
||||
|
||||
if (!(gHitMarker & HITMARKER_OBEYS) && !(gBattleMons[gBankAttacker].status2 & STATUS2_MULTIPLETURNS))
|
||||
{
|
||||
i = IsPokeDisobedient(); // why use the 'i' variable...?
|
||||
i = IsMonDisobedient(); // why use the 'i' variable...?
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
|
||||
+50
-50
@@ -1113,23 +1113,23 @@ u8 TurnBasedEffects(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool8 sub_8041364(void)
|
||||
bool8 HandleWishPerishSongOnTurnEnd(void)
|
||||
{
|
||||
gHitMarker |= (HITMARKER_GRUDGE | HITMARKER_x20);
|
||||
|
||||
switch (gBattleStruct->field_1A0)
|
||||
switch (gBattleStruct->wishPerishSongState)
|
||||
{
|
||||
case 0:
|
||||
while (gBattleStruct->field_1A1 < gNoOfAllBanks)
|
||||
while (gBattleStruct->wishPerishSongBank < gNoOfAllBanks)
|
||||
{
|
||||
gActiveBank = gBattleStruct->field_1A1;
|
||||
gActiveBank = gBattleStruct->wishPerishSongBank;
|
||||
if (gAbsentBankFlags & gBitTable[gActiveBank])
|
||||
{
|
||||
gBattleStruct->field_1A1++;
|
||||
gBattleStruct->wishPerishSongBank++;
|
||||
continue;
|
||||
}
|
||||
|
||||
gBattleStruct->field_1A1++;
|
||||
gBattleStruct->wishPerishSongBank++;
|
||||
if (gWishFutureKnock.futureSightCounter[gActiveBank] != 0
|
||||
&& --gWishFutureKnock.futureSightCounter[gActiveBank] == 0
|
||||
&& gBattleMons[gActiveBank].hp != 0)
|
||||
@@ -1157,21 +1157,21 @@ bool8 sub_8041364(void)
|
||||
}
|
||||
// Why do I have to keep doing this to match?
|
||||
{
|
||||
u8* var = &gBattleStruct->field_1A0;
|
||||
*var = 1;
|
||||
gBattleStruct->field_1A1 = 0;
|
||||
u8 *state = &gBattleStruct->wishPerishSongState;
|
||||
*state = 1;
|
||||
gBattleStruct->wishPerishSongBank = 0;
|
||||
}
|
||||
// fall through
|
||||
case 1:
|
||||
while (gBattleStruct->field_1A1 < gNoOfAllBanks)
|
||||
while (gBattleStruct->wishPerishSongBank < gNoOfAllBanks)
|
||||
{
|
||||
gActiveBank = gBankAttacker = gBanksByTurnOrder[gBattleStruct->field_1A1];
|
||||
gActiveBank = gBankAttacker = gBanksByTurnOrder[gBattleStruct->wishPerishSongBank];
|
||||
if (gAbsentBankFlags & gBitTable[gActiveBank])
|
||||
{
|
||||
gBattleStruct->field_1A1++;
|
||||
gBattleStruct->wishPerishSongBank++;
|
||||
continue;
|
||||
}
|
||||
gBattleStruct->field_1A1++;
|
||||
gBattleStruct->wishPerishSongBank++;
|
||||
if (gStatuses3[gActiveBank] & STATUS3_PERISH_SONG)
|
||||
{
|
||||
PREPARE_BYTE_NUMBER_BUFFER(gBattleTextBuff1, 1, gDisableStructs[gActiveBank].perishSongTimer1);
|
||||
@@ -1192,9 +1192,9 @@ bool8 sub_8041364(void)
|
||||
}
|
||||
// Hm...
|
||||
{
|
||||
u8* var = &gBattleStruct->field_1A0;
|
||||
*var = 2;
|
||||
gBattleStruct->field_1A1 = 0;
|
||||
u8 *state = &gBattleStruct->wishPerishSongState;
|
||||
*state = 2;
|
||||
gBattleStruct->wishPerishSongBank = 0;
|
||||
}
|
||||
// fall through
|
||||
case 2:
|
||||
@@ -1209,7 +1209,7 @@ bool8 sub_8041364(void)
|
||||
|
||||
gBattlescriptCurrInstr = BattleScript_82DB8F3;
|
||||
BattleScriptExecute(BattleScript_82DB8F3);
|
||||
gBattleStruct->field_1A0++;
|
||||
gBattleStruct->wishPerishSongState++;
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
@@ -1220,20 +1220,20 @@ bool8 sub_8041364(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#define sub_8041728_MAX_CASE 7
|
||||
#define FAINTED_ACTIONS_MAX_CASE 7
|
||||
|
||||
bool8 sub_8041728(void)
|
||||
bool8 HandleFaintedMonActions(void)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_SAFARI)
|
||||
return FALSE;
|
||||
do
|
||||
{
|
||||
int i;
|
||||
switch (gBattleStruct->field_4D)
|
||||
switch (gBattleStruct->faintedActionsState)
|
||||
{
|
||||
case 0:
|
||||
gBattleStruct->field_4E = 0;
|
||||
gBattleStruct->field_4D++;
|
||||
gBattleStruct->faintedActionsBank = 0;
|
||||
gBattleStruct->faintedActionsState++;
|
||||
for (i = 0; i < gNoOfAllBanks; i++)
|
||||
{
|
||||
if (gAbsentBankFlags & gBitTable[i] && !sub_80423F4(i, 6, 6))
|
||||
@@ -1243,58 +1243,58 @@ bool8 sub_8041728(void)
|
||||
case 1:
|
||||
do
|
||||
{
|
||||
gBank1 = gBankTarget = gBattleStruct->field_4E;
|
||||
if (gBattleMons[gBattleStruct->field_4E].hp == 0
|
||||
&& !(gBattleStruct->field_DF & gBitTable[gBattlePartyID[gBattleStruct->field_4E]])
|
||||
&& !(gAbsentBankFlags & gBitTable[gBattleStruct->field_4E]))
|
||||
gBank1 = gBankTarget = gBattleStruct->faintedActionsBank;
|
||||
if (gBattleMons[gBattleStruct->faintedActionsBank].hp == 0
|
||||
&& !(gBattleStruct->field_DF & gBitTable[gBattlePartyID[gBattleStruct->faintedActionsBank]])
|
||||
&& !(gAbsentBankFlags & gBitTable[gBattleStruct->faintedActionsBank]))
|
||||
{
|
||||
BattleScriptExecute(BattleScript_82DA7C4);
|
||||
gBattleStruct->field_4D = 2;
|
||||
BattleScriptExecute(BattleScript_GiveExp);
|
||||
gBattleStruct->faintedActionsState = 2;
|
||||
return TRUE;
|
||||
}
|
||||
} while (++gBattleStruct->field_4E != gNoOfAllBanks);
|
||||
gBattleStruct->field_4D = 3;
|
||||
} while (++gBattleStruct->faintedActionsBank != gNoOfAllBanks);
|
||||
gBattleStruct->faintedActionsState = 3;
|
||||
break;
|
||||
case 2:
|
||||
sub_803F9EC(gBank1);
|
||||
if (++gBattleStruct->field_4E == gNoOfAllBanks)
|
||||
gBattleStruct->field_4D = 3;
|
||||
if (++gBattleStruct->faintedActionsBank == gNoOfAllBanks)
|
||||
gBattleStruct->faintedActionsState = 3;
|
||||
else
|
||||
gBattleStruct->field_4D = 1;
|
||||
gBattleStruct->faintedActionsState = 1;
|
||||
break;
|
||||
case 3:
|
||||
gBattleStruct->field_4E = 0;
|
||||
gBattleStruct->field_4D++;
|
||||
gBattleStruct->faintedActionsBank = 0;
|
||||
gBattleStruct->faintedActionsState++;
|
||||
// fall through
|
||||
case 4:
|
||||
do
|
||||
{
|
||||
gBank1 = gBankTarget = gBattleStruct->field_4E;
|
||||
if (gBattleMons[gBattleStruct->field_4E].hp == 0
|
||||
&& !(gAbsentBankFlags & gBitTable[gBattleStruct->field_4E]))
|
||||
gBank1 = gBankTarget = gBattleStruct->faintedActionsBank;
|
||||
if (gBattleMons[gBattleStruct->faintedActionsBank].hp == 0
|
||||
&& !(gAbsentBankFlags & gBitTable[gBattleStruct->faintedActionsBank]))
|
||||
{
|
||||
BattleScriptExecute(BattleScript_82DA7CD);
|
||||
gBattleStruct->field_4D = 5;
|
||||
BattleScriptExecute(BattleScript_HandleFaintedMon);
|
||||
gBattleStruct->faintedActionsState = 5;
|
||||
return TRUE;
|
||||
}
|
||||
} while (++gBattleStruct->field_4E != gNoOfAllBanks);
|
||||
gBattleStruct->field_4D = 6;
|
||||
} while (++gBattleStruct->faintedActionsBank != gNoOfAllBanks);
|
||||
gBattleStruct->faintedActionsState = 6;
|
||||
break;
|
||||
case 5:
|
||||
if (++gBattleStruct->field_4E == gNoOfAllBanks)
|
||||
gBattleStruct->field_4D = 6;
|
||||
if (++gBattleStruct->faintedActionsBank == gNoOfAllBanks)
|
||||
gBattleStruct->faintedActionsState = 6;
|
||||
else
|
||||
gBattleStruct->field_4D = 4;
|
||||
gBattleStruct->faintedActionsState = 4;
|
||||
break;
|
||||
case 6:
|
||||
if (AbilityBattleEffects(ABILITYEFFECT_INTIMIDATE1, 0, 0, 0, 0) || AbilityBattleEffects(ABILITYEFFECT_TRACE, 0, 0, 0, 0) || ItemBattleEffects(1, 0, 1) || AbilityBattleEffects(ABILITYEFFECT_FORECAST, 0, 0, 0, 0))
|
||||
return TRUE;
|
||||
gBattleStruct->field_4D++;
|
||||
gBattleStruct->faintedActionsState++;
|
||||
break;
|
||||
case 7:
|
||||
case FAINTED_ACTIONS_MAX_CASE:
|
||||
break;
|
||||
}
|
||||
} while (gBattleStruct->field_4D != sub_8041728_MAX_CASE);
|
||||
} while (gBattleStruct->faintedActionsState != FAINTED_ACTIONS_MAX_CASE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -3182,7 +3182,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn)
|
||||
&& gBattleMoves[gCurrentMove].flags & FLAG_KINGSROCK_AFFECTED
|
||||
&& gBattleMons[gBankTarget].hp)
|
||||
{
|
||||
gBattleCommunication[MOVE_EFFECT_BYTE] = 8;
|
||||
gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_FLINCH;
|
||||
BattleScriptPushCursor();
|
||||
SetMoveEffect(0, 0);
|
||||
BattleScriptPop();
|
||||
@@ -3318,7 +3318,7 @@ static bool32 HasObedientBitSet(u8 bank)
|
||||
return GetMonData(&gPlayerParty[gBattlePartyID[bank]], MON_DATA_OBEDIENCE, NULL);
|
||||
}
|
||||
|
||||
u8 IsPokeDisobedient(void)
|
||||
u8 IsMonDisobedient(void)
|
||||
{
|
||||
s32 rnd;
|
||||
s32 calc;
|
||||
|
||||
+2
-6
@@ -6,19 +6,15 @@
|
||||
#include "event_data.h"
|
||||
#include "abilities.h"
|
||||
#include "rng.h"
|
||||
#include "battle_scripts.h"
|
||||
|
||||
extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT];
|
||||
extern u16 gBattlePartyID[BATTLE_BANKS_COUNT];
|
||||
extern u8 gUnknown_0203CF00[];
|
||||
extern const u8* gBattlescriptCurrInstr;
|
||||
extern const u8 *gBattlescriptCurrInstr;
|
||||
extern u8 gBattleCommunication[];
|
||||
extern u8 gActiveBank;
|
||||
|
||||
extern const u8 BattleScript_MoveUsedWokeUp[];
|
||||
extern const u8 BattleScript_MoveUsedIsFrozen[];
|
||||
extern const u8 BattleScript_MoveUsedUnfroze[];
|
||||
extern const u8 BattleScript_MoveUsedIsAsleep[];
|
||||
|
||||
extern void sub_81D55D0(void);
|
||||
extern void sub_81D5694(void);
|
||||
extern u8 pokemon_order_func(u8);
|
||||
|
||||
+23
-22
@@ -21,6 +21,7 @@
|
||||
#include "songs.h"
|
||||
#include "overworld.h"
|
||||
#include "battle_message.h"
|
||||
#include "battle_string_ids.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "bg.h"
|
||||
#include "link.h"
|
||||
@@ -771,7 +772,7 @@ static void Task_EvolutionScene(u8 taskID)
|
||||
{
|
||||
BufferMoveToLearnIntoBattleTextBuff2();
|
||||
PlayFanfare(BGM_FANFA1);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[3]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNLEARNEDMOVE - BATTLESTRINGS_ID_ADDER]);
|
||||
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
|
||||
gTasks[taskID].tLearnsFirstMove = 0x40; // re-used as a counter
|
||||
gTasks[taskID].tState++;
|
||||
@@ -788,7 +789,7 @@ static void Task_EvolutionScene(u8 taskID)
|
||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||
{
|
||||
BufferMoveToLearnIntoBattleTextBuff2();
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[4]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE1 - BATTLESTRINGS_ID_ADDER]);
|
||||
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
|
||||
gTasks[taskID].tLearnMoveState++;
|
||||
}
|
||||
@@ -796,7 +797,7 @@ static void Task_EvolutionScene(u8 taskID)
|
||||
case 1:
|
||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||
{
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[5]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE2 - BATTLESTRINGS_ID_ADDER]);
|
||||
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
|
||||
gTasks[taskID].tLearnMoveState++;
|
||||
}
|
||||
@@ -804,7 +805,7 @@ static void Task_EvolutionScene(u8 taskID)
|
||||
case 2:
|
||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||
{
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[6]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE3 - BATTLESTRINGS_ID_ADDER]);
|
||||
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
|
||||
gTasks[taskID].tData7 = 5;
|
||||
gTasks[taskID].tData8 = 10;
|
||||
@@ -881,7 +882,7 @@ static void Task_EvolutionScene(u8 taskID)
|
||||
u16 move = GetMonData(mon, var + MON_DATA_MOVE1);
|
||||
if (IsHMMove2(move))
|
||||
{
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[307]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_HMMOVESCANTBEFORGOTTEN - BATTLESTRINGS_ID_ADDER]);
|
||||
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
|
||||
gTasks[taskID].tLearnMoveState = 12;
|
||||
}
|
||||
@@ -897,14 +898,14 @@ static void Task_EvolutionScene(u8 taskID)
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[207]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_123POOF - BATTLESTRINGS_ID_ADDER]);
|
||||
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
|
||||
gTasks[taskID].tLearnMoveState++;
|
||||
break;
|
||||
case 8:
|
||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||
{
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[7]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNFORGOTMOVE - BATTLESTRINGS_ID_ADDER]);
|
||||
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
|
||||
gTasks[taskID].tLearnMoveState++;
|
||||
}
|
||||
@@ -912,20 +913,20 @@ static void Task_EvolutionScene(u8 taskID)
|
||||
case 9:
|
||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||
{
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[208]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_ANDELLIPSIS - BATTLESTRINGS_ID_ADDER]);
|
||||
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
|
||||
gTasks[taskID].tState = 20;
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[8]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_STOPLEARNINGMOVE - BATTLESTRINGS_ID_ADDER]);
|
||||
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
|
||||
gTasks[taskID].tData7 = 11;
|
||||
gTasks[taskID].tData8 = 0;
|
||||
gTasks[taskID].tLearnMoveState = 3;
|
||||
break;
|
||||
case 11:
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[9]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_DIDNOTLEARNMOVE - BATTLESTRINGS_ID_ADDER]);
|
||||
BattleHandleAddTextPrinter(gDisplayedStringBattle, 0);
|
||||
gTasks[taskID].tState = 15;
|
||||
break;
|
||||
@@ -1116,7 +1117,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
|
||||
{
|
||||
BufferMoveToLearnIntoBattleTextBuff2();
|
||||
PlayFanfare(BGM_FANFA1);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[3]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNLEARNEDMOVE - BATTLESTRINGS_ID_ADDER]);
|
||||
sub_807F1A8(0, gDisplayedStringBattle, 1);
|
||||
gTasks[taskID].tLearnsFirstMove = 0x40; // re-used as a counter
|
||||
gTasks[taskID].tState++;
|
||||
@@ -1133,7 +1134,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
|
||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||
{
|
||||
BufferMoveToLearnIntoBattleTextBuff2();
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[4]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE1 - BATTLESTRINGS_ID_ADDER]);
|
||||
sub_807F1A8(0, gDisplayedStringBattle, 1);
|
||||
gTasks[taskID].tLearnMoveState++;
|
||||
}
|
||||
@@ -1141,7 +1142,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
|
||||
case 1:
|
||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||
{
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[5]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE2 - BATTLESTRINGS_ID_ADDER]);
|
||||
sub_807F1A8(0, gDisplayedStringBattle, 1);
|
||||
gTasks[taskID].tLearnMoveState++;
|
||||
}
|
||||
@@ -1149,7 +1150,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
|
||||
case 2:
|
||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||
{
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[6]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE3 - BATTLESTRINGS_ID_ADDER]);
|
||||
sub_807F1A8(0, gDisplayedStringBattle, 1);
|
||||
gTasks[taskID].tData7 = 5;
|
||||
gTasks[taskID].tData8 = 9;
|
||||
@@ -1170,7 +1171,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
|
||||
{
|
||||
case 0:
|
||||
sEvoCursorPos = 0;
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[292]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_EMPTYSTRING3 - BATTLESTRINGS_ID_ADDER]);
|
||||
sub_807F1A8(0, gDisplayedStringBattle, 1);
|
||||
gTasks[taskID].tLearnMoveState = gTasks[taskID].tData7;
|
||||
if (gTasks[taskID].tLearnMoveState == 5)
|
||||
@@ -1179,7 +1180,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
|
||||
case 1:
|
||||
case -1:
|
||||
sEvoCursorPos = 1;
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[292]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_EMPTYSTRING3 - BATTLESTRINGS_ID_ADDER]);
|
||||
sub_807F1A8(0, gDisplayedStringBattle, 1);
|
||||
gTasks[taskID].tLearnMoveState = gTasks[taskID].tData8;
|
||||
break;
|
||||
@@ -1215,7 +1216,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
|
||||
u16 move = GetMonData(mon, var + MON_DATA_MOVE1);
|
||||
if (IsHMMove2(move))
|
||||
{
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[307]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_HMMOVESCANTBEFORGOTTEN - BATTLESTRINGS_ID_ADDER]);
|
||||
sub_807F1A8(0, gDisplayedStringBattle, 1);
|
||||
gTasks[taskID].tLearnMoveState = 11;
|
||||
}
|
||||
@@ -1225,7 +1226,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
|
||||
|
||||
RemoveMonPPBonus(mon, var);
|
||||
SetMonMoveSlot(mon, gMoveToLearn, var);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[207]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_123POOF - BATTLESTRINGS_ID_ADDER]);
|
||||
sub_807F1A8(0, gDisplayedStringBattle, 1);
|
||||
gTasks[taskID].tLearnMoveState++;
|
||||
}
|
||||
@@ -1235,7 +1236,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
|
||||
case 7:
|
||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||
{
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[7]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNFORGOTMOVE - BATTLESTRINGS_ID_ADDER]);
|
||||
sub_807F1A8(0, gDisplayedStringBattle, 1);
|
||||
gTasks[taskID].tLearnMoveState++;
|
||||
}
|
||||
@@ -1243,20 +1244,20 @@ static void Task_TradeEvolutionScene(u8 taskID)
|
||||
case 8:
|
||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||
{
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[208]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_ANDELLIPSIS - BATTLESTRINGS_ID_ADDER]);
|
||||
sub_807F1A8(0, gDisplayedStringBattle, 1);
|
||||
gTasks[taskID].tState = 18;
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[8]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_STOPLEARNINGMOVE - BATTLESTRINGS_ID_ADDER]);
|
||||
sub_807F1A8(0, gDisplayedStringBattle, 1);
|
||||
gTasks[taskID].tData7 = 10;
|
||||
gTasks[taskID].tData8 = 0;
|
||||
gTasks[taskID].tLearnMoveState = 3;
|
||||
break;
|
||||
case 10:
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[9]);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_DIDNOTLEARNMOVE - BATTLESTRINGS_ID_ADDER]);
|
||||
sub_807F1A8(0, gDisplayedStringBattle, 1);
|
||||
gTasks[taskID].tState = 13;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user