Archived
add PLAY_NEXT_CARD_BOUGHT CardEffect
This commit is contained in:
@@ -78,8 +78,14 @@ class ClientController(ClientControllerInterface):
|
||||
|
||||
@vibe_check(Message)
|
||||
async def game_context(self, message: Message):
|
||||
|
||||
print(message)
|
||||
if self.player.team != self.game_controller.game.turn:
|
||||
return await self.send_error("it is not your turn to play!")
|
||||
if message.type == "action":
|
||||
if message.data_type == "buy":
|
||||
for c in message.data:
|
||||
await self.player.buy_card(c)
|
||||
elif message.data_type == "play_cards":
|
||||
await self.player.play_cards(message.data)
|
||||
|
||||
@vibe_check(LoginMessage)
|
||||
async def login_context(self, message: LoginMessage):
|
||||
@@ -143,3 +149,4 @@ class ClientController(ClientControllerInterface):
|
||||
self.player.ready = bool(message.data)
|
||||
if all(p.ready for p in self.game_controller.game.players):
|
||||
await self.game_controller.start_game()
|
||||
self.on_message = self.game_context
|
||||
|
||||
Reference in New Issue
Block a user