Update code_80005FD0.c (#404)

This commit is contained in:
MegaMech 2025-06-30 13:18:28 -06:00 committed by GitHub
parent 7b061dfe3d
commit 0332f56281
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 6 deletions

View File

@ -7087,15 +7087,15 @@ void cpu_use_item_strategy(s32 playerId) {
switch (temp_s0->branch) {
case CPU_STRATEGY_WAIT_NEXT_ITEM:
temp_s0->actorIndex = -1;
if (CVarGetInteger("gHarderCPU", 0) == 1) {
if (((gNumPathPointsTraversed[playerId] + (playerId * 0x14) + 0x64) % 0x8 == 0) &&
(temp_s0->timer >= 0x200)) {
// Harder CPU Items
if (((gNumPathPointsTraversed[playerId] + (playerId * 0x14) + 0x64) % 0x8 == 0) &&
(temp_s0->timer >= 0x200) && (CVarGetInteger("gHarderCPU", 0) == true)) {
cpu_decisions_branch_item(playerId, &temp_s0->branch,
hard_cpu_gen_random_item((s16) gLapCountByPlayerId[playerId],
gGPCurrentRaceRankByPlayerId[playerId]));
}
}
if ((((playerId * 0x14) + 0x64) < gNumPathPointsTraversed[playerId]) && (temp_s0->timer >= 0x259) &&
// Stock CPU Items
} else if ((((playerId * 0x14) + 0x64) < gNumPathPointsTraversed[playerId]) && (temp_s0->timer >= 0x259) &&
(temp_s0->numItemUse < 3) && (gLapCountByPlayerId[playerId] < 3)) {
cpu_decisions_branch_item(playerId, &temp_s0->branch,
cpu_gen_random_item((s16) gLapCountByPlayerId[playerId],