Commit 95de8397 by BellCodeEditor

save project

parent 436de7bb
Showing with 10 additions and 10 deletions
...@@ -4,16 +4,16 @@ class Hero: ...@@ -4,16 +4,16 @@ class Hero:
self.HP = hp self.HP = hp
self.ateack = ateack self.ateack = ateack
self.neme = neme self.neme = neme
def a(self):
self.level = self.level + 1
self.HP = self.HP + 50
self.ateack = self.ateack + 10
yase = Hero("亚瑟",300,30) yase = Hero("亚瑟",300,50)
hoyi = Hero("后羿",270,35) hoyi = Hero("后羿",370,80)
def a(): yase.a()
yase.level = yase.level + 1 hoyi.a()
yase.HP = yase.HP + 50
yase.ateack = yase.ateack + 10
a_yase()
print(yase.level)
print(yase.HP) print(yase.HP)
print(yase.ateack) print(hoyi.HP)
\ No newline at end of file \ No newline at end of file
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