Skip to content

Commit

Permalink
fix: Respect creature HP when given as array in encounters
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Sep 5, 2023
1 parent 8790517 commit 244fe03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/encounter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,6 @@ export class EncounterParser {
.split(/,\s?/)
.slice(1)
.map((v) => (isNaN(Number(v)) ? null : Number(v)));
if (hp) {
rollHP = false;
}
} else if (Array.isArray(monster)) {
if (typeof monster[0] == "string") {
//Hobgoblin, Jim
Expand Down Expand Up @@ -296,6 +293,9 @@ export class EncounterParser {
friendly = monster.friend || monster.ally || false;
}

if (hp) {
rollHP = false;
}
if (!name || typeof name != "string") return {};
let existing = this.plugin.getCreatureFromBestiary(name);
let creature = existing
Expand Down

0 comments on commit 244fe03

Please sign in to comment.