diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2018-03-30 10:42:20 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2018-03-30 10:42:20 -0400 |
commit | b71650219f89ce9d7de6d9377b9cd7c47e975b4d (patch) | |
tree | a1e68a8005dd2d289b71f700ebddf503edee3478 /src | |
parent | f1bae90be3aca017e19776c26906ddfd13147c0f (diff) |
through ContestEffect_40
Diffstat (limited to 'src')
-rw-r--r-- | src/contest_effect.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/contest_effect.c b/src/contest_effect.c index 1d4f9d448..fe6b18d99 100644 --- a/src/contest_effect.c +++ b/src/contest_effect.c @@ -736,3 +736,53 @@ void ContestEffect_38(void) else SetContestantStatusUnk13(shared192D0.unk11, 58); } + +void ContestEffect_39(void) +{ + curContestant->unk11_5 = TRUE; + if (curContestant->unkD != 0) + SetContestantStatusUnk13(shared192D0.unk11, 36); + else + SetContestantStatusUnk13(shared192D0.unk11, 59); +} + +void ContestEffect_40(void) +{ + s8 i; + s8 j; + u8 sp00[4]; + + if (sContest.turnNumber != 4) + { + for (i = 0; i < 4; i++) + sp00[i] = sContestantStatus[i].unk19; + + sp00[shared192D0.unk11] = 0xFF; + + for (i = 0; i < 4; i++) + { + for (j = 0; j < 4; j++) + { + if (j != shared192D0.unk11 && + i == sp00[j] && + sp00[j] == sContestantStatus[j].unk19) + { + sp00[j]++; + break; + } + } + if (j == 4) + break; + } + + sp00[shared192D0.unk11] = 0; + curContestant->unk10_6 = 1; + + for (i = 0; i < 4; i++) + { + sContestantStatus[i].unk19 = sp00[i]; + } + curContestant->unk11_0 = 1; + SetContestantStatusUnk13(shared192D0.unk11, 37); + } +} |