Commit 72283492 by BellCodeEditor

save project

parent fd457cb3
Showing with 3 additions and 3 deletions
......@@ -8,10 +8,10 @@ class Hero(object):
def combat(self,e):
e.hp=e.hp-self.attack # 攻击
info1=self.name+"对"+e.name+"进行攻击,"
info2="造成"+str(self.attack)+"伤害,"
info1="*"+self.name+"对"+e.name+"进行攻击!\n"
info2="*造成"+str(self.attack)+"伤害!\n"
if e.hp>0:
info3=e.name+"还剩"+str(e.hp)+"血量!"
info3="*"+e.name+"还剩"+str(e.hp)+"血量!"
info=info1+info2+info3
print(info)
else:
......
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