Commit ee939cca by BellCodeEditor

save project

parent 4b011d3c
Showing with 8 additions and 3 deletions
......@@ -6,5 +6,10 @@ class Hero:
self.attack=attack
yase=Hero("亚瑟",300,20)
houyi=Hero('后羿',250,23)
print(yase.hp)
print(houyi.hp)
\ No newline at end of file
def upgrade():
yase.level+=1
yase.hp+=50
yase.attack+=4
upgrade()
upgrade()
print(yase.hp)
\ No newline at end of file
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