Commit cc7fef15 by BellCodeEditor

save project

parent 0283a25c
Showing with 11 additions and 3 deletions
import random
class Hero(object): class Hero(object):
def __init__(self, name): def __init__(self, name):
self.name = name self.name = name
...@@ -46,10 +48,16 @@ while True: ...@@ -46,10 +48,16 @@ while True:
say = input('选择你的技能(1攻击/2治疗)') say = input('选择你的技能(1攻击/2治疗)')
if say == 'q': if say == 'q':
break break
elif say == '1' elif say == '1':
houyi.combat(yase) houyi.combat(yase)
elif say == '2': elif say == '2':
houyi.cure() houyi.cure()
else: else:
print('重新输入') print('重新输入')
C continue
\ No newline at end of file
ai = random.randint(1,3)
if ai == 1
yase.cure()
else:
yase.attack(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