Skip to content

Commit

Permalink
Update battle_setup.c
Browse files Browse the repository at this point in the history
  • Loading branch information
MercedesCL authored Jan 16, 2025
1 parent 36c3e41 commit b20410e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/battle_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1746,9 +1746,11 @@ static bool32 UpdateRandomTrainerRematches(const struct RematchTrainer *table, u
continue; // Only check permitted trainers within the current map.

if (gSaveBlock1Ptr->trainerRematches[i] != 0)
return TRUE;// Trainer already wants a rematch. Give up searching.

if (TrainerIsMatchCallRegistered(i) && ((Random() % 100) <= 30))
{
// Trainer already wants a rematch. Don't bother updating it.
return TRUE;
}
else if (TrainerIsMatchCallRegistered(i) && ((Random() % 100) <= 30))
// 31% chance of getting a rematch.
{
SetRematchIdForTrainer(table, i);
Expand Down

0 comments on commit b20410e

Please sign in to comment.