Commit f8a808c0 by BellCodeEditor

save project

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