Commit f8a808c0 by BellCodeEditor

save project

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