Commit 9421ddaf by BellCodeEditor

auto save

parent d9ae5110
Showing with 6 additions and 3 deletions
import random
class Hero(object):
def __init__(self, name):
self.name = name
......@@ -40,6 +41,7 @@ houyi = Player("射手", "后羿")
yase = Hero("垭瑟")
print("-" * 30)
print(' 战斗开始')
num = random.randint(1,3)
while True:
print("-" * 30)
choice = input('请放技能(1攻击/2治疗)')
......@@ -54,8 +56,8 @@ while True:
else:
print('请重新选择')
continue
num = random.randint(1,3)
if num == 1:
if num == 1:
yase.cure()
else:
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