Commit cdd47feb by BellCodeEditor

save project

parent 958be2f9
Showing with 2 additions and 2 deletions
......@@ -17,7 +17,7 @@ class Hero(object):
b1=self.name+'对'+a.name+'发起进攻'
b2='造成'+str(self.attack)+'点伤害'
if a.hp>0:
b3=a.name+'还剩'a.hp+'的血'
b3=a.name+'还剩'+a.hp+'的血'
b=b1+b2+b3
print(b)
else:
......@@ -25,7 +25,7 @@ class Hero(object):
b=b1+b2+b3
print(b)
class Player(Hero)
class Player(Hero):
def __init__(self,name,type):
super().__init__(name)
self.hp = 200
......
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