Jacky Murieta special
This commit is contained in:
parent
5fe7de3be7
commit
a88d3ad802
@ -426,6 +426,11 @@ def holyday_special(sid, data):
|
|||||||
ses: Player = sio.get_session(sid)
|
ses: Player = sio.get_session(sid)
|
||||||
ses.holyday_special(data)
|
ses.holyday_special(data)
|
||||||
|
|
||||||
|
@sio.event
|
||||||
|
def murieta_special(sid):
|
||||||
|
ses: Player = sio.get_session(sid)
|
||||||
|
ses.murieta_special()
|
||||||
|
|
||||||
@sio.event
|
@sio.event
|
||||||
def buy_gold_rush_card(sid, data:int):
|
def buy_gold_rush_card(sid, data:int):
|
||||||
ses: Player = sio.get_session(sid)
|
ses: Player = sio.get_session(sid)
|
||||||
|
@ -18,7 +18,6 @@ class JackyMurieta(Character):
|
|||||||
super().__init__("Jacky Murieta", max_lives=4)
|
super().__init__("Jacky Murieta", max_lives=4)
|
||||||
# puo pagare 2 pepite per sparare 1 bang extra
|
# puo pagare 2 pepite per sparare 1 bang extra
|
||||||
self.icon = '💆♂️️'
|
self.icon = '💆♂️️'
|
||||||
#TODO
|
|
||||||
|
|
||||||
class JoshMcCloud(Character):
|
class JoshMcCloud(Character):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -41,7 +40,7 @@ class PrettyLuzena(Character):
|
|||||||
|
|
||||||
class RaddieSnake(Character):
|
class RaddieSnake(Character):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__("Pretty Luzena", max_lives=4)
|
super().__init__("Raddie Snake", max_lives=4)
|
||||||
# può scartare 1 pepita per pescare 1 carta (2 volte per turno)
|
# può scartare 1 pepita per pescare 1 carta (2 volte per turno)
|
||||||
self.icon = '🐍️'
|
self.icon = '🐍️'
|
||||||
|
|
||||||
|
@ -1086,6 +1086,13 @@ class Player:
|
|||||||
self.hand.append(self.game.deck.draw(True))
|
self.hand.append(self.game.deck.draw(True))
|
||||||
self.notify_self()
|
self.notify_self()
|
||||||
|
|
||||||
|
def murieta_special(self):
|
||||||
|
if self.character.check(self.game, grch.JackyMurieta) and self.gold_nuggets >= 2 and self.is_my_turn:
|
||||||
|
self.gold_nuggets -= 2
|
||||||
|
self.has_played_bang = False
|
||||||
|
self.bang_used -= 1
|
||||||
|
self.notify_self()
|
||||||
|
|
||||||
def buy_gold_rush_card(self, index):
|
def buy_gold_rush_card(self, index):
|
||||||
print(f'{self.name} wants to buy gr-card index {index} in room {self.game.name}')
|
print(f'{self.name} wants to buy gr-card index {index} in room {self.game.name}')
|
||||||
card: cs.Card = self.game.deck.shop_cards[index]
|
card: cs.Card = self.game.deck.shop_cards[index]
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
<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 === '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 === '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" 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" v-if="is_my_turn && character.name === 'Jacky Murieta' && special_use_count < 1 && gold_nuggets >=2 && pending_action == 2" @click="()=>{$socket.emit('murieta_special')}">{{$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>
|
||||||
@ -119,6 +120,7 @@ export default {
|
|||||||
spectator: false,
|
spectator: false,
|
||||||
noStar: false,
|
noStar: false,
|
||||||
committed_suit_manette: null,
|
committed_suit_manette: null,
|
||||||
|
gold_nuggets: 0,
|
||||||
}),
|
}),
|
||||||
sockets: {
|
sockets: {
|
||||||
role(role) {
|
role(role) {
|
||||||
@ -169,6 +171,7 @@ export default {
|
|||||||
this.shouldChooseCard = false
|
this.shouldChooseCard = false
|
||||||
}
|
}
|
||||||
this.noStar = self.noStar
|
this.noStar = self.noStar
|
||||||
|
this.gold_nuggets = self.gold_nuggets
|
||||||
let mustplay = this.handComputed.filter(x => x.number == 42);
|
let mustplay = this.handComputed.filter(x => x.number == 42);
|
||||||
if (mustplay.length > 0) {
|
if (mustplay.length > 0) {
|
||||||
this.play_card(mustplay[0], false)
|
this.play_card(mustplay[0], false)
|
||||||
|
Loading…
Reference in New Issue
Block a user