Commit 40a60192 by BellCodeEditor

save project

parent 4ad9d779
Showing with 9 additions and 7 deletions
...@@ -4,11 +4,13 @@ class Hoer: ...@@ -4,11 +4,13 @@ class Hoer:
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
def upgrad(self):
self.level=self.level+1
self.hp=self.hp+620
self.attack=self.attack+30
xialuote=Hoer("夏洛特",3425,114) xialuote=Hoer("夏洛特",3425,114)
bailishouyue=Hoer("百里守约",3120,742) bailishouyue=Hoer("百里守约",3120,742)
def upgrad(): bailishouyue.upgrad()
xialuote.level=xialuote.level+1 print(bailishouyue.level)
xialuote.hp=xialuote.hp+620 print(bailishouyue.hp)
xialuote.attack=xialuote.attack+30 print(bailishouyue.attack)
upgrad() \ No newline at end of file
print(xialuote.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