show wild west show cards in help screen
This commit is contained in:
parent
4e0839350b
commit
f56120d44e
@ -85,4 +85,5 @@ def all_characters() -> List[Character]:
|
||||
]
|
||||
for c in cards:
|
||||
c.expansion_icon = '👻️'
|
||||
c.expansion = 'the_valley_of_shadows'
|
||||
return cards
|
||||
|
@ -745,7 +745,7 @@ def get_cards(sid):
|
||||
@bang_handler
|
||||
def get_characters(sid):
|
||||
import bang.characters as ch
|
||||
cards = ch.all_characters(['dodge_city', 'gold_rush', 'the_valley_of_shadows'])
|
||||
cards = ch.all_characters(['dodge_city', 'gold_rush', 'the_valley_of_shadows', 'wild_west_show'])
|
||||
sio.emit('characters_info', room=sid, data=json.dumps(cards, default=lambda o: o.__dict__))
|
||||
|
||||
@sio.event
|
||||
@ -790,6 +790,15 @@ def get_valleyofshadowscards(sid):
|
||||
cards = [cards_dict[i] for i in cards_dict]
|
||||
sio.emit('valleyofshadows_info', room=sid, data=json.dumps(cards, default=lambda o: o.__dict__))
|
||||
|
||||
@sio.event
|
||||
@bang_handler
|
||||
def get_wildwestshowcards(sid):
|
||||
import bang.expansions.wild_west_show.card_events as wwce
|
||||
chs = []
|
||||
chs.extend(wwce.get_all_events())
|
||||
chs.append(wwce.get_endgame_card())
|
||||
sio.emit('wwscards_info', room=sid, data=json.dumps(chs, default=lambda o: o.__dict__))
|
||||
|
||||
@sio.event
|
||||
@bang_handler
|
||||
def discord_auth(sid, data):
|
||||
|
@ -118,6 +118,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2 id="wildwestshowcards">{{$t('help.wildwestshowcards')}}</h2>
|
||||
<div class="flexy-cards-wrapper">
|
||||
<div v-for="(c, i) in wildwestshowcards" v-bind:key="c.name ? (c.name+c.number) : i" class="flexy-cards">
|
||||
<Card :card="c" class="wild-west-show" @pointerenter.native="''" @pointerleave.native="''"/>
|
||||
<div style="margin-left:6pt;">
|
||||
<p>{{$t(`cards.${c.name}.desc`)}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -142,6 +151,7 @@ export default {
|
||||
foccards: [],
|
||||
goldrushcards: [],
|
||||
valleyofshadowscards: [],
|
||||
wildwestshowcards: [],
|
||||
}),
|
||||
computed: {
|
||||
endTurnCard() {
|
||||
@ -181,6 +191,11 @@ export default {
|
||||
...x,
|
||||
}))
|
||||
},
|
||||
wwscards_info(cardsJson) {
|
||||
this.wildwestshowcards = JSON.parse(cardsJson).map(x=>({
|
||||
...x,
|
||||
}))
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$socket.emit('get_cards')
|
||||
@ -189,6 +204,7 @@ export default {
|
||||
this.$socket.emit('get_foccards')
|
||||
this.$socket.emit('get_goldrushcards')
|
||||
this.$socket.emit('get_valleyofshadowscards')
|
||||
this.$socket.emit('get_wildwestshowcards')
|
||||
document.getElementById('help').scrollIntoView();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user