Commit f6e6cf1c by BellCodeEditor

save project

parent 345ddec7
Showing with 8 additions and 3 deletions
...@@ -6,9 +6,14 @@ class Hero: ...@@ -6,9 +6,14 @@ class Hero:
self.attack=a self.attack=a
#升级 #升级
def up_level(self): def up_level(self):
self.level+=1 self.level+=5
self.hp+=50 self.hp+=50000
self.attack+=100 self.attack+=50000
def up(self):
self.level+=5
self.hp+=50000
self.attack+=50000
#定义亚瑟 #定义亚瑟
亚瑟=Hero('亚瑟',340,80) 亚瑟=Hero('亚瑟',340,80)
#升级亚瑟 #升级亚瑟
......
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