Continue new contest documentation

This commit is contained in:
GriffinR 2020-07-24 00:14:53 -04:00
parent 52a4428ba6
commit aca50c87be
16 changed files with 478 additions and 546 deletions

View File

@ -5,36 +5,42 @@
.byte \score .byte \score
.endm .endm
@ turn (AKA "Appeal No.") .macro get_appeal_num
.macro get_turn
.byte 0x01 .byte 0x01
.endm .endm
.macro if_turn_less_than param, addr .macro if_appeal_num_less_than param, addr
.byte 0x02 .byte 0x02
.byte \param .byte \param
.4byte \addr .4byte \addr
.endm .endm
.macro if_turn_more_than param, addr .macro if_appeal_num_more_than param, addr
.byte 0x03 .byte 0x03
.byte \param .byte \param
.4byte \addr .4byte \addr
.endm .endm
.macro if_turn_eq param, addr .macro if_appeal_num_eq param, addr
.byte 0x04 .byte 0x04
.byte \param .byte \param
.4byte \addr .4byte \addr
.endm .endm
.macro if_turn_not_eq param, addr .macro if_appeal_num_not_eq param, addr
.byte 0x05 .byte 0x05
.byte \param .byte \param
.4byte \addr .4byte \addr
.endm .endm
.macro if_last_appeal addr:req
if_appeal_num_eq CONTEST_LAST_APPEAL, \addr
.endm
.macro if_not_last_appeal addr:req
if_appeal_num_not_eq CONTEST_LAST_APPEAL, \addr
.endm
@ audience excitement @ audience excitement
.macro get_excitement .macro get_excitement
@ -65,7 +71,7 @@
.4byte \addr .4byte \addr
.endm .endm
@ the order that the user goes in the current turn @ the order that the user goes in the current appeal
.macro get_user_order .macro get_user_order
.byte 0x0B .byte 0x0B

View File

@ -1,4 +1,2 @@
.include "constants/gba_constants.inc" .include "constants/gba_constants.inc"
.include "constants/global.inc" .include "constants/global.inc"
.include "constants/contest_constants.inc"
.include "constants/contest_move_effects.inc"

View File

@ -1,68 +0,0 @@
.set CONTEST_COOL, 0x00
.set CONTEST_BEAUTY, 0x01
.set CONTEST_CUTE, 0x02
.set CONTEST_SMART, 0x03
.set CONTEST_TOUGH, 0x04
.set COMBO_STARTER_RAIN_DANCE, 0x01
.set COMBO_STARTER_RAGE, 0x02
.set COMBO_STARTER_FOCUS_ENERGY, 0x03
.set COMBO_STARTER_HYPNOSIS, 0x04
.set COMBO_STARTER_ENDURE, 0x05
.set COMBO_STARTER_HORN_ATTACK, 0x06
.set COMBO_STARTER_SWORDS_DANCE, 0x07
.set COMBO_STARTER_STOCKPILE, 0x08
.set COMBO_STARTER_SUNNY_DAY, 0x09
.set COMBO_STARTER_REST, 0x0A
.set COMBO_STARTER_VICE_GRIP, 0x0B
.set COMBO_STARTER_DEFENSE_CURL, 0x0C
.set COMBO_STARTER_CHARGE, 0x0D
.set COMBO_STARTER_ROCK_THROW, 0x0E
.set COMBO_STARTER_YAWN, 0x0F
.set COMBO_STARTER_SCARY_FACE, 0x10
.set COMBO_STARTER_POWDER_SNOW, 0x11
.set COMBO_STARTER_LOCK_ON, 0x12
.set COMBO_STARTER_SOFT_BOILED, 0x13
.set COMBO_STARTER_MEAN_LOOK, 0x14
.set COMBO_STARTER_SCRATCH, 0x15
.set COMBO_STARTER_GROWTH, 0x16
.set COMBO_STARTER_HAIL, 0x17
.set COMBO_STARTER_SANDSTORM, 0x18
.set COMBO_STARTER_BELLY_DRUM, 0x19
.set COMBO_STARTER_MIND_READER, 0x1A
.set COMBO_STARTER_DRAGON_BREATH, 0x1B
.set COMBO_STARTER_DRAGON_RAGE, 0x1C
.set COMBO_STARTER_DRAGON_DANCE, 0x1D
.set COMBO_STARTER_SURF, 0x1E
.set COMBO_STARTER_DIVE, 0x1F
.set COMBO_STARTER_STRING_SHOT, 0x20
.set COMBO_STARTER_LEER, 0x21
.set COMBO_STARTER_TAUNT, 0x22
.set COMBO_STARTER_CHARM, 0x23
.set COMBO_STARTER_HARDEN, 0x24
.set COMBO_STARTER_SING, 0x25
.set COMBO_STARTER_EARTHQUAKE, 0x26
.set COMBO_STARTER_DOUBLE_TEAM, 0x27
.set COMBO_STARTER_CURSE, 0x28
.set COMBO_STARTER_SWEET_SCENT, 0x29
.set COMBO_STARTER_SLUDGE, 0x2A
.set COMBO_STARTER_SLUDGE_BOMB, 0x2B
.set COMBO_STARTER_THUNDER_PUNCH, 0x2C
.set COMBO_STARTER_FIRE_PUNCH, 0x2D
.set COMBO_STARTER_ICE_PUNCH, 0x2E
.set COMBO_STARTER_PECK, 0x2F
.set COMBO_STARTER_METAL_SOUND, 0x30
.set COMBO_STARTER_MUD_SPORT, 0x31
.set COMBO_STARTER_WATER_SPORT, 0x32
.set COMBO_STARTER_BONE_CLUB, 0x33
.set COMBO_STARTER_BONEMERANG, 0x34
.set COMBO_STARTER_BONE_RUSH, 0x35
.set COMBO_STARTER_SAND_ATTACK, 0x36
.set COMBO_STARTER_MUD_SLAP, 0x37
.set COMBO_STARTER_FAKE_OUT, 0x38
.set COMBO_STARTER_PSYCHIC, 0x39
.set COMBO_STARTER_KINESIS, 0x3A
.set COMBO_STARTER_CONFUSION, 0x3B
.set COMBO_STARTER_POUND, 0x3C
.set COMBO_STARTER_SMOG, 0x3D
.set COMBO_STARTER_CALM_MIND, 0x3E

View File

@ -1,49 +0,0 @@
enum_start
enum CONTEST_EFFECT_HIGHLY_APPEALING @ 0
enum CONTEST_EFFECT_USER_MORE_EASILY_STARTLED @ 1
enum CONTEST_EFFECT_GREAT_APPEAL_BUT_NO_MORE_MOVES @ 2
enum CONTEST_EFFECT_REPETITION_NOT_BORING @ 3
enum CONTEST_EFFECT_AVOID_STARTLE_ONCE @ 4
enum CONTEST_EFFECT_AVOID_STARTLE @ 5
enum CONTEST_EFFECT_AVOID_STARTLE_SLIGHTLY @ 6
enum CONTEST_EFFECT_USER_LESS_EASILY_STARTLED @ 7
enum CONTEST_EFFECT_STARTLE_FRONT_MON @ 8
enum CONTEST_EFFECT_SLIGHTLY_STARTLE_PREV_MONS @ 9
enum CONTEST_EFFECT_STARTLE_PREV_MON @ 10
enum CONTEST_EFFECT_STARTLE_PREV_MONS @ 11
enum CONTEST_EFFECT_BADLY_STARTLE_FRONT_MON @ 12
enum CONTEST_EFFECT_BADLY_STARTLE_PREV_MONS @ 13
enum CONTEST_EFFECT_STARTLE_PREV_MON_2 @ 14
enum CONTEST_EFFECT_STARTLE_PREV_MONS_2 @ 15
enum CONTEST_EFFECT_SHIFT_JUDGE_ATTENTION @ 16
enum CONTEST_EFFECT_STARTLE_MON_WITH_JUDGES_ATTENTION @ 17
enum CONTEST_EFFECT_JAMS_OTHERS_BUT_MISS_ONE_TURN @ 18
enum CONTEST_EFFECT_STARTLE_MONS_SAME_TYPE_APPEAL @ 19
enum CONTEST_EFFECT_STARTLE_MONS_COOL_APPEAL @ 20
enum CONTEST_EFFECT_STARTLE_MONS_BEAUTY_APPEAL @ 21
enum CONTEST_EFFECT_STARTLE_MONS_CUTE_APPEAL @ 22
enum CONTEST_EFFECT_STARTLE_MONS_SMART_APPEAL @ 23
enum CONTEST_EFFECT_STARTLE_MONS_TOUGH_APPEAL @ 24
enum CONTEST_EFFECT_MAKE_FOLLOWING_MON_NERVOUS @ 25
enum CONTEST_EFFECT_MAKE_FOLLOWING_MONS_NERVOUS @ 26
enum CONTEST_EFFECT_WORSEN_CONDITION_OF_PREV_MONS @ 27
enum CONTEST_EFFECT_BADLY_STARTLES_MONS_IN_GOOD_CONDITION @ 28
enum CONTEST_EFFECT_BETTER_IF_FIRST @ 29
enum CONTEST_EFFECT_BETTER_IF_LAST @ 30
enum CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONES @ 31
enum CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONE @ 32
enum CONTEST_EFFECT_BETTER_WHEN_LATER @ 33
enum CONTEST_EFFECT_QUALITY_DEPENDS_ON_TIMING @ 34
enum CONTEST_EFFECT_BETTER_IF_SAME_TYPE @ 35
enum CONTEST_EFFECT_BETTER_IF_DIFF_TYPE @ 36
enum CONTEST_EFFECT_AFFECTED_BY_PREV_APPEAL @ 37
enum CONTEST_EFFECT_IMPROVE_CONDITION_PREVENT_NERVOUSNESS @ 38
enum CONTEST_EFFECT_BETTER_WITH_GOOD_CONDITION @ 39
enum CONTEST_EFFECT_NEXT_APPEAL_EARLIER @ 40
enum CONTEST_EFFECT_NEXT_APPEAL_LATER @ 41
enum CONTEST_EFFECT_MAKE_SCRAMBLING_TURN_ORDER_EASIER @ 42
enum CONTEST_EFFECT_SCRAMBLE_NEXT_TURN_ORDER @ 43
enum CONTEST_EFFECT_EXCITE_AUDIENCE_IN_ANY_CONTEST @ 44
enum CONTEST_EFFECT_BADLY_STARTLE_MONS_WITH_GOOD_APPEALS @ 45
enum CONTEST_EFFECT_BETTER_WHEN_AUDIENCE_EXCITED @ 46
enum CONTEST_EFFECT_DONT_EXCITE_AUDIENCE @ 47

