Commit 59ea3ee5 by BellCodeEditor

save project

parent afab4a62
Showing with 11 additions and 1 deletions
......@@ -4,8 +4,18 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
def s(self):
self.level+=1
self.hP+=3000000000
self.attack+=100000000
def j(self,a):
a.hp = a.hp-self.atk
print(self.name,"发出攻击")
print("造成了",self.atk,"点伤害")
print(a.name,"现在生命值为",a.hp)
yase=Hero('yase',300,20)
hy=Hero('hy',250,23)
hp=Hero('hP',250,23)
k=Hero('K',5600,199)
print(yase.attack)
print(hy.attack)
......
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