Merge branch 'dev' into main

This commit is contained in:
Giulio 2021-06-24 17:57:07 +02:00
commit edcc3085ad

View File

@ -21,10 +21,10 @@
<p v-if="desc"><i>{{desc}}</i></p> <p v-if="desc"><i>{{desc}}</i></p>
</transition> </transition>
<div style="margin-bottom:6pt;margin-bottom: 6pt;display: flex;flex-direction: column;"> <div style="margin-bottom:6pt;margin-bottom: 6pt;display: flex;flex-direction: column;">
<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': true, 'cant-play':(pending_action != 2)}" :disabled="pending_action != 2" v-if="!(eventCard && eventCard.name == 'Sbornia') && 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': true, 'cant-play':(pending_action != 2)}" :disabled="pending_action != 2" v-if="!(eventCard && eventCard.name == 'Sbornia') && 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': true, 'cant-play':(pending_action != 2)}" :disabled="pending_action != 2" v-if="!(eventCard && eventCard.name == 'Sbornia') && 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 && pending_action == 2" @click="holydayScrap=true">{{$t('special_ability')}}</button> <button :class="{'btn': true, 'cant-play':(pending_action != 2)}" :disabled="pending_action != 2" v-if="!(eventCard && eventCard.name == 'Sbornia') && is_my_turn && character.name === 'Doc Holyday' && special_use_count < 1 && hand.length > 1" @click="holydayScrap=true">{{$t('special_ability')}}</button>
</div> </div>
<div v-if="lives > 0 || is_ghost" style="position:relative"> <div v-if="lives > 0 || is_ghost" style="position:relative">
<span id="hand_text">{{$t('hand')}}</span> <span id="hand_text">{{$t('hand')}}</span>
@ -285,7 +285,7 @@ export default {
sidScrap(c) { sidScrap(c) {
this.scrapHand.push(this.hand.indexOf(c)) this.scrapHand.push(this.hand.indexOf(c))
if (this.scrapHand.length == 2) { if (this.scrapHand.length == 2) {
let x = [this.hand.indexOf(this.scrapHand[0]), this.hand.indexOf(this.scrapHand[1])].sort().reverse() let x = [this.scrapHand[0], this.scrapHand[1]].sort().reverse()
this.$socket.emit('scrap', x[0]) this.$socket.emit('scrap', x[0])
this.$socket.emit('scrap', x[1]) this.$socket.emit('scrap', x[1])
this.scrapHand = [] this.scrapHand = []