Commit e46b6e9e by BellCodeEditor

save project

parent 287d6d41
Showing with 19 additions and 2 deletions
......@@ -25,7 +25,7 @@ class Hero(object):
info3 = enemy.name+"阵亡,游戏结束"
info = info1+info2+info3
print(info)
print('你干嘛啊~~')
print('你干嘛啊哈哈哎哟~~')
exit()
class Player(Hero):
......@@ -36,5 +36,21 @@ class Player(Hero):
self.max_hp = self.hp
self.hero_type = hero_type
print("角色"+self.name+"创建成功,英雄类型为:", self.hero_type)
print("当前等级、血量、攻击力分别为:",self.level,self.hp,self.attack)
print("当前等级、血量、攻击力分别为:",self.level,self.hp,self.attack
houy1 = player("射手")
yase = Hero("亚瑟")
print(30*'_')
print(" 战斗开始")
while True:
print("_"*30)
choice = input("栖息在英雄技能")
if choice == "q"
print("游戏结束")
break
elif choice == "1":
houyi. combat(yase)
elif choice == "2"
status = randow
if status == 1
yase.combat(houyai)
\ 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