Commit 458a20f4 by BellCodeEditor

save project

parent 9ce7e3f9
Showing with 13 additions and 0 deletions
......@@ -6,5 +6,17 @@ class Hero:
self.attack=attack
yase=Hero("yase",300,20)
houyi=Hero("houyi",250,23)
def upgrade(self):
self.leve= self.leve+1
self.hp.self.hp+50
self.attack=self.attack+4
upgrade(yase)
upgrade(houyi)
print("yase的血量为"+str(yase.hp))
print("houyi的血量为"+str(houyi.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