Commit b5dc7584 by BellCodeEditor

save project

parent b443c485
Showing with 6 additions and 6 deletions
......@@ -5,11 +5,11 @@ class Hero:
self.attack=attack
yase=Hero("yase",300,20)
houyi=Hero("HouYi",250,23)
print(yase)
print(houyi)
def __upgrade__():
yase.level=yase.level+1
yase.hp=yase.hp+40
#yase.level=yase.level+1
yase.hp=yase.hp+50
yase.attack=yase.attack+4
for i in range(2):
print(yase.hp)
__upgrade__()
print(yase.hp)
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