fix storm/racer wrong move sound
parent
a681cb7c13
commit
2c6628fed1
|
@ -33,6 +33,6 @@ export const loadSound = (file: string, volume?: number, delay?: number) => {
|
|||
export const sound = {
|
||||
move: (take: boolean) => lichess.sound.play(take ? 'capture' : 'move'),
|
||||
good: loadSound('lisp/PuzzleStormGood', 0.9, 1000),
|
||||
wrong: loadSound('lisp/Error', 0.5, 1000),
|
||||
wrong: loadSound('lisp/Error', 1, 1000),
|
||||
end: loadSound('lisp/PuzzleStormEnd', 1, 5000),
|
||||
};
|
||||
|
|
|
@ -143,7 +143,7 @@ export default class StormCtrl {
|
|||
}
|
||||
sound.move(captureSound);
|
||||
} else {
|
||||
lichess.sound.play('error');
|
||||
sound.wrong();
|
||||
this.run.errors++;
|
||||
this.run.combo.reset();
|
||||
if (this.run.clock.flag()) this.end();
|
||||
|
|
|
@ -109,7 +109,7 @@ export default class StormCtrl {
|
|||
}
|
||||
sound.move(captureSound);
|
||||
} else {
|
||||
lichess.sound.play('error');
|
||||
sound.wrong();
|
||||
this.pushToHistory(false);
|
||||
this.run.errors++;
|
||||
this.run.combo.reset();
|
||||
|
|
Loading…
Reference in New Issue