diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2018-03-30 08:46:22 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2018-03-30 08:46:22 -0400 |
commit | f1bae90be3aca017e19776c26906ddfd13147c0f (patch) | |
tree | 2ea2f3b18be57fe6f28e2ab85e2ff8ca5abbe1cc /src | |
parent | b7b58d04f074f4f30aaa22a630f0c25d4550a440 (diff) |
through ContestEffect_38
Diffstat (limited to 'src')
-rw-r--r-- | src/contest_effect.c | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/contest_effect.c b/src/contest_effect.c index 83ac56a14..1d4f9d448 100644 --- a/src/contest_effect.c +++ b/src/contest_effect.c @@ -679,3 +679,60 @@ __attribute__((naked)) void ContestEffect_35(void) "_080B89A0: .4byte gContestEffects"); } #endif + +void ContestEffect_36(void) +{ + if (shared192D0.unk0[shared192D0.unk11] != 0) + { + u16 move = curContestant->currMove; + int i; + + for (i = 0; i < 4; i++) + { + if (shared192D0.unk0[shared192D0.unk11] - 1 == shared192D0.unk0[i] && + gContestMoves[move].contestCategory != gContestMoves[sContestantStatus[i].currMove].contestCategory) + { + curContestant->appeal2 += gContestEffects[gContestMoves[move].effect].appeal * 2; + SetContestantStatusUnk13(shared192D0.unk11, 32); + break; + } + } + } +} + +void ContestEffect_37(void) +{ + if (shared192D0.unk0[shared192D0.unk11] != 0) + { + int i; + + for (i = 0; i < 4; i++) + { + if (shared192D0.unk0[shared192D0.unk11] - 1 == shared192D0.unk0[i]) + { + if (curContestant->appeal2 > sContestantStatus[i].appeal2) + { + curContestant->appeal2 *= 2; + SetContestantStatusUnk13(shared192D0.unk11, 33); + } + else if (curContestant->appeal2 < sContestantStatus[i].appeal2) + { + curContestant->appeal2 = 0; + SetContestantStatusUnk13(shared192D0.unk11, 34); + } + } + } + } +} + +void ContestEffect_38(void) +{ + if (curContestant->unkD < 30) + { + curContestant->unkD += 10; + curContestant->unk10_4 = 1; + SetContestantStatusUnk13(shared192D0.unk11, 35); + } + else + SetContestantStatusUnk13(shared192D0.unk11, 58); +} |