Commit 249c8bc8 by BellCodeEditor

save project

parent 759dbab5
Showing with 3 additions and 9 deletions
import random
class Hero(object): class Hero(object):
def __init__(self, name): def __init__(self, name):
self.name = name self.name = name
...@@ -44,12 +43,7 @@ print(' 战斗开始') ...@@ -44,12 +43,7 @@ print(' 战斗开始')
while True: while True:
print('-'*30) print('-'*30)
choice = input('请选择攻击还是治疗(攻击为1,治疗为2)') choice = input('请选择攻击还是治疗(攻击为1,治疗为2)')
if choice == '1' : if choice == 1 :
houyi.combat(yase) houyi.combat()
else : else :
houyi.cure() houyi.cure()
\ No newline at end of file
num = random.randint(1,2)
if num == 1:
yase.cure()
else:
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