Commit eb06b2b5 by BellCodeEditor

save project

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