Commit a44c8aa5 by BellCodeEditor

save project

parent a4ab276f
Showing with 5 additions and 4 deletions
...@@ -4,11 +4,12 @@ class Hero: ...@@ -4,11 +4,12 @@ class Hero:
self.level=level self.level=level
self.hp=hp self.hp=hp
self.acttack=acttack self.acttack=acttack
def __init__(self): def UpLevel(self):
sefl.level=self.level+1 self.level=self.level+1
self.hp=self.level+50 self.hp=self.level+50
self.acttack=self.acttack+4444 self.acttack=self.acttack+4444
yase=Hero("亚瑟",1,20,40) yase=Hero("亚瑟",1,20,40)
yase.UpLevel()
print(yase.acttack) print(yase.acttack)
......
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