Merge branch 'dev' into main

This commit is contained in:
Giulio 2022-03-22 14:18:20 +01:00
commit 4fe7d09a8e
7 changed files with 17 additions and 11 deletions

View File

@ -15,7 +15,7 @@ jobs:
uses: crazy-max/ghaction-docker-buildx@v3
-
name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v3
id: cache
with:
path: /tmp/.buildx-cache

View File

@ -15,7 +15,7 @@ jobs:
uses: crazy-max/ghaction-docker-buildx@v3
-
name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v3
id: cache
with:
path: /tmp/.buildx-cache

View File

@ -14,7 +14,7 @@ jobs:
uses: crazy-max/ghaction-docker-buildx@v3
-
name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v3
id: cache
with:
path: /tmp/.buildx-cache

View File

@ -398,18 +398,18 @@ class Game:
if did_lose:
target_pl = pls[(pls.index(self.players[self.turn]) + self.player_bangs) % len(pls)]
print(f'{self.name}: stop roulette')
target_pl.lives -= 1
if len([c for c in target_pl.equipment if isinstance(c, grc.Talismano)]) > 0:
target_pl.lives -= 2
target_pl.heal_if_needed()
if len([c for c in target_pl.gold_rush_equipment if isinstance(c, grc.Talismano)]) > 0:
target_pl.gold_nuggets += 1
if target_pl.character.check(self, grch.SimeonPicos):
target_pl.gold_nuggets += 1
if len([c for c in target_pl.equipment if isinstance(c, grc.Stivali)]) > 0:
if len([c for c in target_pl.gold_rush_equipment if isinstance(c, grc.Stivali)]) > 0:
target_pl.hand.append(self.deck.draw(True))
target_pl.notify_self()
self.is_russian_roulette_on = False
self.players[self.turn].play_turn()
else:
self.player_bangs += 1
target_pl = pls[(pls.index(self.players[self.turn]) + self.player_bangs) % len(pls)]
print(f'{self.name}: next in line {target_pl.name}')
if target_pl.get_banged(self.deck.event_cards[0]):

View File

@ -166,7 +166,6 @@ class Player:
},{
'icon': '',
'noDesc': True
}]
self.is_drawing = True
self.choose_text = 'choose_guess'

View File

@ -5,6 +5,6 @@ greenlet==1.1.2
python-engineio==3.14.2
python-socketio==4.6.1
six==1.16.0
pytest==7.1.0
pytest==7.1.1
requests==2.27.1
discord-webhook==0.15.0

View File

@ -316,9 +316,16 @@ export default {
this.hasToChoose = true
},
chooseCard(card) {
this.$socket.emit('choose', this.chooseCards.indexOf(card))
let index = this.chooseCards.indexOf(card)
if (!this.debug_mode) {
let pl = this.players.filter(x=>x.name === this.target_p)[0]
if (index < pl.ncards) {
index = Math.floor(Math.random() * pl.ncards)
}
}
this.$socket.emit('choose', index)
if (Vue.config.devtools)
console.log(card + ' ' + this.chooseCards.indexOf(card))
console.log(card + ' ' + index)
this.chooseCards = []
this.hasToChoose = false
this.target_p = ''