add shotgun
This commit is contained in:
		
							parent
							
								
									ed057502d6
								
							
						
					
					
						commit
						30b3e826a0
					
				| @ -56,7 +56,6 @@ class Shotgun(Card): | ||||
|     def __init__(self, suit, number): | ||||
|         super().__init__(suit, 'Shotgun', number, is_equipment=True, is_weapon=True, range=1) | ||||
|         self.icon = '🔫' # Ogni volta che colpisci un giocatore deve scartare una carta | ||||
|         #TODO | ||||
| 
 | ||||
| class Taglia(Card): | ||||
|     def __init__(self, suit, number): | ||||
| @ -196,7 +195,7 @@ def get_starting_deck() -> List[Card]: | ||||
|         Fantasma(Suit.SPADES, 10), | ||||
|         # Lemat(Suit.DIAMONDS, 4), | ||||
|         SerpenteASonagli(Suit.HEARTS, 7), | ||||
|         # Shotgun(Suit.SPADES, 'K'), | ||||
|         Shotgun(Suit.SPADES, 'K'), | ||||
|         # Taglia(Suit.CLUBS, 9), | ||||
|         UltimoGiro(Suit.DIAMONDS, 8), | ||||
|         Tomahawk(Suit.DIAMONDS, 'A'), | ||||
|  | ||||
| @ -1152,6 +1152,10 @@ class Player: | ||||
|                 self.sio.emit('chat_message', room=self.game.name, | ||||
|                               data=f'_special_el_gringo|{self.name}|{self.attacker.name}') | ||||
|                 self.attacker.notify_self() | ||||
|         if self.attacker and len(self.hand) > 0 and any((isinstance(c, tvosc.Shotgun) for c in self.attacker.equipment)): | ||||
|             c = self.hand.pop(randrange(0, len(self.hand))) | ||||
|             self.game.deck.scrap(c, True) | ||||
|             self.sio.emit('chat_message', room=self.game.name, data=f'_shotgun_scrap|{self.name}|{c.name}') | ||||
|         if self.attacker and 'gold_rush' in self.game.expansions: | ||||
|             if (isinstance(self.attacker, Player)): | ||||
|                 self.attacker.gold_nuggets += 1 | ||||
|  | ||||
| @ -54,7 +54,7 @@ | ||||
| 		<Chooser v-if="shouldChooseCard" :text="$t(choose_text)" :cards="available_cards" :select="choose" :playAudio="true" :timer="60"/> | ||||
| 		<Chooser v-if="lives <= 0 && max_lives > 0 && !is_ghost && !spectator" :text="$t('you_died')" :cancelText="$t('spectate')" :cancel="()=>{max_lives = 0; spectator = true}"/> | ||||
| 		<Chooser v-if="win_status !== undefined" :text="win_status?$t('you_win'):$t('you_lose')" /> | ||||
| 		<Chooser v-if="show_role" :text="$t('you_are')" :cards="[my_role]" :hintText="($i18n.locale=='it'?my_role.goal:my_role.goal_eng)" :select="() => {show_role=false}" :cancel="() => {show_role=false}" :cancelText="$t('ok')" /> | ||||
| 		<Chooser v-if="show_role" :text="$t('you_are')" :cards="[my_role]" :hintText="($i18n.locale=='it'?my_role.goal:my_role.goal_eng)" :select="() => {show_role=false}" :cancel="() => {show_role=false}" :cancelText="$t('ok')" :timer="15"/> | ||||
| 		<Chooser v-if="notifycard" :key="notifycard.card" :text="`${notifycard.player} ${$t('did_pick_as')}:`" :cards="[notifycard.card]" :hintText="$t(notifycard.message)" class="turn-notify-4s"/> | ||||
| 		<Chooser v-if="cantplaycard" :key="cantplaycard" :text="`${$t('cantplaycard')}`" class="turn-notify-4s"/> | ||||
| 		<Chooser v-if="!show_role && is_my_turn && pending_action < 2" :text="$t('play_your_turn')" :key="is_my_turn" class="turn-notify" /> | ||||
|  | ||||
| @ -132,7 +132,8 @@ | ||||
|     "UnionPacific": "{0} played Union Pacific and draws 4 cards from the deck", | ||||
|     "use_special": "{0} used the special ability of their character ({1})", | ||||
|     "gold_rush_pay_discard": "{0} discarded {2} from {1}.", | ||||
|     "choose_emporio": "{0} has chosen {1} from General Store." | ||||
|     "choose_emporio": "{0} has chosen {1} from General Store.", | ||||
|     "shotgun_scrap": "When the shotgun hit {0} a card flew away from his hand ({1})" | ||||
|   }, | ||||
|   "foc": { | ||||
|     "leggedelwest": "He must play this card on this turn if possible." | ||||
|  | ||||
| @ -132,7 +132,8 @@ | ||||
|     "UnionPacific": "{0} ha giocato Union Pacific e ha pescato 4 carte.", | ||||
|     "use_special": "{0} ha usato l'abilità speciale del suo personaggio ({1})", | ||||
|     "gold_rush_pay_discard": "{0} ha fatto scartare {2} a {1}.", | ||||
|     "choose_emporio": "{0} ha scelto {1} da Emporio." | ||||
|     "choose_emporio": "{0} ha scelto {1} da Emporio.", | ||||
|     "shotgun_scrap": "Quando lo shotgun ha colpito {0} gli ha tolto una carta ({1})" | ||||
|   }, | ||||
|   "foc": { | ||||
|     "leggedelwest": "Ed è obbligato a usarla nel suo turno, se possibile" | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Alberto Xamin
						Alberto Xamin