Commit b5d250de by BellCodeEditor

auto save

parent ee56a2ea
Showing with 0 additions and 23 deletions
import random
class Hero(object): class Hero(object):
def __init__(self, name): def __init__(self, name):
self.name = name self.name = name
...@@ -40,23 +38,3 @@ class Player(Hero): ...@@ -40,23 +38,3 @@ class Player(Hero):
houyi = Player("射手", "后羿") houyi = Player("射手", "后羿")
yase = Hero("垭瑟") yase = Hero("垭瑟")
print('-'*30)
print(' 战斗开始')
while True:
print('-'*30)
sho=input('请玩家使用技能(1攻击/2治疗/q结束)')
if sho == 'q':
print('游戏结束')
break
elif sho == '1':
houyi.combat()
elif sho == '2':
houyi.cure()
else :
print('请玩家使用技能(1攻击/2治疗/q结束)')
continue
num=random.randint(1,3)
if num==1:
yase.combat()
else:
yase.cure()
\ 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