Skip to content

Commit b31c990

Browse files
Add files via upload
1 parent edff8c6 commit b31c990

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

slot/index.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -748,11 +748,13 @@
748748
if (isWin) {
749749
targets = [outcome.prize.name, outcome.prize.name, outcome.prize.name];
750750
} else {
751-
const a = randomPrizeName();
752-
let b = randomPrizeName();
753-
let c = randomPrizeName();
754-
while (a === b && b === c) { c = randomPrizeName(); }
755-
targets = [a, b, c];
751+
// Near-miss: two reels match, third is the odd one out (more dramatic!)
752+
const match = randomPrizeName();
753+
let odd = randomPrizeName();
754+
while (odd === match) odd = randomPrizeName();
755+
// Always make reel 2 (last to stop) the odd one for maximum suspense
756+
targets = [match, match, odd];
757+
outcome.nearMiss = true;
756758
}
757759

758760
const rowH = getItemHeight();
@@ -839,7 +841,7 @@
839841
setTimeout(() => winFlash.className = 'win-flash', 1500);
840842
sfxWin(p.rarity);
841843
} else {
842-
ledMain.textContent = 'NO DICE';
844+
ledMain.textContent = outcome.nearMiss ? 'SO CLOSE!' : 'NO DICE';
843845
ledMain.classList.add('show', 'lose');
844846

845847
ledSub.textContent = 'BETTER LUCK NEXT TIME!';

0 commit comments

Comments
 (0)