Update src/field/trainer.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
Mumble 2024-09-21 13:01:52 -07:00 committed by GitHub
parent 8c366315ff
commit c7b62969eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -431,9 +431,9 @@ export default class Trainer extends Phaser.GameObjects.Container {
retry = true; retry = true;
} }
if (retry && (attempt || 0) < 10) { if (retry && (attempt ?? 0) < 10) {
console.log("Rerolling party member..."); console.log("Rerolling party member...");
ret = this.genNewPartyMemberSpecies(level, strength, (attempt || 0) + 1); ret = this.genNewPartyMemberSpecies(level, strength, (attempt ?? 0) + 1);
} }
return ret; return ret;