Skip to content

Commit

Permalink
fix: Encounters now allow creatures to be set to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Sep 27, 2024
1 parent 4a7afc1 commit f9b5f6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/encounter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ export class EncounterParser {
number = 1;
}
if (!isNaN(Number(number))) number = Number(number);
if (!number || (typeof number == "number" && number < 1)) number = 1;

if (number != 0 && !number) number = 1;
if (typeof number == "number" && number < 1) number = 0;
let name: string,
display: string,
hp: number,
Expand Down

0 comments on commit f9b5f6c

Please sign in to comment.