minor improvements

This commit is contained in:
Alberto Xamin 2021-01-23 21:39:06 +01:00
parent 4dc8d4b1e8
commit 4c50559144
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
5 changed files with 10 additions and 2 deletions

View File

@ -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):

Binary file not shown.

Binary file not shown.

View File

@ -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 {

View File

@ -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