Add per-machine music tracks and big-win/cascade audio cues
- Wire `music`, `bigWin`, and tiered `cascades` clips into machine configs for Pharaoh's Fortune, Abyssal Treasures, Dragon's Hoard, Sugar Spin, and Gold Rush Gulch - Play a dedicated clip the moment a cascade ladder rung is reached (e.g. ×4 → abyssal-4x.mp3) - Fire `bigWin` audio once a spin settles at ≥10× bet alongside the existing bigMoment FX - Mix per-machine theme tracks louder (0.4) than the shared pool default (0.15) so each machine's soundtrack stands out
This commit is contained in:
parent
3fba22fc9f
commit
abe50a7486
Binary file not shown.
|
|
@ -930,11 +930,20 @@ export class AbyssalProps {
|
||||||
}
|
}
|
||||||
|
|
||||||
onTumble(i) {
|
onTumble(i) {
|
||||||
this.setLevel(Math.min(i + 1, this.ladder.length - 1));
|
const next = Math.min(i + 1, this.ladder.length - 1);
|
||||||
|
const prev = this.level;
|
||||||
|
this.setLevel(next);
|
||||||
this.mermaid.say(600);
|
this.mermaid.say(600);
|
||||||
this.floatBubble(this.mermaid.world(0, -300), 'note');
|
this.floatBubble(this.mermaid.world(0, -300), 'note');
|
||||||
this.stage.sound('sing');
|
this.stage.sound('sing');
|
||||||
if (i >= 1) this.mermaid.cheer();
|
if (i >= 1) this.mermaid.cheer();
|
||||||
|
// Cascade cue (m.audio.cascades) fires the moment the ladder reaches the
|
||||||
|
// rung — e.g. ×4 → abyssal-4x.mp3, ×6 → abyssal-6x.mp3.
|
||||||
|
if (next > prev) {
|
||||||
|
const mults = this.m.features.cascade?.multipliers ?? [1, 2, 4, 6];
|
||||||
|
const clip = this.m.audio?.cascades?.[mults[next]];
|
||||||
|
if (clip) this.scene.cueAudio(clip);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onBigMoment() {
|
onBigMoment() {
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,10 @@ export default class SlotsGame extends Phaser.Scene {
|
||||||
const tracks = m?.audio?.music
|
const tracks = m?.audio?.music
|
||||||
? [{ file: m.audio.music, artist: m.name, title: 'Theme' }]
|
? [{ file: m.audio.music, artist: m.name, title: 'Theme' }]
|
||||||
: (music?.tracks ?? []);
|
: (music?.tracks ?? []);
|
||||||
if (tracks.length) this.musicPlayer = new MusicPlayer(this, tracks);
|
if (!tracks.length) return;
|
||||||
|
// Per-machine themes are the headline soundtrack — mix them noticeably
|
||||||
|
// louder than the shared pool (MusicPlayer's 0.15 default).
|
||||||
|
this.musicPlayer = new MusicPlayer(this, tracks, m?.audio?.music ? 0.4 : 0.15);
|
||||||
} catch (_) { /* optional */ }
|
} catch (_) { /* optional */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -903,7 +906,10 @@ export default class SlotsGame extends Phaser.Scene {
|
||||||
await this.fx.rollCounter(this.winText, 0, spinTotal, Math.min(900, 250 + spinTotal),
|
await this.fx.rollCounter(this.winText, 0, spinTotal, Math.min(900, 250 + spinTotal),
|
||||||
{ accelerate: !!this.stage });
|
{ accelerate: !!this.stage });
|
||||||
this.refreshMeters(spinTotal);
|
this.refreshMeters(spinTotal);
|
||||||
if (spinTotal / Math.max(1, this.bet) >= 10) this.stage?.bigMoment();
|
if (spinTotal / Math.max(1, this.bet) >= 10) {
|
||||||
|
this.stage?.bigMoment();
|
||||||
|
if (m.audio?.bigWin) await this.cueAudio(m.audio.bigWin);
|
||||||
|
}
|
||||||
await this.fx.bigWin(spinTotal, this.bet);
|
await this.fx.bigWin(spinTotal, this.bet);
|
||||||
this.setStatus(`WIN ${spinTotal.toLocaleString()}`);
|
this.setStatus(`WIN ${spinTotal.toLocaleString()}`);
|
||||||
this.saveBest(spinTotal);
|
this.saveBest(spinTotal);
|
||||||
|
|
|
||||||
|
|
@ -334,7 +334,7 @@ export const MACHINES = [
|
||||||
name: "Pharaoh's Fortune",
|
name: "Pharaoh's Fortune",
|
||||||
tagline: 'Free Spins of the Nile',
|
tagline: 'Free Spins of the Nile',
|
||||||
era: 'modern',
|
era: 'modern',
|
||||||
audio: { music: null, intro: null },
|
audio: { music: 'slots/pharaohs.mp3', intro: null },
|
||||||
featureLabel: 'FREE SPINS',
|
featureLabel: 'FREE SPINS',
|
||||||
layout: { reels: 5, rows: 3 },
|
layout: { reels: 5, rows: 3 },
|
||||||
evaluation: 'lines',
|
evaluation: 'lines',
|
||||||
|
|
@ -429,7 +429,17 @@ export const MACHINES = [
|
||||||
name: 'Abyssal Treasures',
|
name: 'Abyssal Treasures',
|
||||||
tagline: 'Cascades of the Deep',
|
tagline: 'Cascades of the Deep',
|
||||||
era: 'modern',
|
era: 'modern',
|
||||||
audio: { music: null, intro: null },
|
audio: {
|
||||||
|
music: 'slots/abyssal-treasures.mp3',
|
||||||
|
intro: null,
|
||||||
|
bigWin: 'assets/speech/slots/abyssal-big-win.mp3',
|
||||||
|
// Tiered cascade cue — plays the moment the ladder indicator reaches
|
||||||
|
// the rung (×4 → 4x, ×6 → 6x).
|
||||||
|
cascades: {
|
||||||
|
4: 'assets/speech/slots/abyssal-4x.mp3',
|
||||||
|
6: 'assets/speech/slots/abyssal-6x.mp3',
|
||||||
|
},
|
||||||
|
},
|
||||||
featureLabel: 'CASCADING REELS',
|
featureLabel: 'CASCADING REELS',
|
||||||
layout: { reels: 5, rows: 3 },
|
layout: { reels: 5, rows: 3 },
|
||||||
evaluation: 'lines',
|
evaluation: 'lines',
|
||||||
|
|
@ -509,7 +519,7 @@ export const MACHINES = [
|
||||||
name: "Dragon's Hoard",
|
name: "Dragon's Hoard",
|
||||||
tagline: 'Hold & Spin Jackpots',
|
tagline: 'Hold & Spin Jackpots',
|
||||||
era: 'modern',
|
era: 'modern',
|
||||||
audio: { music: null, intro: null },
|
audio: { music: 'slots/dragons-hoard.mp3', intro: null, bigWin: 'assets/speech/slots/dragon-big-win.mp3' },
|
||||||
featureLabel: 'JACKPOT COINS',
|
featureLabel: 'JACKPOT COINS',
|
||||||
layout: { reels: 5, rows: 3 },
|
layout: { reels: 5, rows: 3 },
|
||||||
evaluation: 'lines',
|
evaluation: 'lines',
|
||||||
|
|
@ -627,9 +637,13 @@ export const MACHINES = [
|
||||||
// (replaces the stock sticky-wild fx)
|
// (replaces the stock sticky-wild fx)
|
||||||
// dynamite tiered by sticks on the reels after the spin: index 0 = 1,
|
// 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
|
||||||
|
// cascades tiered cascade cue: multiplier → clip, played the moment
|
||||||
|
// the cascade ladder indicator reaches that rung
|
||||||
|
// bigWin plays once when the spin settles as a Big Win (≥10× bet)
|
||||||
audio: {
|
audio: {
|
||||||
music: 'slots/gold-rush-gulch.mp3',
|
music: 'slots/gold-rush-gulch.mp3',
|
||||||
intro: 'assets/speech/slots/gold-rush-gulch-intro.mp3',
|
intro: 'assets/speech/slots/gold-rush-gulch-intro.mp3',
|
||||||
|
bigWin: 'assets/speech/slots/gold-rush-big-win.mp3',
|
||||||
bandit: 'assets/speech/slots/gold-rush-gulch-bandit.mp3',
|
bandit: 'assets/speech/slots/gold-rush-gulch-bandit.mp3',
|
||||||
dynamite: [
|
dynamite: [
|
||||||
'assets/speech/slots/gold-rush-one-dynomite.mp3',
|
'assets/speech/slots/gold-rush-one-dynomite.mp3',
|
||||||
|
|
@ -724,7 +738,7 @@ export const MACHINES = [
|
||||||
name: 'Sugar Spin',
|
name: 'Sugar Spin',
|
||||||
tagline: 'Tumbling Candy Mountain',
|
tagline: 'Tumbling Candy Mountain',
|
||||||
era: 'modern',
|
era: 'modern',
|
||||||
audio: { music: null, intro: null },
|
audio: { music: 'slots/sugar-spins.mp3', intro: null, bigWin: 'assets/speech/slots/sugar-big-win.mp3' },
|
||||||
featureLabel: 'TUMBLE WINS',
|
featureLabel: 'TUMBLE WINS',
|
||||||
layout: { reels: 6, rows: 5 },
|
layout: { reels: 6, rows: 5 },
|
||||||
evaluation: 'scatterPays',
|
evaluation: 'scatterPays',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue