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:
|
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() | {
|
||||||
|
|||||||
Reference in New Issue
Block a user