Skip to content

Commit

Permalink
rr
Browse files Browse the repository at this point in the history
  • Loading branch information
findirfin committed Sep 22, 2024
1 parent 53e2c27 commit 32d620b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions party-box/slot-machine.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
// Rickroll chance (1 in 75)
function checkRickrollChance() {
if (Math.floor(Math.random() * 20) === 0) {
window.location.href = "https://www.youtube.com/watch?v=dQw4w9WgXcQ";
return true;
}
return false;
}

// Check for rickroll immediately
if (checkRickrollChance()) {
// If rickroll triggered, stop further script execution
throw new Error("Rickroll initiated");
}
// Run the check when the page loads
document.addEventListener('DOMContentLoaded', checkRickrollChance);


// Simulated database of abilities
const abilityDatabase = [
"Draw a card, then discard a card.",
Expand Down

0 comments on commit 32d620b

Please sign in to comment.