Archived
Fixes #3; Prevent partial champion damage
This commit is contained in:
+3
-3
@@ -261,9 +261,9 @@ class Turn(Serializable):
|
||||
print("You cannot attack this champion if a guard is present")
|
||||
return
|
||||
|
||||
self.damage_reserve -= 1
|
||||
p.turn.champions_health[str(c.uuid)] -= 1
|
||||
if p.turn.champions_health[str(c.uuid)] <= 0:
|
||||
if p.turn.champions_health[str(c.uuid)] > self.damage_reserve:
|
||||
print("You don't have enough damage points to stun champion!")
|
||||
self.damage_reserve -= p.turn.champions_health[str(c.uuid)]
|
||||
await self.player.stun(str(c.uuid))
|
||||
|
||||
await self.player.game.notify_controller("update", self.serialize())
|
||||
|
||||
Reference in New Issue
Block a user