risarcimento
This commit is contained in:
parent
98ddaf519d
commit
2f5344c802
@ -1,13 +1,14 @@
|
|||||||
import cards
|
|
||||||
from typing import List, Set, Dict, Tuple, Optional
|
from typing import List, Set, Dict, Tuple, Optional
|
||||||
import random
|
import random
|
||||||
import socketio
|
import socketio
|
||||||
|
import cards
|
||||||
from cards import Bang
|
from cards import Bang
|
||||||
import characters
|
|
||||||
import players
|
import players
|
||||||
|
from players import PendingAction, Player
|
||||||
|
import characters
|
||||||
from characters import all_characters
|
from characters import all_characters
|
||||||
from deck import Deck
|
from deck import Deck
|
||||||
from players import PendingAction, Player
|
|
||||||
import roles
|
import roles
|
||||||
|
|
||||||
class Game:
|
class Game:
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
import deck
|
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
import json
|
import json
|
||||||
from random import randrange
|
from random import randrange
|
||||||
import socketio
|
import socketio
|
||||||
|
import deck
|
||||||
import roles as r
|
import roles as r
|
||||||
import cards as cs
|
import cards as cs
|
||||||
import characters as chars
|
import characters as chars
|
||||||
|
|
||||||
|
|
||||||
class PendingAction(IntEnum):
|
class PendingAction(IntEnum):
|
||||||
PICK = 0
|
PICK = 0
|
||||||
DRAW = 1
|
DRAW = 1
|
||||||
@ -195,7 +193,7 @@ class Player:
|
|||||||
if isinstance(self.character, chars.BartCassidy):
|
if isinstance(self.character, chars.BartCassidy):
|
||||||
self.hand.append(self.game.deck.draw())
|
self.hand.append(self.game.deck.draw())
|
||||||
self.sio.emit('chat_message', room=self.game.name,
|
self.sio.emit('chat_message', room=self.game.name,
|
||||||
data=f'{self.name} ha pescato perchè é stato ferito.')
|
data=f'{self.name} ha ricevuto un risarcimento perchè è stato ferito.')
|
||||||
self.sio.emit('chat_message', room=self.game.name,
|
self.sio.emit('chat_message', room=self.game.name,
|
||||||
data=f'{self.name} ha fatto esplodere la dinamite.')
|
data=f'{self.name} ha fatto esplodere la dinamite.')
|
||||||
print(f'{self.name} Boom, -3 hp')
|
print(f'{self.name} Boom, -3 hp')
|
||||||
@ -395,7 +393,7 @@ class Player:
|
|||||||
if self.lives > 0:
|
if self.lives > 0:
|
||||||
if isinstance(self.character, chars.BartCassidy):
|
if isinstance(self.character, chars.BartCassidy):
|
||||||
self.sio.emit('chat_message', room=self.game.name,
|
self.sio.emit('chat_message', room=self.game.name,
|
||||||
data=f'{self.name} ha pescato perchè é stato ferito.')
|
data=f'{self.name} ha ricevuto un risarcimento perchè è stato ferito.')
|
||||||
self.hand.append(self.game.deck.draw())
|
self.hand.append(self.game.deck.draw())
|
||||||
elif isinstance(self.character, chars.ElGringo) and self.attacker and len(self.attacker.hand) > 0:
|
elif isinstance(self.character, chars.ElGringo) and self.attacker and len(self.attacker.hand) > 0:
|
||||||
self.hand.append(self.attacker.hand.pop(
|
self.hand.append(self.attacker.hand.pop(
|
||||||
|
Loading…
Reference in New Issue
Block a user