Skip to content

Commit

Permalink
Fix nightmare filtering when using excluded evidence
Browse files Browse the repository at this point in the history
  • Loading branch information
Jobus0 committed Dec 29, 2024
1 parent 1a689dd commit 44e3206
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,14 @@ function updateGhosts() {
ghost.classList.remove("disabled");
}

const remaining = evidence.querySelectorAll('[data-evidence]:not(.positive, .negative, [required])');
const remaining = evidence.querySelectorAll('[data-evidence]:not(.positive, [required])');
if (nightmare && remaining.length == 1) {
remaining.forEach(e => e.classList.add("faded"));
}
else {
remaining.forEach(e => e.classList.remove("faded"));
}
positives.forEach(e => e.classList.remove("faded"));

if (requiredEvidence != null)
requiredEvidence.title = nightmare ? 'In nightmare difficulty, this piece of evidence is guaranteed for this ghost.' : '';
Expand Down

0 comments on commit 44e3206

Please sign in to comment.