Commit 81116691 by BellCodeEditor

save project

parent 9fe3d4d3
Showing with 6 additions and 1 deletions
......@@ -8,7 +8,11 @@ class Hero(object):
def combat(): # 攻击
enemy.hp-=self.attack
print(combat)
yase = Hero("垭瑟")
houyi= Hero("后羿")
yase.combat(houyi)
if enemy.hp<=0:
print("enemy阵亡,游戏结束")
else:
print("self对enemy发动了攻击,enemy还剩下enemy.hp-=self.attack血量")
\ 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