Fixes #3; Prevent partial champion damage

This commit is contained in:
2024-05-06 15:00:38 +02:00
parent 29ea3e7856
commit 25a48fd2ab
+3 -3
View File
@@ -261,9 +261,9 @@ class Turn(Serializable):
print("You cannot attack this champion if a guard is present") print("You cannot attack this champion if a guard is present")
return return
self.damage_reserve -= 1 if p.turn.champions_health[str(c.uuid)] > self.damage_reserve:
p.turn.champions_health[str(c.uuid)] -= 1 print("You don't have enough damage points to stun champion!")
if p.turn.champions_health[str(c.uuid)] <= 0: self.damage_reserve -= p.turn.champions_health[str(c.uuid)]
await self.player.stun(str(c.uuid)) await self.player.stun(str(c.uuid))
await self.player.game.notify_controller("update", self.serialize()) await self.player.game.notify_controller("update", self.serialize())