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

@@ -72,7 +72,7 @@ function setup_game() {
let jumpscare_interval_id;
if (localStorage.getItem("Whack a Pumpkin Jumpscares") == "true") {
jumpscare_interval_id = setInterval(() => {
if (Math.random() < 0.035) {
if (Math.random() < 0.05) {
jumpscare();
}
}, 1000);
@@ -100,7 +100,12 @@ function setup_game() {
onClick("pumpkin", (pumpkin) => {
destroy(pumpkin);
if (localStorage.getItem("Whack a Pumpkin Jumpscares") == "true") {
if (Math.random() < 0.1) {
jumpscare();
}
}
score += 1;
if (score > high_score) {
high_score = score;