add gold rush to help
This commit is contained in:
parent
0b3f726a60
commit
fc485642db
@ -484,7 +484,7 @@ def get_cards(sid):
|
||||
@sio.event
|
||||
def get_characters(sid):
|
||||
import bang.characters as ch
|
||||
cards = ch.all_characters(['dodge_city'])
|
||||
cards = ch.all_characters(['dodge_city', 'gold_rush'])
|
||||
sio.emit('characters_info', room=sid, data=json.dumps(cards, default=lambda o: o.__dict__))
|
||||
|
||||
@sio.event
|
||||
@ -503,5 +503,16 @@ def get_foccards(sid):
|
||||
chs.append(ce.get_endgame_card())
|
||||
sio.emit('foccards_info', room=sid, data=json.dumps(chs, default=lambda o: o.__dict__))
|
||||
|
||||
@sio.event
|
||||
def get_goldrushcards(sid):
|
||||
import bang.expansions.gold_rush.shop_cards as grc
|
||||
cards = grc.get_cards()
|
||||
cards_dict = {}
|
||||
for ca in cards:
|
||||
if ca.name not in cards_dict:
|
||||
cards_dict[ca.name] = ca
|
||||
cards = [cards_dict[i] for i in cards_dict]
|
||||
sio.emit('goldrushcards_info', room=sid, data=json.dumps(cards, default=lambda o: o.__dict__))
|
||||
|
||||
if __name__ == '__main__':
|
||||
eventlet.wsgi.server(eventlet.listen(('', 5001)), app)
|
||||
|
@ -440,4 +440,5 @@ def get_starting_deck() -> List[Card]:
|
||||
]
|
||||
for c in cards:
|
||||
c.expansion_icon = '🐄️'
|
||||
c.expansion = 'dodge_city'
|
||||
return cards
|
||||
|
@ -154,6 +154,7 @@ def all_characters() -> List[Character]:
|
||||
]
|
||||
for c in cards:
|
||||
c.expansion_icon = '🐄️'
|
||||
c.expansion = 'dodge_city'
|
||||
return cards
|
||||
|
||||
#Apache Kid: il suo effetto non conta nei duelli
|
||||
|
@ -94,4 +94,5 @@ def all_characters() -> List[Character]:
|
||||
]
|
||||
for c in cards:
|
||||
c.expansion_icon = '🤑️'
|
||||
c.expansion = 'gold_rush'
|
||||
return cards
|
||||
|
@ -1,6 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1 id="help">{{$t('help.title')}}</h1>
|
||||
<a href="#thecards"><p>{{$t('help.gotocards')}}</p></a>
|
||||
<a href="#highnooncards"><p>{{$t('help.gotohighnoon')}}</p></a>
|
||||
<a href="#foccards"><p>{{$t('help.gotofoc')}}</p></a>
|
||||
<a href="#goldrushcards"><p>{{$t('help.gotogoldrush')}}</p></a>
|
||||
<h2>{{$t('help.character')}}</h2>
|
||||
<p>{{$t('help.characters_special')}}</p>
|
||||
<a href="#basecharacters"><p>{{$t('help.gotoallcharacters')}}</p></a>
|
||||
@ -55,29 +59,31 @@
|
||||
<li><p>{{$t('help.endgameshriffdeath')}}</p></li>
|
||||
<li><p>{{$t('help.endgamesheriffwin')}}</p></li>
|
||||
</ul>
|
||||
<h2>{{$t('help.thecards')}}</h2>
|
||||
<div>
|
||||
<div v-for="(c, i) in cards" v-bind:key="c.name ? (c.name+c.number) : i" style="display:flex">
|
||||
<h2 id="thecards">{{$t('help.thecards')}}</h2>
|
||||
<div class="flexy-cards-wrapper">
|
||||
<div v-for="(c, i) in cards" v-bind:key="c.name ? (c.name+c.number) : i" class="flexy-cards">
|
||||
<Card :card="c" @pointerenter.native="''" @pointerleave.native="''"/>
|
||||
<div style="margin-left:6pt;">
|
||||
<p>{{$t(`cards.${c.name}.desc`)}}</p>
|
||||
<p v-if="c.is_equipment"><b>{{$t('help.equipment')}}</b></p>
|
||||
<p v-if="c.is_weapon"><b>{{$t('help.weapon')}}</b></p>
|
||||
<p v-if="c.expansion"><b>{{c.expansion}}</b></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2 id="basecharacters">{{$t('help.allcharacters')}}</h2>
|
||||
<div>
|
||||
<div v-for="(c, i) in characters" v-bind:key="c.name ? (c.name+c.number) : i" style="display:flex">
|
||||
<div class="flexy-cards-wrapper">
|
||||
<div v-for="(c, i) in characters" v-bind:key="c.name ? (c.name+c.number) : i" class="flexy-cards">
|
||||
<Card :card="c" @pointerenter.native="''" @pointerleave.native="''"/>
|
||||
<div style="margin-left:6pt;">
|
||||
<p>{{$t(`cards.${c.name}.desc`)}}</p>
|
||||
<p v-if="c.expansion"><b>{{c.expansion}}</b></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2 id="highnooncards">{{$t('help.highnooncards')}}</h2>
|
||||
<div>
|
||||
<div v-for="(c, i) in highnooncards" v-bind:key="c.name ? (c.name+c.number) : i" style="display:flex">
|
||||
<div class="flexy-cards-wrapper">
|
||||
<div v-for="(c, i) in highnooncards" v-bind:key="c.name ? (c.name+c.number) : i" class="flexy-cards">
|
||||
<Card :card="c" :class="'high-noon last-event'" @pointerenter.native="''" @pointerleave.native="''"/>
|
||||
<div style="margin-left:6pt;">
|
||||
<p>{{$t(`cards.${c.name}.desc`)}}</p>
|
||||
@ -85,14 +91,23 @@
|
||||
</div>
|
||||
</div>
|
||||
<h2 id="foccards">{{$t('help.foccards')}}</h2>
|
||||
<div>
|
||||
<div v-for="(c, i) in foccards" v-bind:key="c.name ? (c.name+c.number) : i" style="display:flex">
|
||||
<div class="flexy-cards-wrapper">
|
||||
<div v-for="(c, i) in foccards" v-bind:key="c.name ? (c.name+c.number) : i" class="flexy-cards">
|
||||
<Card :card="c" :class="'fistful-of-cards last-event'" @pointerenter.native="''" @pointerleave.native="''"/>
|
||||
<div style="margin-left:6pt;">
|
||||
<p>{{$t(`cards.${c.name}.desc`)}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2 id="goldrushcards">{{$t('help.goldrushcards')}}</h2>
|
||||
<div class="flexy-cards-wrapper">
|
||||
<div v-for="(c, i) in goldrushcards" v-bind:key="c.name ? (c.name+c.number) : i" class="flexy-cards">
|
||||
<Card :card="c" class="gold-rush" @pointerenter.native="''" @pointerleave.native="''"/>
|
||||
<div style="margin-left:6pt;">
|
||||
<p>{{$t(`cards.${c.name}.desc`)}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -111,6 +126,7 @@ export default {
|
||||
characters: [],
|
||||
highnooncards: [],
|
||||
foccards: [],
|
||||
goldrushcards: [],
|
||||
}),
|
||||
computed: {
|
||||
endTurnCard() {
|
||||
@ -140,17 +156,41 @@ export default {
|
||||
...x,
|
||||
}))
|
||||
},
|
||||
goldrushcards_info(cardsJson) {
|
||||
this.goldrushcards = JSON.parse(cardsJson).map(x=>({
|
||||
...x,
|
||||
}))
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$socket.emit('get_cards')
|
||||
this.$socket.emit('get_characters')
|
||||
this.$socket.emit('get_highnooncards')
|
||||
this.$socket.emit('get_foccards')
|
||||
this.$socket.emit('get_goldrushcards')
|
||||
document.getElementById('help').scrollIntoView();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.flexy-cards-wrapper {
|
||||
display: flex;
|
||||
flex-flow: wrap;
|
||||
}
|
||||
.flexy-cards {
|
||||
flex: 30%;
|
||||
display:flex;
|
||||
}
|
||||
@media only screen and (max-width:500px) {
|
||||
.flexy-cards {
|
||||
flex: 100%;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width:800px) {
|
||||
.flexy-cards {
|
||||
flex: 50%;
|
||||
}
|
||||
}
|
||||
@keyframes pick {
|
||||
0% {
|
||||
transform: translate(0,0);
|
||||
|
@ -709,8 +709,13 @@
|
||||
"sheriff": "Sheriff",
|
||||
"allcharacters": "All characters",
|
||||
"gotoallcharacters": "Jump to all characters",
|
||||
"gotocards": "Jump to cards",
|
||||
"gotohighnoon": "Jump to High Noon",
|
||||
"gotofoc": "Jump to Fistful Of Cards",
|
||||
"gotogoldrush": "Jump to Gold Rush",
|
||||
"highnooncards": "High Noon - Event Cards",
|
||||
"foccards": "Fistful of Cards - Event Cards"
|
||||
"foccards": "Fistful of Cards - Event Cards",
|
||||
"goldrushcards": "Gold Rush Cards"
|
||||
},
|
||||
"theme": {
|
||||
"sepia": "Sepia",
|
||||
|
@ -708,9 +708,14 @@
|
||||
"renegade": "Rinnegato",
|
||||
"vice": "Vice",
|
||||
"gotoallcharacters": "Visualizza tutti i personaggi",
|
||||
"gotocards": "Visualizza le carte",
|
||||
"gotohighnoon": "Visualizza le carte High Noon",
|
||||
"gotofoc": "Visualizza le carte Fistful Of Cards",
|
||||
"gotogoldrush": "Visualizza le carte Gold Rush",
|
||||
"allcharacters": "Tutti i personaggi",
|
||||
"highnooncards": "Carte Evento High Noon",
|
||||
"foccards": "Carte Evento Fistful of Cards"
|
||||
"foccards": "Carte Evento Fistful of Cards",
|
||||
"goldrushcards": "Carte Gold Rush"
|
||||
},
|
||||
"theme": {
|
||||
"sepia": "Seppia",
|
||||
|
Loading…
Reference in New Issue
Block a user