Commit efa2dad2 by BellCodeEditor

save project

parent d2c38a84
Showing with 6 additions and 5 deletions
...@@ -5,14 +5,14 @@ class Hero: ...@@ -5,14 +5,14 @@ class Hero:
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
def uprgrade(): def uprgrade(self):
yase.level+=50 self.level+=50
yase.hp+=50 self.hp+=50
yase.attack+=50 self.attack+=50
yase=Hero("亚瑟",300,50) yase=Hero("亚瑟",300,50)
#houyi=Hero("后羿",300,50) #houyi=Hero("后羿",300,50)
print(yase.hp) print(yase.hp)
#print(houyi.attack) #print(houyi.attack)
uprgrade() yase.uprgrade()
print(yase.hp) print(yase.hp)
\ 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