Archived
Reset champion health at the start of each turn
This commit is contained in:
+5
-4
@@ -257,10 +257,11 @@ class Turn(Serializable):
|
||||
|
||||
async def start_turn(self) -> None:
|
||||
self.champions_health = {}
|
||||
for c in self.player.board:
|
||||
if c.card_type == CardType.CHAMPION:
|
||||
self.champions_health[str(c.uuid)] = c.defense
|
||||
await self.player.game.notify_controller("update", self.serialize())
|
||||
for p in self.player.game.players:
|
||||
for c in p.board:
|
||||
if c.card_type == CardType.CHAMPION:
|
||||
p.turn.champions_health[str(c.uuid)] = c.defense
|
||||
await p.game.notify_controller("update", p.turn.serialize())
|
||||
|
||||
def serialize(self):
|
||||
data = super().serialize() | {
|
||||
|
||||
Reference in New Issue
Block a user