View File

@ -1,9 +1,13 @@
#include "constants/global.h"
#include "constants/contest.h"
.include "asm/macros.inc" .include "asm/macros.inc"
.include "asm/macros/contest_ai_script.inc" .include "asm/macros/contest_ai_script.inc"
.include "constants/constants.inc" .include "constants/constants.inc"
.section script_data, "aw", %progbits .section script_data, "aw", %progbits
@ TODO
enum_start enum_start
enum MON_1 enum MON_1
enum MON_2 enum MON_2
@ -12,13 +16,13 @@
.align 2 .align 2
gContestAIChecks:: @ 82DE350 gContestAIChecks:: @ 82DE350
.4byte AI_CheckForBadMove // 0x00000001 .4byte AI_CheckForBadMove @ CONTEST_AI_CHECK_BAD_MOVE
.4byte AI_CheckForCombo // 0x00000002 .4byte AI_CheckForCombo @ CONTEST_AI_CHECK_COMBO
.4byte AI_CheckBoring // 0x00000004 .4byte AI_CheckBoring @ CONTEST_AI_CHECK_BORING
.4byte AI_CheckExcitement // 0x00000008 .4byte AI_CheckExcitement @ CONTEST_AI_CHECK_EXCITEMENT
.4byte AI_CheckOrder // 0x00000010 .4byte AI_CheckOrder @ CONTEST_AI_CHECK_ORDER
.4byte AI_CheckForGoodMove // 0x00000020 .4byte AI_CheckForGoodMove @ CONTEST_AI_CHECK_GOOD_MOVE
.4byte AI_Erratic // 0x00000040 .4byte AI_Erratic @ CONTEST_AI_ERRATIC
.4byte AI_Nothing // 0x00000080 .4byte AI_Nothing // 0x00000080
.4byte AI_Nothing // 0x00000100 .4byte AI_Nothing // 0x00000100
.4byte AI_Nothing // 0x00000200 .4byte AI_Nothing // 0x00000200
@ -47,9 +51,9 @@ gContestAIChecks:: @ 82DE350
@ Unreferenced AI routine to encourage moves that improve condition on the first @ Unreferenced AI routine to encourage moves that improve condition on the first
@ turn. Additionally, it checks the appeal order of the user and the effect @ appeal. Additionally, it checks the turn order of the user and the effect
@ type, but the code is buggy and doesnt affect the score. @ type, but the code is buggy and doesnt affect the score.
if_turn_not_eq 0, ContestUnreferenced_80 if_appeal_num_not_eq 0, ContestUnreferenced_80
if_effect_not_eq CONTEST_EFFECT_IMPROVE_CONDITION_PREVENT_NERVOUSNESS, ContestUnreferenced_80 if_effect_not_eq CONTEST_EFFECT_IMPROVE_CONDITION_PREVENT_NERVOUSNESS, ContestUnreferenced_80
score +10 score +10
ContestUnreferenced_80: ContestUnreferenced_80:
@ -64,11 +68,11 @@ ContestUnreferenced_end:
end end
@ Unreferenced AI routine that doesnt make much sense. @ Unreferenced AI routine that doesnt make much sense.
if_turn_eq 0, ContestUnreferenced_0F_1 if_appeal_num_eq 0, ContestUnreferenced_0F_1
if_turn_eq 1, ContestUnreferenced_0F_2 if_appeal_num_eq 1, ContestUnreferenced_0F_2
if_turn_eq 2, ContestUnreferenced_0F_3 if_appeal_num_eq 2, ContestUnreferenced_0F_3
if_turn_eq 3, ContestUnreferenced_0F_4 if_appeal_num_eq 3, ContestUnreferenced_0F_4
if_turn_eq 4, ContestUnreferenced_0F_5 if_last_appeal ContestUnreferenced_0F_5
end end
ContestUnreferenced_0F_1: ContestUnreferenced_0F_1:
if_user_order_not_eq MON_1, ContestUnreferenced_2B_1 if_user_order_not_eq MON_1, ContestUnreferenced_2B_1
@ -166,7 +170,7 @@ AI_contest7D_1_081DC2AB:
end end
AI_contest0F_2_081DC2AB: AI_contest0F_2_081DC2AB:
if_user_order_not_eq MON_1, AI_contest7D_3_081DC2AB if_user_order_not_eq MON_1, AI_contest7D_3_081DC2AB
if_turn_eq 4, AI_score_081DC2AB if_last_appeal AI_score_081DC2AB
AI_contest7D_2_081DC2AB: AI_contest7D_2_081DC2AB:
if_random 51, AI_end_081DC2AB if_random 51, AI_end_081DC2AB
score +10 score +10
@ -222,22 +226,22 @@ AI_score_081DC348:
score +25 score +25
end end
AI_contest04_1_081DC348: AI_contest04_1_081DC348:
if_turn_eq 4, AI_contest7D_081DC348 if_last_appeal AI_contest7D_081DC348
if_random 150, AI_end_081DC348 if_random 150, AI_end_081DC348
score +10 score +10
end end
AI_contest04_2_081DC348: AI_contest04_2_081DC348:
if_turn_eq 4, AI_contest7D_081DC348 if_last_appeal AI_contest7D_081DC348
if_random 125, AI_end_081DC348 if_random 125, AI_end_081DC348
score +10 score +10
end end
AI_contest04_3_081DC348: AI_contest04_3_081DC348:
if_turn_eq 4, AI_contest7D_081DC348 if_last_appeal AI_contest7D_081DC348
if_random 50, AI_end_081DC348 if_random 50, AI_end_081DC348
score +10 score +10
end end
AI_contest04_4_081DC348: AI_contest04_4_081DC348:
if_turn_eq 4, AI_contest7D_081DC348 if_last_appeal AI_contest7D_081DC348
score +10 score +10
end end
AI_contest7D_081DC348: AI_contest7D_081DC348:
@ -302,7 +306,7 @@ ContestEffect3:
if_random 50, ContestEffectEnd if_random 50, ContestEffectEnd
score +15 score +15
end end
if_turn_eq 4, ContestEffect3_7D if_last_appeal ContestEffect3_7D
if_random 220, ContestEffect3_score if_random 220, ContestEffect3_score
score +10 score +10
end end
@ -324,8 +328,8 @@ ContestEffect38_score1:
score -10 score -10
end end
ContestEffect38_contest04: ContestEffect38_contest04:
if_turn_eq 4, ContestEffect38_score2 if_last_appeal ContestEffect38_score2
if_turn_eq 0, ContestEffect38_random if_appeal_num_eq 0, ContestEffect38_random
if_move_used_count_eq 1, ContestEffectEnd if_move_used_count_eq 1, ContestEffectEnd
if_random 125, ContestEffectEnd if_random 125, ContestEffectEnd
score +10 score +10
@ -342,7 +346,7 @@ ContestEffect47:
if_move_used_count_eq 1, ContestEffectEnd if_move_used_count_eq 1, ContestEffectEnd
if_user_order_eq MON_1, ContestEffect47_random if_user_order_eq MON_1, ContestEffect47_random
if_user_order_eq MON_2, ContestEffect47_random if_user_order_eq MON_2, ContestEffect47_random
if_turn_not_eq 4, ContestEffectEnd if_not_last_appeal ContestEffectEnd
if_user_has_exciting_move ContestEffectEnd if_user_has_exciting_move ContestEffectEnd
if_excitement_less_than 1, ContestEffectEnd if_excitement_less_than 1, ContestEffectEnd
score +10 score +10
@ -409,7 +413,7 @@ ContestEffect46:
if_user_order_more_than MON_1, ContestEffect46_score4 if_user_order_more_than MON_1, ContestEffect46_score4
end end
ContestEffect46_05: ContestEffect46_05:
if_turn_not_eq 0, ContestEffect46_score1 if_appeal_num_not_eq 0, ContestEffect46_score1
if_excitement_eq 4, ContestEffect46_score2 if_excitement_eq 4, ContestEffect46_score2
if_excitement_eq 3, ContestEffect46_score3 if_excitement_eq 3, ContestEffect46_score3
end end
@ -566,7 +570,7 @@ ContestEffect_FollowingMonsNervous_CheckMon2:
end end
ContestEffect18: ContestEffect18:
if_turn_eq 4, ContestEffect18_score1 if_last_appeal ContestEffect18_score1
jump ContestEffect18_0E jump ContestEffect18_0E
end end
ContestEffect18_score1: ContestEffect18_score1:
@ -600,9 +604,9 @@ ContestEffectEnd:
@ Randomly encourage moves in Cute, Smart, and Tough contests. @ Randomly encourage moves in Cute, Smart, and Tough contests.
AI_Erratic: AI_Erratic:
if_contest_type_eq CONTEST_CUTE, Erratic_CuteSmartTough if_contest_type_eq CONTEST_CATEGORY_CUTE, Erratic_CuteSmartTough
if_contest_type_eq CONTEST_SMART, Erratic_CuteSmartTough if_contest_type_eq CONTEST_CATEGORY_SMART, Erratic_CuteSmartTough
if_contest_type_eq CONTEST_TOUGH, Erratic_CuteSmartTough if_contest_type_eq CONTEST_CATEGORY_TOUGH, Erratic_CuteSmartTough
end end
Erratic_CuteSmartTough: Erratic_CuteSmartTough:
if_random 125, Erratic_NoScoreIncrease if_random 125, Erratic_NoScoreIncrease
@ -763,11 +767,11 @@ ContestEffect2_4_score3:
end end
ContestEffect2_2: ContestEffect2_2:
if_turn_eq 0, ContestEffect2_2_score1 if_appeal_num_eq 0, ContestEffect2_2_score1
if_turn_eq 1, ContestEffect2_2_score2 if_appeal_num_eq 1, ContestEffect2_2_score2
if_turn_eq 2, ContestEffect2_2_score3 if_appeal_num_eq 2, ContestEffect2_2_score3
if_turn_eq 3, ContestEffect2_2_score4 if_appeal_num_eq 3, ContestEffect2_2_score4
if_turn_eq 4, ContestEffect2_2_score5 if_last_appeal ContestEffect2_2_score5
end end
ContestEffect2_2_score1: ContestEffect2_2_score1:
if_random 20, ContestEffectEnd2 if_random 20, ContestEffectEnd2

