Commit 4004c594 by BellCodeEditor

save project

parent 7f6a1537
Showing with 9 additions and 2 deletions
......@@ -11,7 +11,14 @@ class Hero(object):
info1=self.name+"向"+enemy.name+"发动攻击"
info2=enemy.name+"减少了"+str(self.attack)+"血量"
info3=enemy.name+"还有"+str(enemy.hp)+"血量"
print(info1+info2+info3)
if enemy.hp>0:
print(info1+info2+info3)
else:
print(enemy.name+"您的英雄已阵亡")
exit()
yase = Hero("垭瑟")
houyi= Hero("后羿")
yase.combat(houyi)
for i in range (7):
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