Commit a8d96f83 by BellCodeEditor

save project

parent ca2fcb11
Showing with 2 additions and 2 deletions
...@@ -10,9 +10,9 @@ class Hero(object): ...@@ -10,9 +10,9 @@ class Hero(object):
a1=self.name+'对'+enemy.name+'发起进攻,造成'+str(self.attack)+'点伤害,' a1=self.name+'对'+enemy.name+'发起进攻,造成'+str(self.attack)+'点伤害,'
enemy.hp-=self.attack enemy.hp-=self.attack
if enemy.hp>0: if enemy.hp>0:
a2=enemy.name++str(enemy.hp)+'a' a2=enemy.name+'还剩下'+str(enemy.hp)+'血量'
else: else:
a2=enemy.name+'a' a2=enemy.name+'阵亡,游戏结束'
a=a1+a2 a=a1+a2
print(a) print(a)
......
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