From c7b62969eb86a3033be3c0ec1279b0b4c8741853 Mon Sep 17 00:00:00 2001 From: Mumble <171087428+frutescens@users.noreply.github.com> Date: Sat, 21 Sep 2024 13:01:52 -0700 Subject: [PATCH] Update src/field/trainer.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- src/field/trainer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/field/trainer.ts b/src/field/trainer.ts index 3469eef8255..b1d0263f604 100644 --- a/src/field/trainer.ts +++ b/src/field/trainer.ts @@ -431,9 +431,9 @@ export default class Trainer extends Phaser.GameObjects.Container { retry = true; } - if (retry && (attempt || 0) < 10) { + if (retry && (attempt ?? 0) < 10) { console.log("Rerolling party member..."); - ret = this.genNewPartyMemberSpecies(level, strength, (attempt || 0) + 1); + ret = this.genNewPartyMemberSpecies(level, strength, (attempt ?? 0) + 1); } return ret;