View File

@ -2,7 +2,8 @@
#define GUARD_CONSTANTS_CONTEST_H #define GUARD_CONSTANTS_CONTEST_H
#define APPLAUSE_METER_SIZE 5 #define APPLAUSE_METER_SIZE 5
#define CONTEST_TURN_COUNT 5 #define CONTEST_NUM_APPEALS 5
#define CONTEST_LAST_APPEAL (CONTEST_NUM_APPEALS - 1)
#define LINK_CONTEST_FLAG_IS_LINK (1 << 0) #define LINK_CONTEST_FLAG_IS_LINK (1 << 0)
#define LINK_CONTEST_FLAG_IS_WIRELESS (1 << 1) #define LINK_CONTEST_FLAG_IS_WIRELESS (1 << 1)
@ -44,4 +45,151 @@
#define CANT_ENTER_CONTEST_EGG 3 #define CANT_ENTER_CONTEST_EGG 3
#define CANT_ENTER_CONTEST_FAINTED 4 #define CANT_ENTER_CONTEST_FAINTED 4
#define CONTEST_AI_CHECK_BAD_MOVE (1 << 0)
#define CONTEST_AI_CHECK_COMBO (1 << 1)
#define CONTEST_AI_CHECK_BORING (1 << 2)
#define CONTEST_AI_CHECK_EXCITEMENT (1 << 3)
#define CONTEST_AI_CHECK_ORDER (1 << 4)
#define CONTEST_AI_CHECK_GOOD_MOVE (1 << 5)
#define CONTEST_AI_ERRATIC (1 << 6)
#define CONTEST_AI_DUMMY_1 (1 << 7)
#define CONTEST_AI_DUMMY_2 (1 << 8)
#define CONTEST_AI_DUMMY_3 (1 << 9)
#define CONTEST_AI_DUMMY_4 (1 << 10)
#define CONTEST_AI_DUMMY_5 (1 << 11)
#define CONTEST_AI_DUMMY_6 (1 << 12)
#define CONTEST_AI_DUMMY_7 (1 << 13)
#define CONTEST_AI_DUMMY_8 (1 << 14)
#define CONTEST_AI_DUMMY_9 (1 << 15)
#define CONTEST_AI_DUMMY_10 (1 << 16)
#define CONTEST_AI_DUMMY_11 (1 << 17)
#define CONTEST_AI_DUMMY_12 (1 << 18)
#define CONTEST_AI_DUMMY_13 (1 << 19)
#define CONTEST_AI_DUMMY_14 (1 << 20)
#define CONTEST_AI_DUMMY_15 (1 << 21)
#define CONTEST_AI_DUMMY_16 (1 << 22)
#define CONTEST_AI_DUMMY_17 (1 << 23)
#define CONTEST_AI_DUMMY_18 (1 << 24)
#define CONTEST_AI_DUMMY_19 (1 << 25)
#define CONTEST_AI_DUMMY_20 (1 << 26)
#define CONTEST_AI_DUMMY_21 (1 << 27)
#define CONTEST_AI_DUMMY_22 (1 << 28)
#define CONTEST_AI_DUMMY_23 (1 << 29)
#define CONTEST_AI_DUMMY_24 (1 << 30)
#define CONTEST_AI_DUMMY_25 (1 << 31)
#define CONTEST_AI_ALL (CONTEST_AI_CHECK_BAD_MOVE | CONTEST_AI_CHECK_COMBO | CONTEST_AI_CHECK_BORING | CONTEST_AI_CHECK_EXCITEMENT | CONTEST_AI_CHECK_ORDER | CONTEST_AI_CHECK_GOOD_MOVE | CONTEST_AI_ERRATIC)
#define CONTEST_AI_DUMMIES_1 (CONTEST_AI_DUMMY_1 | CONTEST_AI_DUMMY_2 | CONTEST_AI_DUMMY_3 | CONTEST_AI_DUMMY_4 | CONTEST_AI_DUMMY_5)
#define CONTEST_EFFECT_HIGHLY_APPEALING 0
#define CONTEST_EFFECT_USER_MORE_EASILY_STARTLED 1
#define CONTEST_EFFECT_GREAT_APPEAL_BUT_NO_MORE_MOVES 2
#define CONTEST_EFFECT_REPETITION_NOT_BORING 3
#define CONTEST_EFFECT_AVOID_STARTLE_ONCE 4
#define CONTEST_EFFECT_AVOID_STARTLE 5
#define CONTEST_EFFECT_AVOID_STARTLE_SLIGHTLY 6
#define CONTEST_EFFECT_USER_LESS_EASILY_STARTLED 7
#define CONTEST_EFFECT_STARTLE_FRONT_MON 8
#define CONTEST_EFFECT_SLIGHTLY_STARTLE_PREV_MONS 9
#define CONTEST_EFFECT_STARTLE_PREV_MON 10
#define CONTEST_EFFECT_STARTLE_PREV_MONS 11
#define CONTEST_EFFECT_BADLY_STARTLE_FRONT_MON 12
#define CONTEST_EFFECT_BADLY_STARTLE_PREV_MONS 13
#define CONTEST_EFFECT_STARTLE_PREV_MON_2 14
#define CONTEST_EFFECT_STARTLE_PREV_MONS_2 15
#define CONTEST_EFFECT_SHIFT_JUDGE_ATTENTION 16
#define CONTEST_EFFECT_STARTLE_MON_WITH_JUDGES_ATTENTION 17
#define CONTEST_EFFECT_JAMS_OTHERS_BUT_MISS_ONE_TURN 18
#define CONTEST_EFFECT_STARTLE_MONS_SAME_TYPE_APPEAL 19
#define CONTEST_EFFECT_STARTLE_MONS_COOL_APPEAL 20
#define CONTEST_EFFECT_STARTLE_MONS_BEAUTY_APPEAL 21
#define CONTEST_EFFECT_STARTLE_MONS_CUTE_APPEAL 22
#define CONTEST_EFFECT_STARTLE_MONS_SMART_APPEAL 23
#define CONTEST_EFFECT_STARTLE_MONS_TOUGH_APPEAL 24
#define CONTEST_EFFECT_MAKE_FOLLOWING_MON_NERVOUS 25
#define CONTEST_EFFECT_MAKE_FOLLOWING_MONS_NERVOUS 26
#define CONTEST_EFFECT_WORSEN_CONDITION_OF_PREV_MONS 27
#define CONTEST_EFFECT_BADLY_STARTLES_MONS_IN_GOOD_CONDITION 28
#define CONTEST_EFFECT_BETTER_IF_FIRST 29
#define CONTEST_EFFECT_BETTER_IF_LAST 30
#define CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONES 31
#define CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONE 32
#define CONTEST_EFFECT_BETTER_WHEN_LATER 33
#define CONTEST_EFFECT_QUALITY_DEPENDS_ON_TIMING 34
#define CONTEST_EFFECT_BETTER_IF_SAME_TYPE 35
#define CONTEST_EFFECT_BETTER_IF_DIFF_TYPE 36
#define CONTEST_EFFECT_AFFECTED_BY_PREV_APPEAL 37
#define CONTEST_EFFECT_IMPROVE_CONDITION_PREVENT_NERVOUSNESS 38
#define CONTEST_EFFECT_BETTER_WITH_GOOD_CONDITION 39
#define CONTEST_EFFECT_NEXT_APPEAL_EARLIER 40
#define CONTEST_EFFECT_NEXT_APPEAL_LATER 41
#define CONTEST_EFFECT_MAKE_SCRAMBLING_TURN_ORDER_EASIER 42
#define CONTEST_EFFECT_SCRAMBLE_NEXT_TURN_ORDER 43
#define CONTEST_EFFECT_EXCITE_AUDIENCE_IN_ANY_CONTEST 44
#define CONTEST_EFFECT_BADLY_STARTLE_MONS_WITH_GOOD_APPEALS 45
#define CONTEST_EFFECT_BETTER_WHEN_AUDIENCE_EXCITED 46
#define CONTEST_EFFECT_DONT_EXCITE_AUDIENCE 47
#define COMBO_STARTER_RAIN_DANCE 1
#define COMBO_STARTER_RAGE 2
#define COMBO_STARTER_FOCUS_ENERGY 3
#define COMBO_STARTER_HYPNOSIS 4
#define COMBO_STARTER_ENDURE 5
#define COMBO_STARTER_HORN_ATTACK 6
#define COMBO_STARTER_SWORDS_DANCE 7
#define COMBO_STARTER_STOCKPILE 8
#define COMBO_STARTER_SUNNY_DAY 9
#define COMBO_STARTER_REST 10
#define COMBO_STARTER_VICE_GRIP 11
#define COMBO_STARTER_DEFENSE_CURL 12
#define COMBO_STARTER_CHARGE 13
#define COMBO_STARTER_ROCK_THROW 14
#define COMBO_STARTER_YAWN 15
#define COMBO_STARTER_SCARY_FACE 16
#define COMBO_STARTER_POWDER_SNOW 17
#define COMBO_STARTER_LOCK_ON 18
#define COMBO_STARTER_SOFT_BOILED 19
#define COMBO_STARTER_MEAN_LOOK 20
#define COMBO_STARTER_SCRATCH 21
#define COMBO_STARTER_GROWTH 22
#define COMBO_STARTER_HAIL 23
#define COMBO_STARTER_SANDSTORM 24
#define COMBO_STARTER_BELLY_DRUM 25
#define COMBO_STARTER_MIND_READER 26
#define COMBO_STARTER_DRAGON_BREATH 27
#define COMBO_STARTER_DRAGON_RAGE 28
#define COMBO_STARTER_DRAGON_DANCE 29
#define COMBO_STARTER_SURF 30
#define COMBO_STARTER_DIVE 31
#define COMBO_STARTER_STRING_SHOT 32
#define COMBO_STARTER_LEER 33
#define COMBO_STARTER_TAUNT 34
#define COMBO_STARTER_CHARM 35
#define COMBO_STARTER_HARDEN 36
#define COMBO_STARTER_SING 37
#define COMBO_STARTER_EARTHQUAKE 38
#define COMBO_STARTER_DOUBLE_TEAM 39
#define COMBO_STARTER_CURSE 40
#define COMBO_STARTER_SWEET_SCENT 41
#define COMBO_STARTER_SLUDGE 42
#define COMBO_STARTER_SLUDGE_BOMB 43
#define COMBO_STARTER_THUNDER_PUNCH 44
#define COMBO_STARTER_FIRE_PUNCH 45
#define COMBO_STARTER_ICE_PUNCH 46
#define COMBO_STARTER_PECK 47
#define COMBO_STARTER_METAL_SOUND 48
#define COMBO_STARTER_MUD_SPORT 49
#define COMBO_STARTER_WATER_SPORT 50
#define COMBO_STARTER_BONE_CLUB 51
#define COMBO_STARTER_BONEMERANG 52
#define COMBO_STARTER_BONE_RUSH 53
#define COMBO_STARTER_SAND_ATTACK 54
#define COMBO_STARTER_MUD_SLAP 55
#define COMBO_STARTER_FAKE_OUT 56
#define COMBO_STARTER_PSYCHIC 57
#define COMBO_STARTER_KINESIS 58
#define COMBO_STARTER_CONFUSION 59
#define COMBO_STARTER_POUND 60
#define COMBO_STARTER_SMOG 61
#define COMBO_STARTER_CALM_MIND 62
#endif // GUARD_CONSTANTS_CONTEST_H #endif // GUARD_CONSTANTS_CONTEST_H

