1
0

Added more sound effects

Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
James Ketrenos 2022-06-21 10:26:54 -07:00
parent c4cb0b84e2
commit ffbbb647bc
3 changed files with 16 additions and 1 deletions

Binary file not shown.

View File

@ -396,6 +396,21 @@ const Table = () => {
audioEffects.robber.hasPlayed = false;
}
}
if (turn && turn.actions && turn.actions.indexOf('playing-knight') !== -1) {
if (!audioEffects.knights) {
audioEffects.knights = loadAudio('the-knights-who-say-ni.mp3');
} else {
if (!audioEffects.knights.hasPlayed) {
audioEffects.knights.hasPlayed = true;
audioEffects.knights.play();
}
}
} else if (turn && turn.actions && turn.actions.indexOf('playing-knight') === -1) {
if (audioEffects.knights) {
audioEffects.knights.hasPlayed = false;
}
}
}, [turn, color]);
return <GlobalContext.Provider value={global}>

View File

@ -2473,7 +2473,7 @@ const playCard = (game, session, card) => {
delete game.turn.placedRobber;
addChatMessage(game, null, `The robber ${game.robberName} has fled before the power of the Knight, ` +
`but a new robber has returned and ${session.name} must now place them.`);
game.turn.actions = [ 'place-robber' ];
game.turn.actions = [ 'place-robber', 'playing-knight' ];
game.turn.limits = { pips: [] };
for (let i = 0; i < 19; i++) {
if (i === game.robber) {