username=int(input('请输入您的ID:'))
password=int(input('请输入您的密码:'))
if username== 2 and password==123:
print('欢迎来到召唤师峡谷')
hero_list=[['盲僧'],['亚索'],['猴子'],['赵信'],['盖伦'],['诺手'],]
print(hero_list)
while True:
hero_1=input('请选择您的英雄:')
hero=[]
hero.append(hero_1)
if hero in hero_list:
coins=1000 #初始金币为1000,
print('{2}选择{1},初始金币为{0}'.format(coins,hero,username))
break
else:
print('选择错误请重新选择。')
while True:
weapon_list=[]
print('1.购买武器','2.开始作战','3.删除武器 换装','4.退出游戏')
choice=int(input('请选择操作:'))
if choice==1:
weapons=[['饮血剑',100],['无尽之刃',200],['女妖',200],['狂徒',900],['冰心',1400],['三相',500]]
for weapon in weapons:
print(weapon[0],end=' ,')
print()
i=1
while i<=1:
weapon_buy=input('请购买您的武器:')
for weapon in weapons:
if weapon_buy==weapon[0]:
if coins >= weapon[1]:
weapon_list.append(weapon_buy)
coins-=int(weapon[1])
print('您的剩余金币是:{}'.format(coins))
else:
print('金币不足,请作战获取金币',end=' ');print('您的剩余金币是:{}'.format(coins))
i+=1
print('您拥有的武器是:{}'.format(weapon_list))
elif choice==2:
pass
elif choice==3:
pass
elif choice==4:
print('退出游戏成功')