Commit ad5dee88 by BellCodeEditor

save project

parent 02a6741f
Showing with 16 additions and 7 deletions
......@@ -6,6 +6,8 @@ class Hero:
self.attack = 40
self.max_hp = self.hp
self.herotype = herotype
def cure(self):
self.max_hp = self.max_hp + 60
if self.hp>250:
......@@ -25,14 +27,21 @@ class Hero:
info = info1+info2+info3
print(info)
exit()
class Player(Hero):
def __init__()
yase = Hero("亚瑟","坦克")
houyi = Hero("后羿","射手")
houyi.combat(yase)
yase.cure()
houyi.combat(yase)
yase.cure()
houyi.combat(yase)
yase.cure()
print("-"*30)
print(" 战斗开始")
print("-"*30)
while True:
satute = int(input("请选择英雄技能(1攻击/2治疗):"))
if satute == 1:
if satute == 2:
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