minor improvements
This commit is contained in:
parent
4dc8d4b1e8
commit
4c50559144
@ -305,6 +305,7 @@ class CanCan(CatBalou):
|
||||
|
||||
def play_card(self, player, against, _with=None):
|
||||
if self.can_be_used_now:
|
||||
player.sio.emit('chat_message', room=player.game.name, data=f'_play_card_against|{player.name}|{self.name}|{against}')
|
||||
return super().play_card(player, against)
|
||||
else:
|
||||
if not self.is_duplicate_card(player):
|
||||
|
BIN
frontend/src/assets/sounds/dynamite.mp3
Normal file
BIN
frontend/src/assets/sounds/dynamite.mp3
Normal file
Binary file not shown.
BIN
frontend/src/assets/sounds/prison.mp3
Normal file
BIN
frontend/src/assets/sounds/prison.mp3
Normal file
Binary file not shown.
@ -16,6 +16,8 @@
|
||||
<script>
|
||||
import message_sfx from '@/assets/sounds/tap-kissy.mp3'
|
||||
import notification_sfx from '@/assets/sounds/tap-sizzle.mp3'
|
||||
import dynamite_sfx from '@/assets/sounds/dynamite.mp3'
|
||||
import prison_sfx from '@/assets/sounds/prison.mp3'
|
||||
import turn_sfx from '@/assets/sounds/beep-holdtone.mp3'
|
||||
import death_sfx from '@/assets/sounds/beep-organ.mp3'
|
||||
export default {
|
||||
@ -37,9 +39,13 @@ export default {
|
||||
this.messages.push({text:this.$t(`chat.${type}`, params)});
|
||||
if (type == 'turn' && params[0] == this.username) {
|
||||
(new Audio(turn_sfx)).play();
|
||||
}else if (type == 'died_role') {
|
||||
} else if (type == 'died_role') {
|
||||
(new Audio(death_sfx)).play();
|
||||
}else{
|
||||
} else if (type == 'explode') {
|
||||
(new Audio(dynamite_sfx)).play();
|
||||
} else if (type == 'prison_turn') {
|
||||
(new Audio(prison_sfx)).play();
|
||||
} else {
|
||||
(new Audio(notification_sfx)).play();
|
||||
}
|
||||
}else {
|
||||
|
@ -256,6 +256,7 @@ export default {
|
||||
if ((x.name == 'Bang!' || (calamity_special && x.name=='Mancato!')) && (cant_play_bang || (this.eventCard && this.eventCard.name == "Sermone"))) cantBePlayed = true;
|
||||
else if (this.eventCard && this.eventCard.name == "Il Giudice" && (x.is_equipment || !x.can_be_used_now)) cantBePlayed = true;
|
||||
else if (this.eventCard && this.eventCard.name == "Il Reverendo" && (x.name == "Birra")) cantBePlayed = true;
|
||||
else if (this.need_with && this.hand.length === 1) cantBePlayed = true;
|
||||
return {
|
||||
...x,
|
||||
cantBePlayed: cantBePlayed
|
||||
|
Loading…
Reference in New Issue
Block a user