Commit aaeeb975 by BellCodeEditor

auto save

parent 531afcc8
Showing with 7 additions and 1 deletions
......@@ -9,8 +9,9 @@ class Hero(object):
info1=self.name+"对"+enemy.name+"发起了进攻,"
info2='造成'+str(self.attack)+"点伤害,"
if enemy.hp<=0:
info3=enemy.name+"阵亡了"+"游戏结束"
info4=enemy.name+"阵亡了"+"游戏结束"
info=info1+info2+info3
print(info4)
exit()
else:
info3=enemy.name+'还剩下'+str(enemy.hp)
......@@ -19,3 +20,8 @@ class Hero(object):
yase = Hero("垭瑟")
houyi= Hero("后羿")
yase.combat(houyi)
yase.combat(houyi)
yase.combat(houyi)
yase.combat(houyi)
yase.combat(houyi)
yase.combat(houyi)
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