Commit eb06b2b5 by BellCodeEditor

save project

parent 52026ca8
Showing with 8 additions and 8 deletions
......@@ -6,16 +6,16 @@ class Hero:
self.attack=attack
def upgrade():
yase.level=yase.level+1
yase.hp=yase.hp+50
yase.attack=yase.attack+40
self.level=yase.level+1
self.hp=yase.hp+50
self.attack=yase.attack+40
yase=Hero('亚索',700,34)
print("亚索的血量",yase.attack)
upgrade()
upgrade()
print("↑2次后,亚索的血量是:",yase.hp)
yase = Hero('亚索',700,34)
yase.upgrade()
print("血量是:",yase.hp)
print("等级是:",yase.level)
print("攻击是:",yase.att)
......
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