Added more sound effects
Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
parent
c4cb0b84e2
commit
ffbbb647bc
BIN
client/public/assets/the-knights-who-say-ni.mp3
Executable file
BIN
client/public/assets/the-knights-who-say-ni.mp3
Executable file
Binary file not shown.
@ -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}>
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user