Commit fd0e802e by BellCodeEditor

save project

parent 8118922a
Showing with 5 additions and 4 deletions
......@@ -6,12 +6,13 @@ class Hero:
self.attack = attack
yase = Hero("垭瑟",300,20)
houyi = Hero("后翼",250,25)
def upgrade():
yase.level = yase.level + 1
yase.hp = yase.hp + 50
yase.attack = yase.attack + 4
upgrade()
print("垭瑟血量为:",yase.hp)
print("后翼血量为:",houyi.hp)
def upgrade():
level = level + 1
hp = hp + 50
attack = attack + 4
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