Reset champion health at the start of each turn

This commit is contained in:
2024-05-01 10:51:39 +02:00
parent ed7dc6261d
commit 1937371ccf
+5 -4
View File
@@ -257,10 +257,11 @@ class Turn(Serializable):
async def start_turn(self) -> None: async def start_turn(self) -> None:
self.champions_health = {} self.champions_health = {}
for c in self.player.board: for p in self.player.game.players:
if c.card_type == CardType.CHAMPION: for c in p.board:
self.champions_health[str(c.uuid)] = c.defense if c.card_type == CardType.CHAMPION:
await self.player.game.notify_controller("update", self.serialize()) p.turn.champions_health[str(c.uuid)] = c.defense
await p.game.notify_controller("update", p.turn.serialize())
def serialize(self): def serialize(self):
data = super().serialize() | { data = super().serialize() | {