View File

@ -15,124 +15,6 @@ enum
CONTEST_DEBUG_MODE_PRINT_UNK_D CONTEST_DEBUG_MODE_PRINT_UNK_D
}; };
enum
{
CONTEST_EFFECT_HIGHLY_APPEALING,
CONTEST_EFFECT_USER_MORE_EASILY_STARTLED,
CONTEST_EFFECT_GREAT_APPEAL_BUT_NO_MORE_MOVES,
CONTEST_EFFECT_REPETITION_NOT_BORING,
CONTEST_EFFECT_AVOID_STARTLE_ONCE,
CONTEST_EFFECT_AVOID_STARTLE,
CONTEST_EFFECT_AVOID_STARTLE_SLIGHTLY,
CONTEST_EFFECT_USER_LESS_EASILY_STARTLED,
CONTEST_EFFECT_STARTLE_FRONT_MON,
CONTEST_EFFECT_SLIGHTLY_STARTLE_PREV_MONS,
CONTEST_EFFECT_STARTLE_PREV_MON,
CONTEST_EFFECT_STARTLE_PREV_MONS,
CONTEST_EFFECT_BADLY_STARTLE_FRONT_MON,
CONTEST_EFFECT_BADLY_STARTLE_PREV_MONS,
CONTEST_EFFECT_STARTLE_PREV_MON_2,
CONTEST_EFFECT_STARTLE_PREV_MONS_2,
CONTEST_EFFECT_SHIFT_JUDGE_ATTENTION,
CONTEST_EFFECT_STARTLE_MON_WITH_JUDGES_ATTENTION,
CONTEST_EFFECT_JAMS_OTHERS_BUT_MISS_ONE_TURN,
CONTEST_EFFECT_STARTLE_MONS_SAME_TYPE_APPEAL,
CONTEST_EFFECT_STARTLE_MONS_COOL_APPEAL,
CONTEST_EFFECT_STARTLE_MONS_BEAUTY_APPEAL,
CONTEST_EFFECT_STARTLE_MONS_CUTE_APPEAL,
CONTEST_EFFECT_STARTLE_MONS_SMART_APPEAL,
CONTEST_EFFECT_STARTLE_MONS_TOUGH_APPEAL,
CONTEST_EFFECT_MAKE_FOLLOWING_MON_NERVOUS,
CONTEST_EFFECT_MAKE_FOLLOWING_MONS_NERVOUS,
CONTEST_EFFECT_WORSEN_CONDITION_OF_PREV_MONS,
CONTEST_EFFECT_BADLY_STARTLES_MONS_IN_GOOD_CONDITION,
CONTEST_EFFECT_BETTER_IF_FIRST,
CONTEST_EFFECT_BETTER_IF_LAST,
CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONES,
CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONE,
CONTEST_EFFECT_BETTER_WHEN_LATER,
CONTEST_EFFECT_QUALITY_DEPENDS_ON_TIMING,
CONTEST_EFFECT_BETTER_IF_SAME_TYPE,
CONTEST_EFFECT_BETTER_IF_DIFF_TYPE,
CONTEST_EFFECT_AFFECTED_BY_PREV_APPEAL,
CONTEST_EFFECT_IMPROVE_CONDITION_PREVENT_NERVOUSNESS,
CONTEST_EFFECT_BETTER_WITH_GOOD_CONDITION,
CONTEST_EFFECT_NEXT_APPEAL_EARLIER,
CONTEST_EFFECT_NEXT_APPEAL_LATER,
CONTEST_EFFECT_MAKE_SCRAMBLING_TURN_ORDER_EASIER,
CONTEST_EFFECT_SCRAMBLE_NEXT_TURN_ORDER,
CONTEST_EFFECT_EXCITE_AUDIENCE_IN_ANY_CONTEST,
CONTEST_EFFECT_BADLY_STARTLE_MONS_WITH_GOOD_APPEALS,
CONTEST_EFFECT_BETTER_WHEN_AUDIENCE_EXCITED,
CONTEST_EFFECT_DONT_EXCITE_AUDIENCE
};
enum
{
COMBO_STARTER_RAIN_DANCE = 1,
COMBO_STARTER_RAGE,
COMBO_STARTER_FOCUS_ENERGY,
COMBO_STARTER_HYPNOSIS,
COMBO_STARTER_ENDURE,
COMBO_STARTER_HORN_ATTACK,
COMBO_STARTER_SWORDS_DANCE,
COMBO_STARTER_STOCKPILE,
COMBO_STARTER_SUNNY_DAY,
COMBO_STARTER_REST,
COMBO_STARTER_VICE_GRIP,
COMBO_STARTER_DEFENSE_CURL,
COMBO_STARTER_CHARGE,
COMBO_STARTER_ROCK_THROW,
COMBO_STARTER_YAWN,
COMBO_STARTER_SCARY_FACE,
COMBO_STARTER_POWDER_SNOW,
COMBO_STARTER_LOCK_ON,
COMBO_STARTER_SOFT_BOILED,
COMBO_STARTER_MEAN_LOOK,
COMBO_STARTER_SCRATCH,
COMBO_STARTER_GROWTH,
COMBO_STARTER_HAIL,
COMBO_STARTER_SANDSTORM,
COMBO_STARTER_BELLY_DRUM,
COMBO_STARTER_MIND_READER,
COMBO_STARTER_DRAGON_BREATH,
COMBO_STARTER_DRAGON_RAGE,
COMBO_STARTER_DRAGON_DANCE,
COMBO_STARTER_SURF,
COMBO_STARTER_DIVE,
COMBO_STARTER_STRING_SHOT,
COMBO_STARTER_LEER,
COMBO_STARTER_TAUNT,
COMBO_STARTER_CHARM,
COMBO_STARTER_HARDEN,
COMBO_STARTER_SING,
COMBO_STARTER_EARTHQUAKE,
COMBO_STARTER_DOUBLE_TEAM,
COMBO_STARTER_CURSE,
COMBO_STARTER_SWEET_SCENT,
COMBO_STARTER_SLUDGE,
COMBO_STARTER_SLUDGE_BOMB,
COMBO_STARTER_THUNDER_PUNCH,
COMBO_STARTER_FIRE_PUNCH,
COMBO_STARTER_ICE_PUNCH,
COMBO_STARTER_PECK,
COMBO_STARTER_METAL_SOUND,
COMBO_STARTER_MUD_SPORT,
COMBO_STARTER_WATER_SPORT,
COMBO_STARTER_BONE_CLUB,
COMBO_STARTER_BONEMERANG,
COMBO_STARTER_BONE_RUSH,
COMBO_STARTER_SAND_ATTACK,
COMBO_STARTER_MUD_SLAP,
COMBO_STARTER_FAKE_OUT,
COMBO_STARTER_PSYCHIC,
COMBO_STARTER_KINESIS,
COMBO_STARTER_CONFUSION,
COMBO_STARTER_POUND,
COMBO_STARTER_SMOG,
COMBO_STARTER_CALM_MIND
};
enum enum
{ {
CONTEST_STRING_MORE_CONSCIOUS, CONTEST_STRING_MORE_CONSCIOUS,
@ -255,7 +137,7 @@ struct ContestStruct_field_18
struct Contest struct Contest
{ {
u8 playerMoveChoice; u8 playerMoveChoice;
u8 turnNumber; u8 appealNumber;
u8 unused2[CONTESTANT_COUNT]; u8 unused2[CONTESTANT_COUNT];
bool16 unk1920A_0:1; // Task active flags? bool16 unk1920A_0:1; // Task active flags?
bool16 unk1920A_1:1; bool16 unk1920A_1:1;
@ -273,14 +155,14 @@ struct Contest
u8 unk19211; u8 unk19211;
u8 unk19212; u8 unk19212;
u8 filler19213; u8 filler19213;
u8 unk19214; u8 turnNumber;
u8 unk19215; u8 currentContestant;
u8 unk19216; // sprite ID u8 unk19216; // sprite ID
s8 applauseLevel; s8 applauseLevel;
u8 prevTurnOrder[CONTESTANT_COUNT]; u8 prevTurnOrder[CONTESTANT_COUNT];
u32 unk1921C; // saved RNG value? u32 unk1921C; // saved RNG value?
u16 moveHistory[CONTEST_TURN_COUNT][CONTESTANT_COUNT]; u16 moveHistory[CONTEST_NUM_APPEALS][CONTESTANT_COUNT];
u8 excitementHistory[CONTEST_TURN_COUNT][CONTESTANT_COUNT]; u8 excitementHistory[CONTEST_NUM_APPEALS][CONTESTANT_COUNT];
u8 applauseMeterSpriteId; u8 applauseMeterSpriteId;
u8 contestSetupState; u8 contestSetupState;
u8 unk1925E; u8 unk1925E;
@ -431,9 +313,9 @@ struct ContestResources
#define eUnknownHeap1A004 (*(struct Shared1A004 *)(gHeap + 0x1a004)) #define eUnknownHeap1A004 (*(struct Shared1A004 *)(gHeap + 0x1a004))
extern struct ContestPokemon gContestMons[CONTESTANT_COUNT]; extern struct ContestPokemon gContestMons[CONTESTANT_COUNT];
extern s16 gContestMonConditions[CONTESTANT_COUNT]; extern s16 gContestMonRound1Points[CONTESTANT_COUNT];
extern s16 gContestMonTotalPoints[CONTESTANT_COUNT]; extern s16 gContestMonTotalPoints[CONTESTANT_COUNT];
extern s16 gUnknown_02039F10[CONTESTANT_COUNT]; extern s16 gContestMonAppealPointTotals[CONTESTANT_COUNT];
extern s16 gContestMonRound2Points[CONTESTANT_COUNT]; extern s16 gContestMonRound2Points[CONTESTANT_COUNT];
extern u8 gContestFinalStandings[CONTESTANT_COUNT]; extern u8 gContestFinalStandings[CONTESTANT_COUNT];
extern u8 gContestMonPartyIndex; extern u8 gContestMonPartyIndex;
@ -457,8 +339,8 @@ void ResetLinkContestBoolean(void);
void LoadContestBgAfterMoveAnim(void); void LoadContestBgAfterMoveAnim(void);
void CB2_StartContest(void); void CB2_StartContest(void);
void CreateContestMonFromParty(u8 partyIndex); void CreateContestMonFromParty(u8 partyIndex);
void sub_80DAB8C(u8 contestType, u8 rank); void SetContestants(u8 contestType, u8 rank);
void sub_80DACBC(u8 contestType, u8 rank, bool32 isPostgame); void SetLinkAIContestants(u8 contestType, u8 rank, bool32 isPostgame);
u8 GetContestEntryEligibility(struct Pokemon *pkmn); u8 GetContestEntryEligibility(struct Pokemon *pkmn);
void sub_80DB09C(u8 contestCategory); void sub_80DB09C(u8 contestCategory);
bool8 IsSpeciesNotUnown(u16 species); bool8 IsSpeciesNotUnown(u16 species);

View File

@ -3,7 +3,7 @@
void sub_80FCC88(u8); void sub_80FCC88(u8);
void sub_80FCC88(u8); void sub_80FCC88(u8);
void sub_80FCACC(u8); void Task_LinkContest_CommunicateFinalStandings(u8);
void sub_80FC580(u8); void sub_80FC580(u8);
void sub_80FC6BC(u8); void sub_80FC6BC(u8);
void sub_80FC804(u8); void sub_80FC804(u8);
@ -11,8 +11,8 @@ void sub_80FCE48(u8);
void sub_80FC894(u8); void sub_80FC894(u8);
void Task_LinkContest_CommunicateMonIdxs(u8 taskId); void Task_LinkContest_CommunicateMonIdxs(u8 taskId);
void sub_81D9DE4(u8 taskId); void sub_81D9DE4(u8 taskId);
void sub_80FCF40(u8); void Task_LinkContest_CommunicateRound1Points(u8);
void sub_80FCFD0(u8); void Task_LinkContest_CommunicateTurnOrder(u8);
void sub_80F8714(u8); void sub_80F8714(u8);
bool32 sub_80FC670(s16 *); bool32 sub_80FC670(s16 *);
bool32 LinkContest_SendBlock(void *, u16); bool32 LinkContest_SendBlock(void *, u16);

File diff suppressed because it is too large Load Diff

View File

@ -10,11 +10,11 @@ extern const u8 *gAIScriptPtr;
extern const u8 *gContestAIChecks[]; extern const u8 *gContestAIChecks[];
static void ContestAICmd_score(void); static void ContestAICmd_score(void);
static void ContestAICmd_get_turn(void); static void ContestAICmd_get_appeal_num(void);
static void ContestAICmd_if_turn_less_than(void); static void ContestAICmd_if_appeal_num_less_than(void);
static void ContestAICmd_if_turn_more_than(void); static void ContestAICmd_if_appeal_num_more_than(void);
static void ContestAICmd_if_turn_eq(void); static void ContestAICmd_if_appeal_num_eq(void);
static void ContestAICmd_if_turn_not_eq(void); static void ContestAICmd_if_appeal_num_not_eq(void);
static void ContestAICmd_get_excitement(void); static void ContestAICmd_get_excitement(void);
static void ContestAICmd_if_excitement_less_than(void); static void ContestAICmd_if_excitement_less_than(void);
static void ContestAICmd_if_excitement_more_than(void); static void ContestAICmd_if_excitement_more_than(void);
@ -151,11 +151,11 @@ typedef void (* ContestAICmdFunc)(void);
static const ContestAICmdFunc sContestAICmdTable[] = static const ContestAICmdFunc sContestAICmdTable[] =
{ {
ContestAICmd_score, // 0x00 ContestAICmd_score, // 0x00
ContestAICmd_get_turn, // 0x01 ContestAICmd_get_appeal_num, // 0x01
ContestAICmd_if_turn_less_than, // 0x02 ContestAICmd_if_appeal_num_less_than, // 0x02
ContestAICmd_if_turn_more_than, // 0x03 ContestAICmd_if_appeal_num_more_than, // 0x03
ContestAICmd_if_turn_eq, // 0x04 ContestAICmd_if_appeal_num_eq, // 0x04
ContestAICmd_if_turn_not_eq, // 0x05 ContestAICmd_if_appeal_num_not_eq, // 0x05
ContestAICmd_get_excitement, // 0x06 ContestAICmd_get_excitement, // 0x06
ContestAICmd_if_excitement_less_than, // 0x07 ContestAICmd_if_excitement_less_than, // 0x07
ContestAICmd_if_excitement_more_than, // 0x08 ContestAICmd_if_excitement_more_than, // 0x08
@ -324,7 +324,7 @@ u8 ContestAI_GetActionToUse(void)
{ {
// Randomly choose a move index. If it's the move // Randomly choose a move index. If it's the move
// with the highest (or tied highest) score, return // with the highest (or tied highest) score, return
u8 moveIdx = Random() & (MAX_MON_MOVES - 1); // % 4 doesn't match u8 moveIdx = Random() & (MAX_MON_MOVES - 1); // % MAX_MON_MOVES doesn't match
u8 score = eContestAI.moveScores[moveIdx]; u8 score = eContestAI.moveScores[moveIdx];
int i; int i;
for (i = 0; i < MAX_MON_MOVES; i++) for (i = 0; i < MAX_MON_MOVES; i++)
@ -404,15 +404,15 @@ static void ContestAICmd_score(void)
gAIScriptPtr += 2; gAIScriptPtr += 2;
} }
static void ContestAICmd_get_turn(void) static void ContestAICmd_get_appeal_num(void)
{ {
eContestAI.scriptResult = eContest.turnNumber; eContestAI.scriptResult = eContest.appealNumber;
gAIScriptPtr += 1; gAIScriptPtr += 1;
} }
static void ContestAICmd_if_turn_less_than(void) static void ContestAICmd_if_appeal_num_less_than(void)
{ {
ContestAICmd_get_turn(); ContestAICmd_get_appeal_num();
if (eContestAI.scriptResult < gAIScriptPtr[0]) if (eContestAI.scriptResult < gAIScriptPtr[0])
gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1); gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
@ -420,9 +420,9 @@ static void ContestAICmd_if_turn_less_than(void)
gAIScriptPtr += 5; gAIScriptPtr += 5;
} }
static void ContestAICmd_if_turn_more_than(void) static void ContestAICmd_if_appeal_num_more_than(void)
{ {
ContestAICmd_get_turn(); ContestAICmd_get_appeal_num();
if (eContestAI.scriptResult > gAIScriptPtr[0]) if (eContestAI.scriptResult > gAIScriptPtr[0])
gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1); gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
@ -430,9 +430,9 @@ static void ContestAICmd_if_turn_more_than(void)
gAIScriptPtr += 5; gAIScriptPtr += 5;
} }
static void ContestAICmd_if_turn_eq(void) static void ContestAICmd_if_appeal_num_eq(void)
{ {
ContestAICmd_get_turn(); ContestAICmd_get_appeal_num();
if (eContestAI.scriptResult == gAIScriptPtr[0]) if (eContestAI.scriptResult == gAIScriptPtr[0])
gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1); gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
@ -440,9 +440,9 @@ static void ContestAICmd_if_turn_eq(void)
gAIScriptPtr += 5; gAIScriptPtr += 5;
} }
static void ContestAICmd_if_turn_not_eq(void) static void ContestAICmd_if_appeal_num_not_eq(void)
{ {
ContestAICmd_get_turn(); ContestAICmd_get_appeal_num();
if (eContestAI.scriptResult != gAIScriptPtr[0]) if (eContestAI.scriptResult != gAIScriptPtr[0])
gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1); gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
@ -636,7 +636,7 @@ static void ContestAICmd_unk_19(void)
static void ContestAICmd_unk_1A(void) static void ContestAICmd_unk_1A(void)
{ {
eContestAI.scriptResult = gContestMonConditions[eContestAI.contestantId]; eContestAI.scriptResult = gContestMonRound1Points[eContestAI.contestantId];
gAIScriptPtr += 1; gAIScriptPtr += 1;
} }
@ -1357,7 +1357,7 @@ static void ContestAICmd_unk_5E(void)
{ {
u8 contestant = GetContestantIdByTurn(gAIScriptPtr[1]); u8 contestant = GetContestantIdByTurn(gAIScriptPtr[1]);
eContestAI.scriptResult = gContestMonConditions[contestant] - gContestMonConditions[eContestAI.contestantId]; eContestAI.scriptResult = gContestMonRound1Points[contestant] - gContestMonRound1Points[eContestAI.contestantId];
gAIScriptPtr += 2; gAIScriptPtr += 2;
} }

View File

@ -750,7 +750,7 @@ static void ContestEffect_NextAppealEarlier(void)
s8 j; s8 j;
u8 turnOrder[CONTESTANT_COUNT]; u8 turnOrder[CONTESTANT_COUNT];
if (eContest.turnNumber != 4) if (eContest.appealNumber != CONTEST_LAST_APPEAL)
{ {
for (i = 0; i < CONTESTANT_COUNT; i++) for (i = 0; i < CONTESTANT_COUNT; i++)
turnOrder[i] = eContestantStatus[i].nextTurnOrder; turnOrder[i] = eContestantStatus[i].nextTurnOrder;
@ -792,7 +792,7 @@ static void ContestEffect_NextAppealLater(void)
s8 j; s8 j;
u8 turnOrder[CONTESTANT_COUNT]; u8 turnOrder[CONTESTANT_COUNT];
if (eContest.turnNumber != 4) if (eContest.appealNumber != CONTEST_LAST_APPEAL)
{ {
for (i = 0; i < CONTESTANT_COUNT; i++) for (i = 0; i < CONTESTANT_COUNT; i++)
turnOrder[i] = eContestantStatus[i].nextTurnOrder; turnOrder[i] = eContestantStatus[i].nextTurnOrder;
@ -841,7 +841,7 @@ static void ContestEffect_ScrambleNextTurnOrder(void)
u8 turnOrder[CONTESTANT_COUNT]; u8 turnOrder[CONTESTANT_COUNT];
u8 unselectedContestants[CONTESTANT_COUNT]; u8 unselectedContestants[CONTESTANT_COUNT];
if (eContest.turnNumber != 4) if (eContest.appealNumber != CONTEST_LAST_APPEAL)
{ {
for (i = 0; i < CONTESTANT_COUNT; i++) for (i = 0; i < CONTESTANT_COUNT; i++)
{ {

View File

@ -297,7 +297,7 @@ void Task_LinkContest_CommunicateMoveSelections(u8 taskId)
} }
} }
void sub_80FCACC(u8 taskId) void Task_LinkContest_CommunicateFinalStandings(u8 taskId)
{ {
switch (gTasks[taskId].tState) switch (gTasks[taskId].tState)
{ {
@ -328,14 +328,14 @@ void sub_80FCACC(u8 taskId)
case 3: case 3:
if (IsLinkTaskFinished()) if (IsLinkTaskFinished())
{ {
if (LinkContest_SendBlock(gUnknown_02039F10, sizeof(gUnknown_02039F10)) == 1) if (LinkContest_SendBlock(gContestMonAppealPointTotals, sizeof(gContestMonAppealPointTotals)) == 1)
gTasks[taskId].tState++; gTasks[taskId].tState++;
} }
break; break;
case 4: case 4:
if (LinkContest_GetBlockReceivedFromAllPlayers()) if (LinkContest_GetBlockReceivedFromAllPlayers())
{ {
memcpy(gUnknown_02039F10, gBlockRecvBuffer[gUnknown_02039F2B], sizeof(gUnknown_02039F10)); memcpy(gContestMonAppealPointTotals, gBlockRecvBuffer[gUnknown_02039F2B], sizeof(gContestMonAppealPointTotals));
gTasks[taskId].tState++; gTasks[taskId].tState++;
} }
break; break;
@ -381,14 +381,14 @@ void sub_80FCC88(u8 taskId)
case 0: case 0:
if (IsLinkTaskFinished()) if (IsLinkTaskFinished())
{ {
if (LinkContest_SendBlock(eContestantStatus, 4 * sizeof(struct ContestantStatus)) == 1) if (LinkContest_SendBlock(eContestantStatus, CONTESTANT_COUNT * sizeof(struct ContestantStatus)) == 1)
gTasks[taskId].tState++; gTasks[taskId].tState++;
} }
break; break;
case 1: case 1:
if (LinkContest_GetBlockReceivedFromAllPlayers()) if (LinkContest_GetBlockReceivedFromAllPlayers())
{ {
memcpy(eContestantStatus, gBlockRecvBuffer[gUnknown_02039F2B], 4 * sizeof(struct ContestantStatus)); memcpy(eContestantStatus, gBlockRecvBuffer[gUnknown_02039F2B], CONTESTANT_COUNT * sizeof(struct ContestantStatus));
gTasks[taskId].tState++; gTasks[taskId].tState++;
} }
break; break;
@ -497,7 +497,7 @@ void sub_80FCE48(u8 taskId)
} }
} }
void sub_80FCF40(u8 taskId) void Task_LinkContest_CommunicateRound1Points(u8 taskId)
{ {
if (!sub_80FC670(&gTasks[taskId].data[12])) if (!sub_80FC670(&gTasks[taskId].data[12]))
return; return;
@ -507,14 +507,14 @@ void sub_80FCF40(u8 taskId)
case 0: case 0:
if (IsLinkTaskFinished()) if (IsLinkTaskFinished())
{ {
if (LinkContest_SendBlock(gContestMonConditions, sizeof(gContestMonConditions)) == 1) if (LinkContest_SendBlock(gContestMonRound1Points, sizeof(gContestMonRound1Points)) == 1)
gTasks[taskId].tState++; gTasks[taskId].tState++;
} }
break; break;
case 1: case 1:
if (LinkContest_GetBlockReceivedFromAllPlayers()) if (LinkContest_GetBlockReceivedFromAllPlayers())
{ {
memcpy(gContestMonConditions, gBlockRecvBuffer[gUnknown_02039F2B], sizeof(gContestMonConditions)); memcpy(gContestMonRound1Points, gBlockRecvBuffer[gUnknown_02039F2B], sizeof(gContestMonRound1Points));
gTasks[taskId].tState++; gTasks[taskId].tState++;
} }
break; break;
@ -526,7 +526,7 @@ void sub_80FCF40(u8 taskId)
} }
} }
void sub_80FCFD0(u8 taskId) void Task_LinkContest_CommunicateTurnOrder(u8 taskId)
{ {
if (!sub_80FC670(&gTasks[taskId].data[12])) if (!sub_80FC670(&gTasks[taskId].data[12]))
return; return;

View File

@ -70,29 +70,30 @@ static void sub_81D9F68(u8 taskId)
u8 i; u8 i;
u8 rank; u8 rank;
int gameCleared; int gameCleared;
u8 data1[4]; u8 contestCategories[CONTESTANT_COUNT];
u8 data2[4]; u8 data2[CONTESTANT_COUNT];
memset(data1, 0, sizeof(data1)); memset(contestCategories, 0, sizeof(contestCategories));
memset(data2, 0, sizeof(data2)); memset(data2, 0, sizeof(data2));
for (i = 0; i < gNumLinkContestPlayers; i++) for (i = 0; i < gNumLinkContestPlayers; i++)
data1[i] = gTasks[taskId].data[i + 1]; contestCategories[i] = gTasks[taskId].data[i + 1];
// Ensure all players are doing the same category
i = 0; i = 0;
if (i < gNumLinkContestPlayers) if (i < gNumLinkContestPlayers)
{ {
while (++i < gNumLinkContestPlayers) while (++i < gNumLinkContestPlayers)
{ {
if (data1[0] != data1[i]) if (contestCategories[0] != contestCategories[i])
break; break;
} }
} }
if (i == gNumLinkContestPlayers) if (i == gNumLinkContestPlayers)
gSpecialVar_0x8004 = 0; gSpecialVar_0x8004 = FALSE;
else else
gSpecialVar_0x8004 = 1; gSpecialVar_0x8004 = TRUE;
for (i = 0; i < gNumLinkContestPlayers; i++) for (i = 0; i < gNumLinkContestPlayers; i++)
data2[i] = gTasks[taskId].data[i + 5]; data2[i] = gTasks[taskId].data[i + 5];
@ -119,7 +120,7 @@ static void sub_81D9F68(u8 taskId)
} }
} }
sub_80DACBC(data1[0], rank, gameCleared); SetLinkAIContestants(contestCategories[0], rank, gameCleared);
} }
gUnknown_02039F2B = sub_80F86E0(data2); gUnknown_02039F2B = sub_80F86E0(data2);
@ -132,13 +133,13 @@ static void sub_81D9F68(u8 taskId)
static void sub_81DA10C(u8 taskId) static void sub_81DA10C(u8 taskId)
{ {
sub_80DB09C(gSpecialVar_ContestCategory); sub_80DB09C(gSpecialVar_ContestCategory);
SetTaskFuncWithFollowupFunc(taskId, sub_80FCF40, sub_81DA138); SetTaskFuncWithFollowupFunc(taskId, Task_LinkContest_CommunicateRound1Points, sub_81DA138);
} }
static void sub_81DA138(u8 taskId) static void sub_81DA138(u8 taskId)
{ {
SortContestants(FALSE); SortContestants(FALSE);
SetTaskFuncWithFollowupFunc(taskId, sub_80FCFD0, sub_80F8714); SetTaskFuncWithFollowupFunc(taskId, Task_LinkContest_CommunicateTurnOrder, sub_80F8714);
} }
static void sub_81DA160(u8 taskId) static void sub_81DA160(u8 taskId)

View File

@ -1718,7 +1718,7 @@ static void LoadContestResultsTilemaps(void)
// Represented on results board as stars // Represented on results board as stars
static u8 GetNumPreliminaryPoints(u8 monIndex, bool8 capPoints) static u8 GetNumPreliminaryPoints(u8 monIndex, bool8 capPoints)
{ {
u32 condition = gContestMonConditions[monIndex] << 16; u32 condition = gContestMonRound1Points[monIndex] << 16;
u32 numStars = condition / 0x3F; u32 numStars = condition / 0x3F;
if (numStars & 0xFFFF) if (numStars & 0xFFFF)
@ -1966,7 +1966,7 @@ static void CalculateContestantsResultData(void)
for (i = 0; i < CONTESTANT_COUNT; i++) for (i = 0; i < CONTESTANT_COUNT; i++)
{ {
relativePoints = (gContestMonConditions[i] * 1000) / abs(highestPoints); relativePoints = (gContestMonRound1Points[i] * 1000) / abs(highestPoints);
if (relativePoints % 10 > 4) if (relativePoints % 10 > 4)
relativePoints += 10; relativePoints += 10;
(*sContestResults->monResults)[i].relativePreliminaryPoints = relativePoints / 10; (*sContestResults->monResults)[i].relativePreliminaryPoints = relativePoints / 10;
@ -2206,7 +2206,7 @@ void TryEnterContestMon(void)
// Nonzero eligibility can still be non-eligibile, if mon is fainted or egg // Nonzero eligibility can still be non-eligibile, if mon is fainted or egg
if (eligibility) if (eligibility)
{ {
sub_80DAB8C(gSpecialVar_ContestCategory, gSpecialVar_ContestRank); SetContestants(gSpecialVar_ContestCategory, gSpecialVar_ContestRank);
sub_80DB09C(gSpecialVar_ContestCategory); sub_80DB09C(gSpecialVar_ContestCategory);
} }
@ -2324,7 +2324,7 @@ void GetContestMonConditionRanking(void)
for (i = 0, rank = 0; i < CONTESTANT_COUNT; i++) for (i = 0, rank = 0; i < CONTESTANT_COUNT; i++)
{ {
if (gContestMonConditions[gSpecialVar_0x8006] < gContestMonConditions[i]) if (gContestMonRound1Points[gSpecialVar_0x8006] < gContestMonRound1Points[i])
rank++; rank++;
} }
@ -2333,7 +2333,7 @@ void GetContestMonConditionRanking(void)
void GetContestMonCondition(void) void GetContestMonCondition(void)
{ {
gSpecialVar_0x8004 = gContestMonConditions[gSpecialVar_0x8006]; gSpecialVar_0x8004 = gContestMonRound1Points[gSpecialVar_0x8006];
} }
void GetContestWinnerId(void) void GetContestWinnerId(void)
@ -2472,13 +2472,13 @@ static void sub_80F85BC(u8 taskId)
gUnknown_02039F2B = sub_80F86E0(sp4); gUnknown_02039F2B = sub_80F86E0(sp4);
sub_80DB09C(gSpecialVar_ContestCategory); sub_80DB09C(gSpecialVar_ContestCategory);
SetTaskFuncWithFollowupFunc(taskId, sub_80FCF40, sub_80F86B8); SetTaskFuncWithFollowupFunc(taskId, Task_LinkContest_CommunicateRound1Points, sub_80F86B8);
} }
static void sub_80F86B8(u8 taskId) static void sub_80F86B8(u8 taskId)
{ {
SortContestants(FALSE); SortContestants(FALSE);
SetTaskFuncWithFollowupFunc(taskId, sub_80FCFD0, sub_80F8714); SetTaskFuncWithFollowupFunc(taskId, Task_LinkContest_CommunicateTurnOrder, sub_80F8714);
} }
u8 sub_80F86E0(u8 *arg0) u8 sub_80F86E0(u8 *arg0)

View File

@ -183,7 +183,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("POOCHY"), .nickname = _("POOCHY"),
.trainerName = _("JIMMY"), .trainerName = _("JIMMY"),
.trainerGfxId = OBJ_EVENT_GFX_BOY_1, .trainerGfxId = OBJ_EVENT_GFX_BOY_1,
.aiChecks = 0xC000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMIES_1 | CONTEST_AI_DUMMY_20 | CONTEST_AI_DUMMY_21,
.whichRank = CONTEST_RANK_NORMAL, .whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = TRUE, .aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE, .aiPool_Beauty = FALSE,
@ -211,7 +211,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("MUSILLE"), .nickname = _("MUSILLE"),
.trainerName = _("EDITH"), .trainerName = _("EDITH"),
.trainerGfxId = OBJ_EVENT_GFX_GIRL_1, .trainerGfxId = OBJ_EVENT_GFX_GIRL_1,
.aiChecks = 0x82000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMIES_1 | CONTEST_AI_DUMMY_19 | CONTEST_AI_DUMMY_25,
.whichRank = CONTEST_RANK_NORMAL, .whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE, .aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE, .aiPool_Beauty = FALSE,
@ -239,7 +239,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("DUSTER"), .nickname = _("DUSTER"),
.trainerName = _("EVAN"), .trainerName = _("EVAN"),
.trainerGfxId = OBJ_EVENT_GFX_LITTLE_BOY, .trainerGfxId = OBJ_EVENT_GFX_LITTLE_BOY,
.aiChecks = 0x21000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMIES_1 | CONTEST_AI_DUMMY_18 | CONTEST_AI_DUMMY_23,
.whichRank = CONTEST_RANK_NORMAL, .whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE, .aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE, .aiPool_Beauty = TRUE,
@ -603,7 +603,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("BULBY"), .nickname = _("BULBY"),
.trainerName = _("AGATHA"), .trainerName = _("AGATHA"),
.trainerGfxId = OBJ_EVENT_GFX_WOMAN_2, .trainerGfxId = OBJ_EVENT_GFX_WOMAN_2,
.aiChecks = 0xC000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMY_1 | CONTEST_AI_DUMMY_2 | CONTEST_AI_DUMMY_3 | CONTEST_AI_DUMMY_4 | CONTEST_AI_DUMMY_5 | CONTEST_AI_DUMMY_20 | CONTEST_AI_DUMMY_21,
.whichRank = CONTEST_RANK_NORMAL, .whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE, .aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE, .aiPool_Beauty = FALSE,
@ -631,7 +631,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("FUTTERBE"), .nickname = _("FUTTERBE"),
.trainerName = _("BEAU"), .trainerName = _("BEAU"),
.trainerGfxId = OBJ_EVENT_GFX_HEX_MANIAC, .trainerGfxId = OBJ_EVENT_GFX_HEX_MANIAC,
.aiChecks = 0x82000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMIES_1 | CONTEST_AI_DUMMY_19 | CONTEST_AI_DUMMY_25,
.whichRank = CONTEST_RANK_NORMAL, .whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE, .aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE, .aiPool_Beauty = TRUE,
@ -659,7 +659,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("PIDEOT"), .nickname = _("PIDEOT"),
.trainerName = _("KAY"), .trainerName = _("KAY"),
.trainerGfxId = OBJ_EVENT_GFX_WOMAN_5, .trainerGfxId = OBJ_EVENT_GFX_WOMAN_5,
.aiChecks = 0x21000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMIES_1 | CONTEST_AI_DUMMY_18 | CONTEST_AI_DUMMY_23,
.whichRank = CONTEST_RANK_NORMAL, .whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = TRUE, .aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE, .aiPool_Beauty = TRUE,
@ -883,7 +883,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("DUODO"), .nickname = _("DUODO"),
.trainerName = _("BOBBY"), .trainerName = _("BOBBY"),
.trainerGfxId = OBJ_EVENT_GFX_RUNNING_TRIATHLETE_M, .trainerGfxId = OBJ_EVENT_GFX_RUNNING_TRIATHLETE_M,
.aiChecks = 0x82000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMIES_1 | CONTEST_AI_DUMMY_19 | CONTEST_AI_DUMMY_25,
.whichRank = CONTEST_RANK_SUPER, .whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = TRUE, .aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE, .aiPool_Beauty = TRUE,
@ -1275,7 +1275,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("BROWLO"), .nickname = _("BROWLO"),
.trainerName = _("LUKE"), .trainerName = _("LUKE"),
.trainerGfxId = OBJ_EVENT_GFX_FAT_MAN, .trainerGfxId = OBJ_EVENT_GFX_FAT_MAN,
.aiChecks = 0xC000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMY_1 | CONTEST_AI_DUMMY_2 | CONTEST_AI_DUMMY_3 | CONTEST_AI_DUMMY_4 | CONTEST_AI_DUMMY_5 | CONTEST_AI_DUMMY_20 | CONTEST_AI_DUMMY_21,
.whichRank = CONTEST_RANK_SUPER, .whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE, .aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE, .aiPool_Beauty = FALSE,
@ -1303,7 +1303,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("FETCHIN"), .nickname = _("FETCHIN"),
.trainerName = _("RAUL"), .trainerName = _("RAUL"),
.trainerGfxId = OBJ_EVENT_GFX_MAN_5, .trainerGfxId = OBJ_EVENT_GFX_MAN_5,
.aiChecks = 0x82000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMIES_1 | CONTEST_AI_DUMMY_19 | CONTEST_AI_DUMMY_25,
.whichRank = CONTEST_RANK_SUPER, .whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = TRUE, .aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE, .aiPool_Beauty = FALSE,
@ -1331,7 +1331,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("SEELEY"), .nickname = _("SEELEY"),
.trainerName = _("JADA"), .trainerName = _("JADA"),
.trainerGfxId = OBJ_EVENT_GFX_WOMAN_2, .trainerGfxId = OBJ_EVENT_GFX_WOMAN_2,
.aiChecks = 0x21000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMIES_1 | CONTEST_AI_DUMMY_18 | CONTEST_AI_DUMMY_23,
.whichRank = CONTEST_RANK_SUPER, .whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE, .aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE, .aiPool_Beauty = TRUE,
@ -1555,7 +1555,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("SHIFTY"), .nickname = _("SHIFTY"),
.trainerName = _("CLAUDIA"), .trainerName = _("CLAUDIA"),
.trainerGfxId = OBJ_EVENT_GFX_GIRL_1, .trainerGfxId = OBJ_EVENT_GFX_GIRL_1,
.aiChecks = 0x82000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMIES_1 | CONTEST_AI_DUMMY_19 | CONTEST_AI_DUMMY_25,
.whichRank = CONTEST_RANK_HYPER, .whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = TRUE, .aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE, .aiPool_Beauty = TRUE,
@ -1947,7 +1947,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("EGGSOR"), .nickname = _("EGGSOR"),
.trainerName = _("GRACIE"), .trainerName = _("GRACIE"),
.trainerGfxId = OBJ_EVENT_GFX_PICNICKER, .trainerGfxId = OBJ_EVENT_GFX_PICNICKER,
.aiChecks = 0xC000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMY_1 | CONTEST_AI_DUMMY_2 | CONTEST_AI_DUMMY_3 | CONTEST_AI_DUMMY_4 | CONTEST_AI_DUMMY_5 | CONTEST_AI_DUMMY_20 | CONTEST_AI_DUMMY_21,
.whichRank = CONTEST_RANK_HYPER, .whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE, .aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE, .aiPool_Beauty = FALSE,
@ -1975,7 +1975,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("CUBIN"), .nickname = _("CUBIN"),
.trainerName = _("COLTIN"), .trainerName = _("COLTIN"),
.trainerGfxId = OBJ_EVENT_GFX_MAN_4, .trainerGfxId = OBJ_EVENT_GFX_MAN_4,
.aiChecks = 0x82000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMIES_1 | CONTEST_AI_DUMMY_19 | CONTEST_AI_DUMMY_25,
.whichRank = CONTEST_RANK_HYPER, .whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE, .aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE, .aiPool_Beauty = FALSE,
@ -2003,7 +2003,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("HITMON"), .nickname = _("HITMON"),
.trainerName = _("ELLIE"), .trainerName = _("ELLIE"),
.trainerGfxId = OBJ_EVENT_GFX_EXPERT_F, .trainerGfxId = OBJ_EVENT_GFX_EXPERT_F,
.aiChecks = 0x21000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMIES_1 | CONTEST_AI_DUMMY_18 | CONTEST_AI_DUMMY_23,
.whichRank = CONTEST_RANK_HYPER, .whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = TRUE, .aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE, .aiPool_Beauty = FALSE,
@ -2227,7 +2227,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("LOUDERD"), .nickname = _("LOUDERD"),
.trainerName = _("RALPH"), .trainerName = _("RALPH"),
.trainerGfxId = OBJ_EVENT_GFX_EXPERT_M, .trainerGfxId = OBJ_EVENT_GFX_EXPERT_M,
.aiChecks = 0x82000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMIES_1 | CONTEST_AI_DUMMY_19 | CONTEST_AI_DUMMY_25,
.whichRank = CONTEST_RANK_MASTER, .whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE, .aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE, .aiPool_Beauty = FALSE,
@ -2619,7 +2619,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("GAREN"), .nickname = _("GAREN"),
.trainerName = _("CAMILE"), .trainerName = _("CAMILE"),
.trainerGfxId = OBJ_EVENT_GFX_HEX_MANIAC, .trainerGfxId = OBJ_EVENT_GFX_HEX_MANIAC,
.aiChecks = 0xC000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMY_1 | CONTEST_AI_DUMMY_2 | CONTEST_AI_DUMMY_3 | CONTEST_AI_DUMMY_4 | CONTEST_AI_DUMMY_5 | CONTEST_AI_DUMMY_20 | CONTEST_AI_DUMMY_21,
.whichRank = CONTEST_RANK_MASTER, .whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE, .aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE, .aiPool_Beauty = FALSE,
@ -2647,7 +2647,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("GONPOR"), .nickname = _("GONPOR"),
.trainerName = _("MARTIN"), .trainerName = _("MARTIN"),
.trainerGfxId = OBJ_EVENT_GFX_SCIENTIST_1, .trainerGfxId = OBJ_EVENT_GFX_SCIENTIST_1,
.aiChecks = 0x82000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMIES_1 | CONTEST_AI_DUMMY_19 | CONTEST_AI_DUMMY_25,
.whichRank = CONTEST_RANK_MASTER, .whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE, .aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE, .aiPool_Beauty = TRUE,
@ -2675,7 +2675,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("DRITE"), .nickname = _("DRITE"),
.trainerName = _("SERGIO"), .trainerName = _("SERGIO"),
.trainerGfxId = OBJ_EVENT_GFX_BOY_1, .trainerGfxId = OBJ_EVENT_GFX_BOY_1,
.aiChecks = 0x21000FFF, .aiChecks = CONTEST_AI_ALL | CONTEST_AI_DUMMIES_1 | CONTEST_AI_DUMMY_18 | CONTEST_AI_DUMMY_23,
.whichRank = CONTEST_RANK_MASTER, .whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE, .aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE, .aiPool_Beauty = FALSE,

View File

@ -158,7 +158,7 @@ void sub_80F8970(void)
u8 r7; u8 r7;
for (i = 0; i < CONTESTANT_COUNT; i++) for (i = 0; i < CONTESTANT_COUNT; i++)
conditions[i] = gContestMonConditions[i]; conditions[i] = gContestMonRound1Points[i];
for (i = 0; i < CONTESTANT_COUNT - 1; i++) for (i = 0; i < CONTESTANT_COUNT - 1; i++)
{ {
@ -195,7 +195,7 @@ void sub_80F8970(void)
var2 = r8; var2 = r8;
for (i = 0; i < CONTESTANT_COUNT; i++) for (i = 0; i < CONTESTANT_COUNT; i++)
{ {
if (condition == gContestMonConditions[i]) if (condition == gContestMonRound1Points[i])
{ {
if (var2 == 1) if (var2 == 1)
break; break;