Commit f65c54a2 by BellCodeEditor

save project

parent 2d72f180
Showing with 5 additions and 1 deletions
......@@ -6,5 +6,9 @@ class Hero:
self.attack=attack
yase=Hero('垭瑟',300,20)
houyi=Hero('后羿',250,23)
def upgrade():
yase.name=yase.level+1
yase.hp=yase.hp+100
yase.attack=yase.attack+5
upgrade()
print(yase.hp)
print(houyi.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