Skip to content

Commit

Permalink
Update swade.js
Browse files Browse the repository at this point in the history
Fix #266
  • Loading branch information
mclemente committed Dec 20, 2024
1 parent b2a5826 commit 1754c71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/module/providers/swade.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ export default class swadeEstimationProvider extends EstimationProvider {
fraction(token) {
const hp = token.actor.system.wounds;
let maxHP = Math.max(hp.max, 1);
if (token.actor.system.wildcard) {
if (hp.max || token.actor.system.wildcard) {
const defaultWildCardMaxWounds = sGet("swade.defaultWildCardMaxWounds");
maxHP = 1 + Math.max(hp.max || defaultWildCardMaxWounds, 1);
maxHP = 1 + (hp.max || defaultWildCardMaxWounds);
}
return (maxHP - hp.value) / maxHP;
}
Expand Down

0 comments on commit 1754c71

Please # to comment.