games: burial send-offs, money rain on wins, and honest stack targeting
Three front-end changes to the casino games:
- uno: a draw-card stack now names the seat it's actually pointed at
("+N on Beep") instead of always reading "+N on you". The bill reads
v.turn, which the engine advances to the target when a draw card lands.
- uno: the No Mercy rule buries a seat with some ceremony now. bury()
rolls one of four send-offs over the seat (or your hand, if it's you) —
a rockslide that piles up, a tombstone, a coffin, or the Mega Man death
burst — each with its own synth sound, and a static headstone under
reduced motion. The "Buried on N" badge still rides alongside.
- all games: winning makes it rain. FX.moneyRain drops a curtain of bills
and coins with a jackpot coin-cascade sound, gated by significance so it
reads as a win and not as noise: hold'em keeps its light per-pot confetti
and only rains on a real haul (>= 20bb), while the confetti stays the
rare cherry (natural 21, full board clear, phrase solved outright).
This commit is contained in:
@@ -264,6 +264,17 @@
|
||||
});
|
||||
},
|
||||
|
||||
// It rains money. A bright run of coins spilling out over the win fanfare —
|
||||
// ten metallic pings climbing a pentatonic scale, each with a tick on the
|
||||
// front of it so it lands as coin rather than as bell.
|
||||
jackpot: function (t) {
|
||||
var notes = [784, 988, 1175, 1319, 1568, 1760];
|
||||
for (var i = 0; i < 10; i++) {
|
||||
tone(t + i * 0.05, notes[i % notes.length], { type: "triangle", decay: 0.13, gain: 0.09 });
|
||||
hiss(t + i * 0.05, { freq: 5200, q: 3, decay: 0.02, gain: 0.05 });
|
||||
}
|
||||
},
|
||||
|
||||
// Two notes down, and the second one is flat. Nobody needs telling twice.
|
||||
lose: function (t) {
|
||||
tone(t, 311.13, { type: "triangle", decay: 0.24, gain: 0.22 });
|
||||
@@ -307,6 +318,43 @@
|
||||
tick: function (t) {
|
||||
hiss(t, { freq: 3200, q: 3, decay: 0.02, gain: 0.14 });
|
||||
},
|
||||
|
||||
// The mercy rule buries someone. Four ways to go, one sound each — uno.js
|
||||
// rolls which animation plays and asks for the sound that matches it.
|
||||
//
|
||||
// Rocks coming down: a low rumble with tumbling knocks over the top, and a
|
||||
// second slump as the pile settles.
|
||||
rockslide: function (t) {
|
||||
hiss(t, { filter: "lowpass", freq: 320, sweepTo: 140, decay: 0.5, gain: 0.34, q: 0.6 });
|
||||
for (var i = 0; i < 6; i++) {
|
||||
tone(t + i * 0.055, 128 - i * 9, { type: "square", decay: 0.1, gain: 0.09 });
|
||||
}
|
||||
hiss(t + 0.3, { filter: "lowpass", freq: 200, decay: 0.32, gain: 0.3, q: 0.5 });
|
||||
},
|
||||
|
||||
// A headstone dropping in: one heavy stone thud that rings a little as it sets.
|
||||
tombstone: function (t) {
|
||||
tone(t, 92, { type: "sine", to: 58, glide: 0.16, decay: 0.42, gain: 0.32 });
|
||||
hiss(t, { filter: "lowpass", freq: 520, decay: 0.12, gain: 0.34, q: 0.6 });
|
||||
tone(t + 0.02, 184, { type: "triangle", decay: 0.5, gain: 0.08 });
|
||||
},
|
||||
|
||||
// The Mega Man death: the pieces zip outward and the pitch falls away as they go.
|
||||
zap: function (t) {
|
||||
tone(t, 1250, { type: "sawtooth", to: 170, glide: 0.34, decay: 0.36, gain: 0.12 });
|
||||
for (var i = 0; i < 4; i++) {
|
||||
tone(t + i * 0.02, 940 - i * 130, { type: "square", decay: 0.06, gain: 0.06 });
|
||||
}
|
||||
hiss(t, { freq: 3000, sweepTo: 600, decay: 0.3, gain: 0.1, q: 0.8 });
|
||||
},
|
||||
|
||||
// A coffin lid: two flat wooden knocks, the second lower and heavier.
|
||||
coffin: function (t) {
|
||||
tone(t, 150, { type: "triangle", decay: 0.14, gain: 0.26 });
|
||||
hiss(t, { filter: "lowpass", freq: 820, decay: 0.05, gain: 0.24, q: 0.7 });
|
||||
tone(t + 0.17, 108, { type: "triangle", decay: 0.22, gain: 0.28 });
|
||||
hiss(t + 0.17, { filter: "lowpass", freq: 600, decay: 0.06, gain: 0.24, q: 0.7 });
|
||||
},
|
||||
};
|
||||
|
||||
// ---- the door --------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user