Commit 6ef7d494 by BellCodeEditor

save project

parent ed6a2e4b
Showing with 10 additions and 19 deletions
......@@ -4,21 +4,12 @@ class Hero:
self.name=name
self.HP=HP
self.attack=attack
yase=Hero("垭瑟",9999,999999)
houyi=Hero("后裔",99999,9999)
FM=Hero("范马勇次郎"1000000,99999999999,9999999999999)
print(yase.lever)
print(yase.HP)
print(yase.attacc)
def zenjia1():
yase.lever=yase.lever+1
yase.HP=yase.HP+999999
yase.attacc=yase.attacc+999999
def zenjia2():
houyi.lever=yase.lever+1
houyi.HP=yase.HP+999999
houyi.attacc=yase.attacc+999999
def zenjia3():
FM.lever=yase.lever+1
FM.HP=yase.HP+999999
FM.attacc=yase.attac1+999999
\ No newline at end of file
def zenjia1(self):
self.lever=self.lever+1
self.HP=self.HP+999999
self.attack=self.attack+999999
bell=Hero("小贝",500,30)
bell.zenjia1()
print("小贝的等级",bell.lever)
print("小贝的血量",bell.HP)
print("小贝的攻击力",bell.attack)
\ 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