Commit 3ac5fefc by BellCodeEditor

save project

parent b115bb47
Showing with 2 additions and 1 deletions
...@@ -14,7 +14,7 @@ class Hero: ...@@ -14,7 +14,7 @@ class Hero:
self.hp=self.hp+60 self.hp=self.hp+60
if self.hp>self.maxhp: if self.hp>self.maxhp:
self.hp=self.maxhp self.hp=self.maxhp
print('加60血') print('加60血,,',self.hp)
a=Hero('yase',300,20) a=Hero('yase',300,20)
print(a.attack) print(a.attack)
a.e() a.e()
...@@ -30,4 +30,5 @@ c=Hero('K',5600,199) ...@@ -30,4 +30,5 @@ c=Hero('K',5600,199)
print(c.attack) print(c.attack)
c.e() c.e()
c.e() c.e()
c.s()
print(c.attack) print(c.attack)
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