Commit ca8311bf by BellCodeEditor

save project

parent 619fb7c1
Showing with 84 additions and 2 deletions
......@@ -6,4 +6,87 @@ class Hero(object):
self.attack = 388
self.name = name
\ No newline at end of file
def combat(self,enemy):
enemy.hp -= self.attack
info1 = self.name+"对"+enemy.name+"发起攻击"
info2 = self.name+"攻击力为"+str(self.attack)+","
if enemy.hp>0:
info3 = "血量为零,哟西"
print(info)
exit()
yase=Hero("亚索")
yase=Hero("后羿")
while True:
houyi.combat(yase)
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