You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.3 KiB

// A game's manifest maps semantic event IDs to local audio assets.
// Rules return the event ID; clients decide when and at what volume to play it.
const effect = (name, volume = 0.8) => ({
src: `/sounds/v2/${name}.wav`,
volume,
});
const endings = {
start: effect('start', 0.65),
win: effect('win', 0.65),
loss: effect('loss', 0.55),
draw: effect('draw', 0.55),
finish: effect('draw', 0.55),
};
export const gameSounds = {
ajedrez: {
...endings,
move: effect('chess-move'),
capture: effect('chess-capture'),
check: effect('check', 0.6),
promotion: effect('promotion', 0.65),
},
damas: {
...endings,
move: effect('checkers-move'),
capture: effect('checkers-capture'),
promotion: effect('promotion', 0.65),
},
parchis: {
...endings,
roll: { ...effect('dice-roll'), announceNumber: true, language: 'es-ES' },
shake: effect('cup-shake', 0.6),
move: effect('parchis-move'),
capture: effect('parchis-capture'),
goal: effect('goal', 0.65),
pass: effect('turn', 0.45),
},
go: {
...endings,
move: effect('go-place'),
capture: effect('go-capture'),
pass: effect('turn', 0.45),
},
oca: {
...endings,
roll: { ...effect('dice-roll'), announceNumber: true, language: 'es-ES' },
shake: effect('cup-shake', 0.6),
move: effect('oca-move'),
goal: effect('goal', 0.65),
bonus: effect('oca-bonus', 0.65),
penalty: effect('oca-penalty', 0.6),
},
monopoli: {
...endings,
roll: effect('dice-roll'),
move: effect('parchis-move'),
buy: effect('coin-buy'),
payment: effect('coin-payment'),
build: effect('build'),
},
cluedo: {
...endings,
roll: effect('dice-roll'),
move: effect('parchis-move'),
suggestion: effect('mystery-suggest', 0.5),
reveal: effect('card-play'),
accusation: effect('mystery-accuse', 0.6),
},
risk: {
...endings,
reinforce: effect('risk-reinforce'),
attack: effect('risk-attack'),
conquest: effect('promotion', 0.65),
move: effect('risk-reinforce'),
},
tute: {
...endings,
play: effect('tute-card'),
trick: effect('card-collect'),
sing: effect('promotion', 0.65),
},
brisca: {
...endings,
play: effect('brisca-card'),
trick: effect('card-collect'),
},
};

Powered by TurnKey Linux.