Commit 71e75344 by BellCodeEditor

save project

parent 4a6af6b3
Showing with 5 additions and 1 deletions
...@@ -11,7 +11,10 @@ class Hero(object): ...@@ -11,7 +11,10 @@ class Hero(object):
info2="造成"+str(self.attack)"伤害" info2="造成"+str(self.attack)"伤害"
enemy.hp-=self.attack enemy.hp-=self.attack
if enemy.hp>0: if enemy.hp>0:
info3=e info3=enemy.name+"还剩下"+str(enemy.hp)+"血量"
info=info1+info2+info3
.
yase = Hero("垭瑟") yase = Hero("垭瑟")
houyi= Hero("后羿") houyi= Hero("后羿")
yase.combat(houyi) yase.combat(houyi)
\ No newline at end of file
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