Commit c5fed5de by BellCodeEditor

auto save

parent 621210f2
Showing with 9 additions and 6 deletions
...@@ -6,8 +6,11 @@ class Hero(): ...@@ -6,8 +6,11 @@ class Hero():
self.attack=attack self.attack=attack
yase=Hero("亚瑟",300,20) yase=Hero("亚瑟",300,20)
houyi=hero("后羿",260,24) houyi=hero("后羿",260,24)
def upgrage(): def upgrage(selt):
yase.level=yase.level+1 selt.level=self.level+1
yase.hp=yase.hp+50 selt.hp=selt.hp+50
yase.attack=yase.attack+10 selt.attack=selt.attack+10
upgrage() yase.upgrage()
\ No newline at end of file print()
print()
print()
\ 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