Fix music always playing, add more jumpscares and increase chance of jumpscares

This commit is contained in:
csd4ni3l
2025-11-03 15:15:50 +01:00
parent c616865438
commit 60bf2a65be
4 changed files with 19 additions and 4 deletions

View File

@@ -21,6 +21,12 @@ function setup_game() {
loadSprite("pumpkin", "/static/graphics/pumpkin.png");
scene("game", (difficulty, pumpkin_array, revealed, found_pairs, start) => {
if (localStorage.getItem("Pumpkin Memory Jumpscares") == "true") {
if (Math.random() < 0.1) {
jumpscare();
}
}
let cols;
switch (difficulty) {
case "easy": pumpkin_pairs = 5; cols = 5; break;
@@ -89,7 +95,7 @@ function setup_game() {
let jumpscare_interval_id;
if (localStorage.getItem("Pumpkin Memory Jumpscares") == "true") {
jumpscare_interval_id = setInterval(() => {
if (Math.random() < 0.035) {
if (Math.random() < 0.05) {
jumpscare();
}
}, 1000);