Commit d60ebbcc by BellCodeEditor

save project

parent 6f5db1ea
Showing with 9 additions and 2 deletions
......@@ -4,5 +4,13 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
def upgrade():
houyi.level=houyi.level+1
houyi.hp=houyi.hp*2.5
houyi.attack=houyi.attack*1.5
yase=Hero("亚瑟",250,23)
houyi=Hero("后羿",300,20)
yase=Hero("亚瑟",250,23)
\ No newline at end of file
upgrade()
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