diff --git a/backend/bang/deck.py b/backend/bang/deck.py index 2112620..9b36489 100644 --- a/backend/bang/deck.py +++ b/backend/bang/deck.py @@ -98,6 +98,7 @@ class Deck: if len(self.scrap_pile) > 0: card = self.scrap_pile.pop(-1) self.game.notify_scrap_pile() + card.reset_card() return card else: return self.draw() diff --git a/backend/bang/game.py b/backend/bang/game.py index ef6cab8..b0717c3 100644 --- a/backend/bang/game.py +++ b/backend/bang/game.py @@ -578,8 +578,10 @@ class Game: else: for i in range(len(player.hand)): vulture[0].hand.append(player.hand.pop()) + vulture[0].hand[-1].reset_card() for i in range(len(player.equipment)): vulture[0].hand.append(player.equipment.pop()) + vulture[0].hand[-1].reset_card() vulture[0].notify_self() #se Vulture Sam è uno sceriffo e ha appena ucciso il suo Vice, deve scartare le carte che ha pescato con la sua abilità @@ -589,13 +591,13 @@ class Game: player.attacker.notify_self() greg = [p for p in self.get_alive_players() if p.character.check(self, chd.GregDigger)] - if len(greg) > 0: - greg[0].lives = min(greg[0].lives+2, greg[0].max_lives) + for i in range(len(greg)): + greg[i].lives = min(greg[i].lives+2, greg[i].max_lives) herb = [p for p in self.get_alive_players() if p.character.check(self, chd.HerbHunter)] - if len(herb) > 0: - herb[0].hand.append(self.deck.draw(True)) - herb[0].hand.append(self.deck.draw(True)) - herb[0].notify_self() + for i in range(len(herb)): + herb[i].hand.append(self.deck.draw(True)) + herb[i].hand.append(self.deck.draw(True)) + herb[i].notify_self() self.is_handling_death = False if corpse.is_my_turn: corpse.is_my_turn = False diff --git a/backend/bang/players.py b/backend/bang/players.py index 4e3af6f..d6492ea 100644 --- a/backend/bang/players.py +++ b/backend/bang/players.py @@ -954,8 +954,8 @@ class Player: data=f'_special_bart_cassidy|{self.name}') self.hand.append(self.game.deck.draw(True)) elif self.character.check(self.game, chars.ElGringo) and self.attacker and self.attacker in self.game.get_alive_players() and len(self.attacker.hand) > 0: - self.hand.append(self.attacker.hand.pop( - randrange(0, len(self.attacker.hand)))) + self.hand.append(self.attacker.hand.pop(randrange(0, len(self.attacker.hand)))) + self.hand[-1].reset_card() self.sio.emit('chat_message', room=self.game.name, data=f'_special_el_gringo|{self.name}|{self.attacker.name}') self.attacker.notify_self() diff --git a/frontend/public/index.html b/frontend/public/index.html index 61a29af..d935a74 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -4,7 +4,7 @@ - + diff --git a/frontend/src/App.vue b/frontend/src/App.vue index d556899..86a09e3 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -253,6 +253,9 @@ html, #app, input, select { border-radius: 12pt; cursor: pointer; transition: all 0.13s ease-in-out; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; } .btn:hover:not([disabled]) { background-color: var(--font-color); /* Green */ diff --git a/frontend/src/components/Chat.vue b/frontend/src/components/Chat.vue index 5f9372e..2d1e63e 100644 --- a/frontend/src/components/Chat.vue +++ b/frontend/src/components/Chat.vue @@ -166,6 +166,7 @@ input { @media only screen and (max-width:1000px) { #msg-form { flex-direction: column; + margin-bottom: 50pt; } #submit-message { margin-top: 6pt; diff --git a/frontend/src/components/Menu.vue b/frontend/src/components/Menu.vue index 03e970a..29982e3 100644 --- a/frontend/src/components/Menu.vue +++ b/frontend/src/components/Menu.vue @@ -12,8 +12,8 @@
-

{{$t("choose_username")}}

-
+

{{$t("choose_username")}}

+
@@ -24,7 +24,7 @@

{{$t("online_players")}}{{onlinePlayers}}

{{$t("create_lobby")}}

-
+

{{$t("lobby_name")}}

@@ -147,10 +147,25 @@ export default { mounted() { if (localStorage.getItem('username')) this.username = localStorage.getItem('username') + else { + let names = ['player', 'cowboy', 'madman', 'horseshoe', 'mustang', '🤠️', 'dog lover', 'random', 'cows', 'seagull', 'pewneer', 'pioneer', 'django', 'tarantined', 'horse', 'cinnamom', 'toast', 'notPewDiePie', 'username', 'caveman', 'cat', 'gold', 'chicken', 'nugget', 'bullet', 'fire', 'scott', 'emiliano', 'apple', 'pear', 'pencil', 'youtuber', 'hi mom', 'discord guy', '🥰️', 'somebody', 'AAAAA', 'BBBB', 'pain', 'help?', 'gg', 'gigi', 'lmao', 'yikes', 'you?', 'kid', 'cowgirl', 'bite', 'hungry', 'joe', 'limbo', 'leeeroy', 'jenkins', 'batman', 'spiderman', 'luke skywalker', 'nemo', 'zemo', 'ironman', 'butterman', 'postman', 'father', 'son', 'sven', 'mike', 'straw', 'saaay', 'whaaaat', 'rick', 'morty', 'wubbalubbadubdub'] + this.username = names[Math.floor(Math.random() * names.length)] + } this.$socket.emit('get_online_players') }, } diff --git a/frontend/src/components/Status.vue b/frontend/src/components/Status.vue index eb0d3d8..58fc9c5 100644 --- a/frontend/src/components/Status.vue +++ b/frontend/src/components/Status.vue @@ -19,9 +19,9 @@
  • name: {{p.name}}

    -

    is_bot: {{p.is_bot}}

    +

    is_bot: {{p.bot}}

    health: {{p.health}}

    - +