Commit 65c974a8 by BellCodeEditor

save project

parent 1b9ae1c4
Showing with 7 additions and 6 deletions
......@@ -8,18 +8,18 @@ class Hero(object):
def combat(self,enemy): # 攻击
enemy.hp -= self.attack
info1 = self.name+"打"+enemy.name
inof2 = "造成"+str(self.attack)+"伤害"
info1 = self.name+"让"+enemy.name+"抽卡"
inof2 = "歪了"+str(self.attack)+"次小保底"
if enemy.hp > 0:
info3 = enemy.naem+"还有"+str(enemy.hp)+"血"
info3 = enemy.name+"还有"+str(enemy.hp)+"原石"
info = info1+inof2+info3
print(info)
else:
info3 = enemy.name+"没了"
info3 = enemy.name+"没原石了"
info = info1+inof2+info3
print(info)
exit()
yase = Hero("垭瑟")
houyi= Hero("后羿")
yase = Hero("漆世强")
houyi= Hero("三木")
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