Commit f8bdeda8 by BellCodeEditor

save project

parent 3b401617
Showing with 3 additions and 4 deletions
......@@ -4,8 +4,7 @@ class hero:
self.name= name
self.hp= hp
self.attack= attack
def upgrade():
def upgrade(self):
yase.level+=1
yase.hp+=50
yase.attack+=4
......@@ -13,4 +12,4 @@ def upgrade():
yase =hero("亚瑟",300,20)
houyi =hero("后羿",240,23)
print("yase的血量值为:"yase.hp)
print("houyi的血量值为:"houyi.hp)
\ No newline at end of file
houyi("houyi的血量值为:"houyi.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