Merge branch 'dev' into gold-rush
This commit is contained in:
commit
849aaabb79
@ -43,7 +43,7 @@ class Game:
|
||||
self.someone_won = False
|
||||
self.attack_in_progress = False
|
||||
self.characters_to_distribute = 2 # personaggi da dare a inizio partita
|
||||
self.debug = False
|
||||
self.debug = self.name == 'debug'
|
||||
|
||||
def reset(self):
|
||||
print('resetting lobby')
|
||||
@ -603,6 +603,7 @@ class Game:
|
||||
'is_ghost': pls[j].is_ghost,
|
||||
'is_bot': pls[j].is_bot,
|
||||
'icon': pls[j].role.icon if (pls[j].role is not None) else '🤠',
|
||||
'role': pls[j].role,
|
||||
} for j in range(len(pls)) if i != j]
|
||||
|
||||
def get_alive_players(self):
|
||||
|
@ -366,8 +366,9 @@ class Player:
|
||||
self.is_using_checchino = True
|
||||
self.available_cards = [{
|
||||
'name': p['name'],
|
||||
'icon': p.role.icon if(self.game.initial_players == 3) else '⭐️' if p['is_sheriff'] else '🤠',
|
||||
'alt_text': ''.join(['❤️']*p['lives'])+''.join(['💀']*(p['max_lives']-p['lives']))
|
||||
'icon': p['role'].icon if(self.game.initial_players == 3) else '⭐️' if p['is_sheriff'] else '🤠',
|
||||
'alt_text': ''.join(['❤️']*p['lives'])+''.join(['💀']*(p['max_lives']-p['lives'])),
|
||||
'desc': p['name']
|
||||
} for p in self.game.get_visible_players(self) if p['dist'] <= self.get_sight()]
|
||||
self.available_cards.append({'icon': '❌', 'noDesc': True})
|
||||
self.choose_text = 'choose_cecchino'
|
||||
@ -1009,7 +1010,7 @@ class Player:
|
||||
self.notify_self()
|
||||
|
||||
def holyday_special(self, data):
|
||||
if self.character.check(self.game, chd.DocHolyday) and self.special_use_count < 1:
|
||||
if self.character.check(self.game, chd.DocHolyday) and self.special_use_count < 1 and self.pending_action == PendingAction.PLAY:
|
||||
self.special_use_count += 1
|
||||
cards = sorted(data['cards'], reverse=True)
|
||||
for c in cards:
|
||||
|
@ -1,6 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" data-build-timestamp-utc="<%= new Date().toISOString() %>">
|
||||
<html lang="en" translate="no" class="notranslate" data-build-timestamp-utc="<%= new Date().toISOString() %>">
|
||||
<head>
|
||||
<meta name="google" content="notranslate" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
|
@ -24,7 +24,7 @@
|
||||
<button class="btn" v-if="is_my_turn && character.name === 'Sid Ketchum' && lives < max_lives && hand.length > 1" @click="sidWantsScrapForHealth=true">{{$t('special_ability')}}</button>
|
||||
<button class="btn" v-if="is_my_turn && character.name === 'Chuck Wengam' && lives > 1" @click="chuckSpecial">{{$t('special_ability')}}</button>
|
||||
<button class="btn" v-if="is_my_turn && character.name === 'José Delgado' && special_use_count < 2 && hand.filter(x => x.is_equipment).length > 0" @click="joseScrap=true">{{$t('special_ability')}}</button>
|
||||
<button class="btn" v-if="is_my_turn && character.name === 'Doc Holyday' && special_use_count < 1 && hand.length > 1" @click="holydayScrap=true">{{$t('special_ability')}}</button>
|
||||
<button class="btn" v-if="is_my_turn && character.name === 'Doc Holyday' && special_use_count < 1 && hand.length > 1 && pending_action == 2" @click="holydayScrap=true">{{$t('special_ability')}}</button>
|
||||
</div>
|
||||
<div v-if="lives > 0 || is_ghost" style="position:relative">
|
||||
<span id="hand_text">{{$t('hand')}}</span>
|
||||
@ -310,7 +310,7 @@ export default {
|
||||
},
|
||||
holydayScrapBang(other) {
|
||||
this.$socket.emit('holyday_special', {
|
||||
cards : [this.hand.indexOf(this.scrapHand[0]), this.hand.indexOf(this.scrapHand[1])],
|
||||
cards : [this.scrapHand[0], this.scrapHand[1]],
|
||||
against: other.name
|
||||
})
|
||||
this.scrapHand = []
|
||||
|
Loading…
Reference in New Issue
Block a user