Commit 6f8e8cc6 by BellCodeEditor

save project

parent 6811f781
Showing with 9 additions and 11 deletions
...@@ -4,16 +4,15 @@ class Hero: ...@@ -4,16 +4,15 @@ class Hero:
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
yase=Hero('yase',300,20)
hy=Hero('hy',250,23)
k=Hero('K',5600,199)
def uprade():
yase.level=yase.level+1
yase.hp=yase.hp+999
yase.attack=yase.attack=9999999999
def uprade(self):
self.level=self.level+1
self.hp=self.hp+999
self.attack=self.attack=9999999999
houyi=Hero('后翼',1000000000000000,99999999999999999999999999999999999999999999)
houyi.uprade()
print("等级为",houyi.level)
print("血量为",houyi.hp)
print("攻击力为",houyi.attack)
uprade()
uprade()
\ 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