Commit 535b9ca3 by BellCodeEditor

save project

parent 8723a789
Showing with 4 additions and 0 deletions
...@@ -5,6 +5,10 @@ class Hero: ...@@ -5,6 +5,10 @@ class Hero:
self.hp = 250 self.hp = 250
self.attack = 40 self.attack = 40
self.max_hp = self.hp self.max_hp = self.hp
def cure(self):
self.hp += 60
if self.hp > self.max_hp:
self.hp = self.max_hp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment