snake special
This commit is contained in:
parent
2978da9e94
commit
9d6cf7a5fa
@ -436,6 +436,11 @@ def cloud_special(sid):
|
|||||||
ses: Player = sio.get_session(sid)
|
ses: Player = sio.get_session(sid)
|
||||||
ses.cloud_special()
|
ses.cloud_special()
|
||||||
|
|
||||||
|
@sio.event
|
||||||
|
def snake_special(sid):
|
||||||
|
ses: Player = sio.get_session(sid)
|
||||||
|
ses.snake_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)
|
||||||
|
@ -1101,6 +1101,13 @@ class Player:
|
|||||||
self.game.deck.shop_deck.append(card)
|
self.game.deck.shop_deck.append(card)
|
||||||
self.notify_self()
|
self.notify_self()
|
||||||
|
|
||||||
|
def snake_special(self):
|
||||||
|
if self.character.check(self.game, grch.RaddieSnake) and self.gold_nuggets >= 1 and self.is_my_turn and self.special_use_count < 2:
|
||||||
|
self.gold_nuggets -= 1
|
||||||
|
self.special_use_count += 1
|
||||||
|
self.hand.append(self.game.deck.draw(True))
|
||||||
|
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,8 +25,9 @@
|
|||||||
<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>
|
<button class="btn" v-if="is_my_turn && character.name === 'Jacky Murieta' && gold_nuggets >=2 && pending_action == 2" @click="()=>{$socket.emit('murieta_special')}">{{$t('special_ability')}}</button>
|
||||||
<button class="btn" v-if="is_my_turn && character.name === 'Josh McCloud' && special_use_count < 1 && gold_nuggets >=2 && pending_action == 2" @click="()=>{$socket.emit('cloud_special')}">{{$t('special_ability')}}</button>
|
<button class="btn" v-if="is_my_turn && character.name === 'Josh McCloud' && gold_nuggets >=2 && pending_action == 2" @click="()=>{$socket.emit('cloud_special')}">{{$t('special_ability')}}</button>
|
||||||
|
<button class="btn" v-if="is_my_turn && character.name === 'Raddie Snake' && special_use_count < 2 && gold_nuggets >=1 && pending_action == 2" @click="()=>{$socket.emit('snake_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>
|
||||||
|
Loading…
Reference in New Issue
Block a user