diff --git a/project/src/generators/BotGenerator.ts b/project/src/generators/BotGenerator.ts index b4b4d3fe..9320632e 100644 --- a/project/src/generators/BotGenerator.ts +++ b/project/src/generators/BotGenerator.ts @@ -271,7 +271,7 @@ export class BotGenerator { role: string, ): number { const result = experience[botDifficulty.toLowerCase()]; - if (!result) { + if (typeof result === "undefined") { this.logger.warning( `Unable to find experience for kill value for: ${role} ${botDifficulty}, falling back to "normal"`, ); @@ -295,7 +295,7 @@ export class BotGenerator { role: string, ): number { const result = standingForKill[botDifficulty.toLowerCase()]; - if (!result) { + if (typeof result === "undefined") { this.logger.warning( `Unable to find standing for kill value for: ${role} ${botDifficulty}, falling back to "normal"`, ); @@ -319,7 +319,7 @@ export class BotGenerator { role: string, ): number { const result = aggressorBonus[botDifficulty.toLowerCase()]; - if (!result) { + if (typeof result === "undefined") { this.logger.warning( `Unable to find aggressor bonus for kill value for: ${role} ${botDifficulty}, falling back to "normal"`, );