suzy and should add hover for mobile

This commit is contained in:
Alberto Xamin 2020-11-23 13:42:35 +01:00
parent 91ffae84cf
commit 9b31d8f944
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
3 changed files with 4 additions and 2 deletions

View File

@ -80,6 +80,8 @@ class Player:
self.game.player_death(self) self.game.player_death(self)
if isinstance(self.character, characters.CalamityJanet): if isinstance(self.character, characters.CalamityJanet):
self.expected_response = [cards.Mancato(0,0).name, cards.Bang(0,0).name] self.expected_response = [cards.Mancato(0,0).name, cards.Bang(0,0).name]
elif isinstance(self.character, characters.SuzyLafayette) and len(self.hand) == 0:
self.hand.append(self.game.deck.draw())
ser = self.__dict__.copy() ser = self.__dict__.copy()
ser.pop('game') ser.pop('game')
ser.pop('sio') ser.pop('sio')

View File

@ -2,7 +2,7 @@
<div id="overlay" class="center-stuff"> <div id="overlay" class="center-stuff">
<h1>{{text}}</h1> <h1>{{text}}</h1>
<div> <div>
<Card v-for="c in cards" v-bind:key="c" :card="c" @click.native="select(c)" @mouseover.native="showDesc(c)" @mouseleave.native="desc=''"/> <Card v-for="c in cards" v-bind:key="c" :card="c" @click.native="select(c)" @pointerenter.native="showDesc(c)" @pointerleave.native="desc=''"/>
</div> </div>
<p v-if="hintText">{{hintText}}</p> <p v-if="hintText">{{hintText}}</p>
<div class="button center-stuff" v-if="showCancelBtn" @click="cancel"><span>{{cancelText}}</span></div> <div class="button center-stuff" v-if="showCancelBtn" @click="cancel"><span>{{cancelText}}</span></div>

View File

@ -18,7 +18,7 @@
<transition-group name="list" tag="div" class="hand"> <transition-group name="list" tag="div" class="hand">
<Card v-for="card in hand" v-bind:key="card.name+card.number" :card="card" <Card v-for="card in hand" v-bind:key="card.name+card.number" :card="card"
@click.native="play_card(card)" @click.native="play_card(card)"
@mouseover.native="hint=card.desc" @mouseleave.native="hint=''"/> @pointerenter.native="hint=card.desc" @pointerleave.native="hint=''"/>
</transition-group> </transition-group>
</div> </div>
<p>{{hint}}</p> <p>{{hint}}</p>