diff --git a/assets/speech/slots/abyssal-2x.mp3 b/assets/speech/slots/abyssal-2x.mp3 new file mode 100644 index 0000000..1be4870 Binary files /dev/null and b/assets/speech/slots/abyssal-2x.mp3 differ diff --git a/assets/speech/slots/abyssal-intro.mp3 b/assets/speech/slots/abyssal-intro.mp3 new file mode 100644 index 0000000..7c32056 Binary files /dev/null and b/assets/speech/slots/abyssal-intro.mp3 differ diff --git a/assets/speech/slots/dragon-castle.mp3 b/assets/speech/slots/dragon-castle.mp3 new file mode 100644 index 0000000..7fc3ec4 Binary files /dev/null and b/assets/speech/slots/dragon-castle.mp3 differ diff --git a/assets/speech/slots/dragon-dragon.mp3 b/assets/speech/slots/dragon-dragon.mp3 new file mode 100644 index 0000000..46878ef Binary files /dev/null and b/assets/speech/slots/dragon-dragon.mp3 differ diff --git a/assets/speech/slots/dragons-intro.mp3 b/assets/speech/slots/dragon-intro.mp3 similarity index 100% rename from assets/speech/slots/dragons-intro.mp3 rename to assets/speech/slots/dragon-intro.mp3 diff --git a/assets/speech/slots/dragon-knight.mp3 b/assets/speech/slots/dragon-knight.mp3 new file mode 100644 index 0000000..94edaa0 Binary files /dev/null and b/assets/speech/slots/dragon-knight.mp3 differ diff --git a/assets/speech/slots/dragon-treasure.mp3 b/assets/speech/slots/dragon-treasure.mp3 new file mode 100644 index 0000000..3336e08 Binary files /dev/null and b/assets/speech/slots/dragon-treasure.mp3 differ diff --git a/assets/speech/slots/gold-rush-cart.mp3 b/assets/speech/slots/gold-rush-cart.mp3 new file mode 100644 index 0000000..8a22399 Binary files /dev/null and b/assets/speech/slots/gold-rush-cart.mp3 differ diff --git a/assets/speech/slots/gold-rush-pickaxe.mp3 b/assets/speech/slots/gold-rush-pickaxe.mp3 new file mode 100644 index 0000000..2a9c764 Binary files /dev/null and b/assets/speech/slots/gold-rush-pickaxe.mp3 differ diff --git a/assets/speech/slots/gold-rush-saloon.mp3 b/assets/speech/slots/gold-rush-saloon.mp3 new file mode 100644 index 0000000..d97a202 Binary files /dev/null and b/assets/speech/slots/gold-rush-saloon.mp3 differ diff --git a/assets/speech/slots/gold-rush-sheriff.mp3 b/assets/speech/slots/gold-rush-sheriff.mp3 new file mode 100644 index 0000000..25b075b Binary files /dev/null and b/assets/speech/slots/gold-rush-sheriff.mp3 differ diff --git a/assets/speech/slots/pharaoh-eye.mp3 b/assets/speech/slots/pharaoh-eye.mp3 new file mode 100644 index 0000000..fef3c03 Binary files /dev/null and b/assets/speech/slots/pharaoh-eye.mp3 differ diff --git a/assets/speech/slots/pharaohs-3-pyramids.mp3 b/assets/speech/slots/pharaohs-3-pyramids.mp3 new file mode 100644 index 0000000..a775a3e Binary files /dev/null and b/assets/speech/slots/pharaohs-3-pyramids.mp3 differ diff --git a/assets/speech/slots/pharaohs-4-pyramids.mp3 b/assets/speech/slots/pharaohs-4-pyramids.mp3 new file mode 100644 index 0000000..5173e45 Binary files /dev/null and b/assets/speech/slots/pharaohs-4-pyramids.mp3 differ diff --git a/assets/speech/slots/pharaohs-5-pyramids.mp3 b/assets/speech/slots/pharaohs-5-pyramids.mp3 new file mode 100644 index 0000000..f2df396 Binary files /dev/null and b/assets/speech/slots/pharaohs-5-pyramids.mp3 differ diff --git a/assets/speech/slots/pharaohs-ankh.mp3 b/assets/speech/slots/pharaohs-ankh.mp3 new file mode 100644 index 0000000..1503855 Binary files /dev/null and b/assets/speech/slots/pharaohs-ankh.mp3 differ diff --git a/assets/speech/slots/pharaohs-big-win.mp3 b/assets/speech/slots/pharaohs-big-win.mp3 new file mode 100644 index 0000000..07d9e06 Binary files /dev/null and b/assets/speech/slots/pharaohs-big-win.mp3 differ diff --git a/assets/speech/slots/pharaohs-cat.mp3 b/assets/speech/slots/pharaohs-cat.mp3 new file mode 100644 index 0000000..b3e792c Binary files /dev/null and b/assets/speech/slots/pharaohs-cat.mp3 differ diff --git a/assets/speech/slots/pharaohs-intro.mp3 b/assets/speech/slots/pharaohs-intro.mp3 new file mode 100644 index 0000000..a23e9f7 Binary files /dev/null and b/assets/speech/slots/pharaohs-intro.mp3 differ diff --git a/assets/speech/slots/pharaohs-sphinx.mp3 b/assets/speech/slots/pharaohs-sphinx.mp3 new file mode 100644 index 0000000..8058299 Binary files /dev/null and b/assets/speech/slots/pharaohs-sphinx.mp3 differ diff --git a/assets/speech/slots/pharaohs-wild.mp3 b/assets/speech/slots/pharaohs-wild.mp3 new file mode 100644 index 0000000..6677582 Binary files /dev/null and b/assets/speech/slots/pharaohs-wild.mp3 differ diff --git a/src/games/slots/SlotsGame.js b/src/games/slots/SlotsGame.js index 0120d5a..53a5a9c 100644 --- a/src/games/slots/SlotsGame.js +++ b/src/games/slots/SlotsGame.js @@ -830,6 +830,7 @@ export default class SlotsGame extends Phaser.Scene { await this.playSpinCues(result, m); let spinTotal = result.totalWin; + let tumbleCount = 0; // Animate the engine's step script in order. for (const step of result.steps) { @@ -837,6 +838,13 @@ export default class SlotsGame extends Phaser.Scene { else if (step.type === 'scatterPay') await this.fx.playScatterPay(step); else if (step.type === 'tumble') { this.stage?.tumble(step.cascadeIndex); + // Tumble cue (m.audio.tumbles) fires the moment each tumble happens — + // key = this spin's tumble number (2nd → sugar-2, 3rd → sugar-3, …). + if (m.audio?.tumbles) { + tumbleCount++; + const clip = m.audio.tumbles[tumbleCount]; + if (clip) this.cueAudio(clip); + } await this.fx.playTumble(step); } else if (step.type === 'rainbow') { this.stage?.bigMoment(); @@ -985,14 +993,57 @@ export default class SlotsGame extends Phaser.Scene { // Called after all reels have stopped; collects this spin's cues in order // and plays them sequentially. Bandit: at least one NEW sticky wild landed. // Dynamite: tiered by sticks on the reels (1 / 2 / 3+ → highest tier). + // Pyramids (Pharaoh's Fortune): tiered by scatter count in the grid + // (3 / 4 / 5 → highest tier). + // Wild (Pharaoh's Fortune): at least one wild in a winning line. + // Coins (Dragon's Hoard): tiered by coins on the grid (3–5 / 6+). + // Symbol wins (Dragon's Hoard): per-symbol clip when it wins a line. async playSpinCues(result, m) { const a = m.audio ?? {}; const cues = []; + // Shared "highest qualifying tier" picker for count-tiered cue maps. + const tierClip = (tiers, count) => Object.entries(tiers) + .filter(([t]) => count >= Number(t)) + .sort((x, y) => Number(y[0]) - Number(x[0]))[0]?.[1] ?? null; const stickyStep = result.steps.find((st) => st.type === 'stickyWilds'); if (a.bandit && stickyStep?.placed?.length > 0) cues.push(a.bandit); const scatter = m.scatter?.symbol; const n = scatter ? result.grid.flat().filter((s) => s === scatter).length : 0; - if (a.dynamite?.length && n > 0) cues.push(a.dynamite[Math.min(n, a.dynamite.length) - 1]); + if (a.dynamite?.length && n > 0) { + const entry = a.dynamite[Math.min(n, a.dynamite.length) - 1]; + const cue = typeof entry === 'string' ? { file: entry } : entry; + if (cue.chance === undefined || Math.random() < cue.chance) cues.push(cue.file); + } + if (a.pyramids) { + const clip = tierClip(a.pyramids, n); + if (clip) cues.push(clip); + } + if (a.coins) { + const coinSym = m.features?.holdSpin?.coinSymbol; + const count = coinSym ? result.grid.flat().filter((s) => s === coinSym).length : 0; + const clip = tierClip(a.coins, count); + if (clip) cues.push(clip); + } + if (a.symbolWins) { + const winStep = result.steps.find((st) => st.type === 'lineWins'); + if (winStep) { + const seen = new Set(); + for (const w of winStep.wins) { + const clip = a.symbolWins[w.symbol]; + if (clip && w.count >= 3 && !seen.has(w.symbol)) { + seen.add(w.symbol); + cues.push(clip); + } + } + } + } + if (a.wild) { + const wildSym = m.wild?.symbol; + const winStep = result.steps.find((st) => st.type === 'lineWins'); + const hasWild = winStep?.wins?.some( + (w) => (w.wilds ?? 0) > 0 || (!!wildSym && w.symbol === wildSym)); + if (hasWild) cues.push(a.wild); + } for (const file of cues) await this.cueAudio(file); } diff --git a/src/games/slots/SlotsLogic.js b/src/games/slots/SlotsLogic.js index 84d0088..438e332 100644 --- a/src/games/slots/SlotsLogic.js +++ b/src/games/slots/SlotsLogic.js @@ -118,6 +118,7 @@ export function evaluateLines(machine, grid, bet) { cells: line.slice(0, tier.count).map((row, c) => ({ c, r: row })), credits, wildMult, + wilds: wildsInWin, }; } } diff --git a/src/games/slots/machines.js b/src/games/slots/machines.js index d7cbb95..a753759 100644 --- a/src/games/slots/machines.js +++ b/src/games/slots/machines.js @@ -334,7 +334,27 @@ export const MACHINES = [ name: "Pharaoh's Fortune", tagline: 'Free Spins of the Nile', era: 'modern', - audio: { music: 'slots/pharaohs.mp3', intro: null }, + audio: { + music: 'slots/pharaohs.mp3', + intro: 'assets/speech/slots/pharaohs-intro.mp3', + bigWin: 'assets/speech/slots/pharaohs-big-win.mp3', + // Tiered pyramid (scatter) cue — count → clip, highest qualifying + // tier wins (3 → 3-pyramids, 4 → 4-pyramids, 5 → 5-pyramids). + pyramids: { + 3: 'assets/speech/slots/pharaohs-3-pyramids.mp3', + 4: 'assets/speech/slots/pharaohs-4-pyramids.mp3', + 5: 'assets/speech/slots/pharaohs-5-pyramids.mp3', + }, + // Plays once when a wild takes part in any winning line. + wild: 'assets/speech/slots/pharaohs-wild.mp3', + // Per-symbol line win cues (3+ match). + symbolWins: { + sphinx: 'assets/speech/slots/pharaohs-sphinx.mp3', + ankh: 'assets/speech/slots/pharaohs-ankh.mp3', + eye: 'assets/speech/slots/pharaoh-eye.mp3', // note: singular “pharaoh” + cat: 'assets/speech/slots/pharaohs-cat.mp3', + }, + }, featureLabel: 'FREE SPINS', layout: { reels: 5, rows: 3 }, evaluation: 'lines', @@ -431,11 +451,12 @@ export const MACHINES = [ era: 'modern', audio: { music: 'slots/abyssal-treasures.mp3', - intro: null, + intro: 'assets/speech/slots/abyssal-intro.mp3', bigWin: 'assets/speech/slots/abyssal-big-win.mp3', // Tiered cascade cue — plays the moment the ladder indicator reaches - // the rung (×4 → 4x, ×6 → 6x). + // the rung (×2 → 2x, ×4 → 4x, ×6 → 6x). cascades: { + 2: 'assets/speech/slots/abyssal-2x.mp3', 4: 'assets/speech/slots/abyssal-4x.mp3', 6: 'assets/speech/slots/abyssal-6x.mp3', }, @@ -519,7 +540,24 @@ export const MACHINES = [ name: "Dragon's Hoard", tagline: 'Hold & Spin Jackpots', era: 'modern', - audio: { music: 'slots/dragons-hoard.mp3', intro: null, bigWin: 'assets/speech/slots/dragon-big-win.mp3' }, + audio: { + music: 'slots/dragons-hoard.mp3', + intro: 'assets/speech/slots/dragon-intro.mp3', + bigWin: 'assets/speech/slots/dragon-big-win.mp3', + // Tiered coin cue — count on the grid → clip: 3–5 coins → dragon-coins, + // 6+ coins (bonus trigger) → dragon-unlocked. + coins: { + 3: 'assets/speech/slots/dragon-coins.mp3', + 6: 'assets/speech/slots/dragon-unlocked.mp3', + }, + // Per-symbol line win cues (3+ match). + symbolWins: { + dragon: 'assets/speech/slots/dragon-dragon.mp3', + castle: 'assets/speech/slots/dragon-castle.mp3', + chest: 'assets/speech/slots/dragon-treasure.mp3', + knight: 'assets/speech/slots/dragon-knight.mp3', + }, + }, featureLabel: 'JACKPOT COINS', layout: { reels: 5, rows: 3 }, evaluation: 'lines', @@ -636,9 +674,20 @@ export const MACHINES = [ // bandit plays when a spin lands at least one NEW sticky bandit // (replaces the stock sticky-wild fx) // dynamite tiered by sticks on the reels after the spin: index 0 = 1, - // 1 = 2, 2 = 3+; multiple cues play sequentially + // 1 = 2, 2 = 3+; multiple cues play sequentially. An entry + // may be { file, chance } to play it only some of the time // cascades tiered cascade cue: multiplier → clip, played the moment // the cascade ladder indicator reaches that rung + // pyramids tiered scatter cue: count → clip, highest qualifying tier + // wins (Pharaoh's Fortune) + // wild plays once when at least one wild is part of a winning + // line (Pharaoh's Fortune) + // coins tiered coin cue: count → clip, highest qualifying tier + // wins (Dragon's Hoard) + // symbolWins symbol → clip, played when that symbol wins a line + // (Dragon's Hoard) + // tumbles tiered tumble cue: tumble number in the spin → clip, each + // fires the moment that tumble happens (Sugar Spin) // bigWin plays once when the spin settles as a Big Win (≥10× bet) audio: { music: 'slots/gold-rush-gulch.mp3', @@ -646,10 +695,18 @@ export const MACHINES = [ bigWin: 'assets/speech/slots/gold-rush-big-win.mp3', bandit: 'assets/speech/slots/gold-rush-gulch-bandit.mp3', dynamite: [ - 'assets/speech/slots/gold-rush-one-dynomite.mp3', + // One dynamite is common — hear the call-out only 40% of the time. + { file: 'assets/speech/slots/gold-rush-one-dynomite.mp3', chance: 0.4 }, 'assets/speech/slots/gold-rush-two-dynomites.mp3', 'assets/speech/slots/gold-rush-triple-dynomite.mp3', - ], + ], + // Per-symbol line win cues (3+ match). + symbolWins: { + sheriff: 'assets/speech/slots/gold-rush-sheriff.mp3', + saloon: 'assets/speech/slots/gold-rush-saloon.mp3', + wagon: 'assets/speech/slots/gold-rush-cart.mp3', // the mine cart + pickaxe: 'assets/speech/slots/gold-rush-pickaxe.mp3', + }, }, featureLabel: 'PICK BONUS', layout: { reels: 5, rows: 3 }, @@ -738,7 +795,19 @@ export const MACHINES = [ name: 'Sugar Spin', tagline: 'Tumbling Candy Mountain', era: 'modern', - audio: { music: 'slots/sugar-spins.mp3', intro: null, bigWin: 'assets/speech/slots/sugar-big-win.mp3' }, + audio: { + music: 'slots/sugar-spins.mp3', + intro: 'assets/speech/slots/sugar-intro.mp3', + bigWin: 'assets/speech/slots/sugar-big-win.mp3', + // Tumble cue — key = this spin's tumble number; each clip fires the + // moment that tumble happens (2nd → sugar-2, 3rd → sugar-3, …, 5th → sugar-5). + tumbles: { + 2: 'assets/speech/slots/sugar-2.mp3', + 3: 'assets/speech/slots/sugar-3.mp3', + 4: 'assets/speech/slots/sugar-4.mp3', + 5: 'assets/speech/slots/sugar-5.mp3', + }, + }, featureLabel: 'TUMBLE WINS', layout: { reels: 6, rows: 5 }, evaluation: 'scatterPays',