Commit c46eea92 by BellCodeEditor

save project

parent b6d5693e
Showing with 10 additions and 0 deletions
def combat(self,enemy):
info1=self.name+"对" +enemy+"发动进攻"
info2="造成"+enemy.attack+"点伤害"
enemy.hp-=self.attack
if enemy.hp>0:
info3=enemy+"还剩下"+str(enemy.hp)
else enemy.hp<0:
info3=enemy+"阵亡"+"游戏结束"
info=info1+info2+info3
print(info)
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