Merge pull request #1750 from LOuroboros/patch-2
Fixed switch syntax in Task_TryFieldPoisonWhiteOut
This commit is contained in:
+31
-31
@@ -67,40 +67,40 @@ static void Task_TryFieldPoisonWhiteOut(u8 taskId)
|
|||||||
s16 *data = gTasks[taskId].data;
|
s16 *data = gTasks[taskId].data;
|
||||||
switch (tState)
|
switch (tState)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
for (; tPartyIdx < PARTY_SIZE; tPartyIdx++)
|
for (; tPartyIdx < PARTY_SIZE; tPartyIdx++)
|
||||||
|
{
|
||||||
|
if (MonFaintedFromPoison(tPartyIdx))
|
||||||
{
|
{
|
||||||
if (MonFaintedFromPoison(tPartyIdx))
|
FaintFromFieldPoison(tPartyIdx);
|
||||||
{
|
ShowFieldMessage(gText_PkmnFainted_FldPsn);
|
||||||
FaintFromFieldPoison(tPartyIdx);
|
tState++;
|
||||||
ShowFieldMessage(gText_PkmnFainted_FldPsn);
|
return;
|
||||||
tState++;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tState = 2; // Finished checking party
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
// Wait for "{mon} fainted" message, then return to party loop
|
|
||||||
if (IsFieldMessageBoxHidden())
|
|
||||||
tState--;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
if (AllMonsFainted())
|
|
||||||
{
|
|
||||||
// Battle facilities have their own white out script to handle the challenge loss
|
|
||||||
if (InBattlePyramid() | InBattlePike() || InTrainerHillChallenge())
|
|
||||||
gSpecialVar_Result = FLDPSN_FRONTIER_WHITEOUT;
|
|
||||||
else
|
|
||||||
gSpecialVar_Result = FLDPSN_WHITEOUT;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
tState = 2; // Finished checking party
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// Wait for "{mon} fainted" message, then return to party loop
|
||||||
|
if (IsFieldMessageBoxHidden())
|
||||||
|
tState--;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (AllMonsFainted())
|
||||||
|
{
|
||||||
|
// Battle facilities have their own white out script to handle the challenge loss
|
||||||
|
if (InBattlePyramid() | InBattlePike() || InTrainerHillChallenge())
|
||||||
|
gSpecialVar_Result = FLDPSN_FRONTIER_WHITEOUT;
|
||||||
else
|
else
|
||||||
{
|
gSpecialVar_Result = FLDPSN_WHITEOUT;
|
||||||
gSpecialVar_Result = FLDPSN_NO_WHITEOUT;
|
}
|
||||||
}
|
else
|
||||||
ScriptContext_Enable();
|
{
|
||||||
DestroyTask(taskId);
|
gSpecialVar_Result = FLDPSN_NO_WHITEOUT;
|
||||||
break;
|
}
|
||||||
|
ScriptContext_Enable();
|
||||||
|
DestroyTask(taskId);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user