Commit 95bfcc3e by BellCodeEditor

save project

parent bcd6448a
Showing with 8 additions and 9 deletions
......@@ -4,16 +4,15 @@ class Hero:
self.name=name
self.hp=hp
self.gongji=gongji
yase=Hero("亚瑟",200,1000)
def shengji(self):
self.level=self.level+1
self.hp=self.hp+100
self.gongji=self.gongji+4
kai=Hero("铠",5000,4000)
houyi=Hero("后羿",200,2000)
def shengji():
houyi.level=houyi.level+1
houyi.hp=houyi.hp+100
houyi.gongji=houyi.gongji+4
kai.shengji()
print("为:",kai.hp)
print("血量为:",kai.hp)
print("攻击力为:",kai.gongjili)
......
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