Commit 70184e89 by BellCodeEditor

save project

parent c2ac8e64
Showing with 6 additions and 7 deletions
......@@ -5,13 +5,12 @@ class Hero:
self.hp
self.attack
def upgrade():
self.level=yase.levle+1
self.hp=yase.hp+50
self.attack=yase.attack+4
yase=Hero("亚瑟",300,20)
houyi=Hero("亚瑟初始血量",yase.hp)
upgrade
upgrade
self.level=self.levle+1
self.hp=self.hp+50
self.attack=self.attack+4
houyi=Hero("后羿",300,20)
houyi=Hero("初始血量",yase.hp)
houyi.upgrade
print("升级两次后亚瑟血量",yase.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