diff options
author | Marijn van der Werf <marijn.vanderwerf@gmail.com> | 2017-05-20 17:49:54 +0200 |
---|---|---|
committer | Marijn van der Werf <marijn.vanderwerf@gmail.com> | 2017-05-22 00:17:33 +0200 |
commit | 010eb456d63b0d644285f263f310d73bfb9646b2 (patch) | |
tree | 16f5e8fae87defe86f8ccc6bb9511105db2139fe /src/field_poison.c | |
parent | 009d4875fcc97e18dbbd74b5bd303dc5ccb81b1c (diff) |
Decrease indentation level of switches
Diffstat (limited to 'src/field_poison.c')
-rw-r--r-- | src/field_poison.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/field_poison.c b/src/field_poison.c index 8e49080b0..4d4d4b975 100644 --- a/src/field_poison.c +++ b/src/field_poison.c @@ -72,32 +72,32 @@ void Task_WhiteOut(u8 taskId) switch (taskData[TD_STATE]) { - case 0: //Check if Pokemon have fainted due to poison - while (taskData[TD_PARTY_MEMBER] < 6) + case 0: //Check if Pokemon have fainted due to poison + while (taskData[TD_PARTY_MEMBER] < 6) + { + if (CheckMonFaintedFromPoison(taskData[TD_PARTY_MEMBER])) { - if (CheckMonFaintedFromPoison(taskData[TD_PARTY_MEMBER])) - { - MonFaintFromPoisonOnField(taskData[TD_PARTY_MEMBER]); - ShowFieldMessage(fieldPoisonText_PokemonFainted); - taskData[TD_STATE]++; - return; - } - taskData[TD_PARTY_MEMBER]++; + MonFaintFromPoisonOnField(taskData[TD_PARTY_MEMBER]); + ShowFieldMessage(fieldPoisonText_PokemonFainted); + taskData[TD_STATE]++; + return; } - taskData[TD_STATE] = 2; - break; - case 1: //Wait for message box to disappear - if (IsFieldMessageBoxHidden()) - taskData[TD_STATE]--; //Check next party member - break; - case 2: //Done checking Pokemon - if (AllMonsFainted()) - gScriptResult = 1; - else - gScriptResult = 0; - EnableBothScriptContexts(); - DestroyTask(taskId); - break; + taskData[TD_PARTY_MEMBER]++; + } + taskData[TD_STATE] = 2; + break; + case 1: //Wait for message box to disappear + if (IsFieldMessageBoxHidden()) + taskData[TD_STATE]--; //Check next party member + break; + case 2: //Done checking Pokemon + if (AllMonsFainted()) + gScriptResult = 1; + else + gScriptResult = 0; + EnableBothScriptContexts(); + DestroyTask(taskId); + break; } } |