Commit 249c8bc8 by BellCodeEditor

save project

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