from random import *
from time import *

######玩家######
#blood 玩家血量
#blomax 最大生命值
#card 玩家所有牌
#sp 玩家手牌
#casl 玩家所有卡牌数量
#zdr 角色初始卡牌
#zdrkp 角色卡牌(除初始)
#zdrz 角色卡牌数量

######敌人######
#drxh 敌人类别
#dr 敌人名字
#drsl 敌人数量
#drsy 剩余敌人数量
#dmian 敌人免控层数
#dyin 敌人是否隐身

######战斗######
#dra 所有敌人攻击总和
#da 敌人攻击
#sc 输出卡牌
#nl 能量
#scd 输出卡牌对应敌人
#mon 金币
#djs 定时炸弹还有几回合爆炸

######商店休息区######
#gm 购买卡片序号
#sjkp 上架卡片(5个)
#sjkpj 上架卡片价格
#jiali 获得奖励
#duan 锻造卡牌序号
print("本游戏由泡长工作室出品")
zdr=["自爆(1)","自爆(1)","自爆(1)","投掷炸弹(2)",'投掷炸弹(2)']#没用
zdrkp=["定时炸弹(3)","手榴弹(1)","烟雾弹(2)"]
zdrz=3
csz=5
cskp=["看破红尘(1)","金币光环(1)","财富之路(4)","贿赂(1)","金币能量(0)"]
yanwu="""
@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@
"""
while True:
    juese=input("输入你的角色种子")
    if juese=="0":
        mon=100
        blood=100
        blomax=100
        print("欢迎“炸弹人”来到游戏")
        card=["自爆(1)","自爆(1)","自爆(1)","投掷炸弹(2)",'投掷炸弹(2)']
        casl=5
        print("你的卡牌:",card)
        print("你的血量"+str(blood)+"/"+str(blomax)+",金币数量:"+str(mon))
        print("自爆(1):消耗自身一半(向上取整)的血量击杀一名非BOSS敌人")
        print("投掷炸弹(2):对所有敌人造成10伤害")
        print("开始前,你将获得一个奖励")
        jl=input("随机一张卡牌输入1,240金币输入2,加5最大生命输入3")
        if jl=="2":
            mon+=240
            print("金币数量:"+str(mon))
        elif jl=="1":
            jiaka=randint(0,zdrz-1)
            card.append(zdrkp[jiaka])
            print("你获得了"+zdrkp[jiaka])
            print("现在卡组:",card)
            casl+=1
        elif jl=="3":
            blood+=5
            blomax+=5
            print("你的血量"+str(blood)+"/"+str(blomax))
        print("第一个世界:草原")##1-10关
        for i in range(9):
            if blood<=0:
                print("你已死亡")
                break
            else:
                print("现在你的血量"+str(blood)+",金币数量:"+str(mon))
            print("第",i+1,"关")
            djs=-1
            if (i+1)%5!=0:
                drxh=randint(1,1)
                if drxh==1:
                    drsy=1
                    drsl=1
                    print("敌人:抢劫的")
                    dqjb=randint(0,int((mon+1)/2))
                    mon-=dqjb
                    print("被盗金币:"+str(dqjb))
                    dr=["抢劫的"]
                    dmian=[0]
                    da=[0]
                    dra=0
                    dblo=[0]
                    j=-1
                    for i in dr:
                        j+=1
                        if i =="抢劫的":
                            dblo[j]=randint(3,5)
                            dblo[j]*=10
                            print(i+"的血量"+str(dblo[j]))
                    input("开战")
                    huihe=0
                    while (blood>0 and huihe<=6):
                        huihe+=1
                        print("第"+str(huihe)+"回合")
                        if huihe<=5:
                            print("敌人意图:攻击")
                            dra=0
                            for i in range(drsl):
                                drai=randint(10,15)
                                da[i]=drai
                                dra+=drai
                                print(dr[i]+"意图:攻击"+str(drai))
                        else:
                            print("敌人意图:逃跑")
                        print("我方回合")
                        djs-=1
                        if djs==0:
                            djs=-1
                            print("定时炸弹爆炸了!")
                            for i in range(drsl):
                                dblo[i]-=40
                                if dblo[i]<=0 and dr[i]!="":
                                    print(dr[i]+"已死亡")
                                    drsy-=1
                                    dr[i]=""
                        sp=["","","","","","","","","",""]
                        for i in range(5):
                            sp[i]=randint(0,casl-1)
                            sp[i]=card[sp[i]]
                        nl=3
                        while(nl>=0 and drsy>=1 and blood>0):
                            print("你还有"+str(nl)+"能量")
                            spp=sp
                            sp=["","","","","","","","","",""]
                            k=0
                            for i in spp:
                                if i!="":
                                    sp[k]=i
                                    k+=1
                            spp=["","","","","","","","","",""]
                            print("现在手牌",sp[0],sp[1],sp[2],sp[3],sp[4],sp[5],sp[6],sp[7],sp[8],sp[9])
                            sc=int(input("使用哪张牌?(结束输入0,不要超出范围!)")) 
                            if sc==0:
                                break
                            else:
                                if sp[sc-1]=="自爆(1)":
                                    if nl>=1:
                                        sp[sc-1]=""
                                        nl-=1
                                        scd=int(input("对谁使用自爆?"))
                                        dblo[scd-1]=0
                                        if dr[scd-1]!="":
                                            print(dr[scd-1],"已死亡")
                                            drsy-=1
                                        dr[scd-1]=""
                                        blood-=int((blood+blood%2)/2)
                                        print("我的血量",str(blood)+"/"+str(blomax))
                                    else:
                                        print("你没有足够的能量")
                                elif sp[sc-1]=="投掷炸弹(2)":
                                    if nl<2:
                                        print("你没有足够的能量")
                                    else:
                                        sp[sc-1]=""
                                        nl-=2
                                        for i in range(drsl):
                                            dblo[i]-=10
                                            if dblo[i]<=0 and dr[i]!="":
                                                print(dr[i]+"已死亡")
                                                drsy-=1
                                                dr[i]=""
                                elif sp[sc-1]=="定时炸弹(3)":
                                    if nl<3:
                                        print("你没有足够的能量")
                                    else:
                                        sp[sc-1]=""
                                        nl-=3
                                        djs=3
                                elif sp[sc-1]=="手榴弹(1)":
                                    if nl>=1:
                                        sp[sc-1]=""
                                        nl-=1
                                        scd=int(input("对谁使用手榴弹?"))
                                        if dr[scd-1]!="":
                                            dblo[scd-1]-=8
                                            if dblo[scd-1]<=0:
                                                print(dr[scd-1],"已死亡")
                                                drsy-=1
                                                dr[scd-1]=""
                                        else:
                                            print("这个位置没有敌人,你打空了")
                                    else:
                                        print("你没有足够的能量")
                                elif sp[sc-1]=="烟雾弹(2)":
                                    if nl>=2:
                                        nl-=2
                                        sp[sc-1]=""
                                        print(yanwu)
                                        for i in range(drsl):
                                            if dr[i]!="":
                                                if dmian[i]==0 :###################gfdgesgsdgsdf
                                                    dra-=da[i]
                                                    da[i]=0
                                                    print(dr[i]+"被遮挡视线,无法攻击")
                                                else:
                                                    dmian[i]-=1
                                                    print(dr[i]+"一层免控抵消")
                                        break #烟雾弹结束回合
                                    else:
                                        print("你没有足够的能量")
                                else:
                                    print("你没有这张牌")
                        for i in range(drsl):
                            if dr[i]!="":
                                print(dr[i]+"血量"+str(dblo[i]))
                        if drsy<1:
                            print("好好搜刮")
                            print("夺回金币:",dqjb)
                            mon+=dqjb
                            hdjb=randint(1,100)
                            print("额外获得金币:",hdjb)
                            mon+=hdjb
                            jiali=['','','']
                            for i in range(3):
                                kap=randint(0,zdrz-1)
                                jiali[i]=zdrkp[kap]
                                if jiali[i]=="烟雾弹(2)":
                                    print("烟雾弹(2):结束回合,使敌方无法攻击一回合(下回合解除)")
                                elif jiali[i]=="手榴弹(1)":
                                    print("手榴弹(1):对一名敌人造成8伤害")
                                elif jiali[i]=="定时炸弹(3)":
                                    print("定时炸弹(3):三回合后对所有敌人造成40伤害")
                            print("奖励卡牌三选一(输入0跳过):",jiali)
                            huo=int(input())
                            if huo!=0:
                                card.append(jiali[huo-1])
                                print("现在卡组:",card)
                                casl+=1
                            break
                        print("敌方回合")
                        if huihe==6:
                            print("敌人逃走了")
                            break
                        else:
                            print("敌人:“还不把钱交出来”")
                            m=input("是否把钱交出?")
                            if m=="是":
                                print("敌人:“谢谢你的钱啦”")
                                drsl=0
                                mon=0
                                break
                            else:
                                blood-=dra
                                print("你剩余血量:"+str(blood))
            if i+1==5:
                print("精英即将来袭")
                print("商店:")
                gm=-1
                sjkp=["","","","",""]
                sjkpj=[0,0,0,0,0]
                for i in range(5):
                    abcd=randint(0,zdrz-1)
                    sjkp[i]=zdrkp[abcd]
                    sjkpj[i]=randint(60,310)
                while (gm!=0):
                    print("金币:"+str(mon))
                    print("上架卡片:1号",sjkp[0],sjkpj[0],"元,2号",sjkp[1],sjkpj[1],"元,3号",sjkp[2],sjkpj[2],"元,4号",sjkp[3],sjkpj[3],"元,5号",sjkp[4],sjkpj[4],"元")
                    print("服务: 6号 最大生命+6 250元 7号 生命值+26 260元")
                    gm=int(input("你要购买哪一个(按顺序输入数字,不要输入0)"))
                    if gm==0:
                        break
                    elif gm<=5:
                        if mon>=sjkpj[gm-1]:
                            mon-=sjkpj[gm-1]
                            print("成交! 给你一张",sjkp[gm-1])
                            card.append(sjkp[gm-1])
                            abcd=randint(0,zdrz-1)
                            sjkp[gm-1]=zdrkp[abcd]
                            sjkpj[gm-1]=randint(20,100)
                            print("现在卡组:",card)
                            casl+=1
                        else:
                            print("你没有这么多钱")
                    elif gm==6:
                        if mon>=250:
                            mon-=250
                            blomax+=6
                            blood+=6
                            print("成交!生命值:"+str(blood)+"/"+str(blomax))
                        else:
                            print("你没有这么多钱")
                    elif gm==7:
                        if mon>=260:
                            mon-=260
                            blood+=26
                            if blood>blomax:
                                blood=blomax
                            print("成交!生命值:"+str(blood)+"/"+str(blomax))
                        else:
                            print("你没有这么多钱")
                print("休息区:")
                jiali=input("请选择:1.加最大生命值的20%。2.升级一张卡牌。(退出输入其他)")
                if jiali=="1":
                    jiasm=blomax-blood
                    if jiasm>int(blomax/5):
                        jiasm=int(blomax/5)
                    blood+=jiasm
                    print("增加"+str(jiasm)+"生命值,现在生命"+str(blood)+"/"+str(blomax))
                elif jiali=="2":
                    print("你的牌",card)
                    while True:
                        duan=int(input("你要锻造哪张牌?(有加号的代表已经锻造过,不能重复锻造)输入在1-"+str(casl)+"之间,不然会出错"))
                        if card[duan-1]=="自爆(1)":
                            print("自爆(1)+:消耗自身一半(向上取整)的血量击杀一名非BOSS敌人,*使用后重新加入卡组*")
                            sf=input("是否确认锻造?")
                            if sf=="是":
                                break
                        elif card[duan-1]=="投掷炸弹(2)":
                            print("投掷炸弹(2)+:对所有敌人造成*18*伤害")
                            sf=input("是否确认锻造?")
                            if sf=="是":
                                break
                        elif card[duan-1]=="定时炸弹(3)":
                            print("定时炸弹(3)+:三回合后对所有敌人造成*50*伤害")
                            sf=input("是否确认锻造?")
                            if sf=="是":
                                break
                        elif card[duan-1]=="手榴弹(1)":
                            print("手榴弹(1)+:对一名敌人造成*12*伤害")
                            sf=input("是否确认锻造?")
                            if sf=="是":
                                break
                        elif card[duan-1]=="烟雾弹(2)":
                            print("烟雾弹(2)+:需要能量降低(只需*1*)")
                            sf=input("是否确认锻造?")
                            if sf=="是":
                                break
                        else:
                            print("这张卡牌已经锻造过了")
                    print("正在锻造"+card[duan-1])
                    #card[duan-1]=card[duan-1]+"+"
                    #print(card[duan-1])
                    print("锻造时起火了,你急忙逃跑,锻造失败")
                drxh=randint(1,1)
                if drxh==1:
                    drsy=1
                    drsl=1
                    print("精英怪:小偷")
                    dqjb=randint(0,int((mon+1)/2))
                    mon-=dqjb
                    print("被盗金币:"+str(dqjb))
                    dr=["小偷"]
                    dmian=[0]
                    dyin=[0]
                    da=[0]
                    dra=0
                    dblo=[0]
                    j=-1
                    for i in dr:
                        j+=1
                        if i =="小偷":
                            dblo[j]=randint(3,5)
                            dblo[j]*=10
                            print(i+"的血量"+str(dblo[j]))
                    input("开战")
                    huihe=0
                    while (blood>0):
                        huihe+=1
                        print("第"+str(huihe)+"回合")
                        if huihe%5==1:
                            if huihe>=6:
                                print("敌人隐身效果解除")
                                dyin[0]=0
                            print("敌人在寻找隐身药水")
                        elif huihe%5==2:
                            print("敌人在饮用隐身药水")
                        elif huihe>2:
                            dyin[0]=1
                            print("敌人意图:攻击")
                            dra=0
                            drai=randint(5,10)
                            hhh=randint(1,2)
                            drai*=hhh
                            da[0]=drai
                            dra+=drai
                            print(dr[0]+"意图:攻击"+str(drai))
                        print("我方回合")
                        djs-=1
                        if djs==0:
                            djs=-1
                            print("定时炸弹爆炸了!")
                            for i in range(drsl):
                                if dyin[i]==0:
                                    dblo[i]-=40
                                    if dblo[i]<=0 and dr[i]!="":
                                        print(dr[i]+"已死亡")
                                        drsy-=1
                                        dr[i]=""
                                else:
                                    print(dr[i]+"隐身,没受伤害")
                        sp=["","","","","","","","","",""]
                        for i in range(5):
                            sp[i]=randint(0,casl-1)
                            sp[i]=card[sp[i]]
                        nl=3
                        while(nl>=0 and drsy>=1 and blood>0):
                            print("你还有"+str(nl)+"能量")
                            spp=sp
                            sp=["","","","","","","","","",""]
                            k=0
                            for i in spp:
                                if i!="":
                                    sp[k]=i
                                    k+=1
                            spp=["","","","","","","","","",""]
                            print("现在手牌",sp[0],sp[1],sp[2],sp[3],sp[4],sp[5],sp[6],sp[7],sp[8],sp[9])
                            sc=int(input("使用哪张牌?(结束输入0,不要超出范围!)")) 
                            if sc==0:
                                break
                            else:
                                if sp[sc-1]=="自爆(1)":
                                    if nl>=1:
                                        sp[sc-1]=""
                                        nl-=1
                                        scd=int(input("对谁使用自爆?"))
                                        print("敌方为精英,自爆没用")
                                        blood-=int((blood+blood%2)/2)
                                        print("我的血量",str(blood)+"/"+str(blomax))
                                    else:
                                        print("你没有足够的能量")
                                elif sp[sc-1]=="投掷炸弹(2)":
                                    if nl<2:
                                        print("你没有足够的能量")
                                    else:
                                        sp[sc-1]=""
                                        nl-=2
                                        for i in range(drsl):
                                            if dyin[i]==0:
                                                dblo[i]-=10
                                                if dblo[i]<=0 and dr[i]!="":
                                                    print(dr[i]+"已死亡")
                                                    drsy-=1
                                                    dr[i]=""
                                            else:
                                                print(dr[i]+"隐身,没受伤害") 
                                elif sp[sc-1]=="定时炸弹(3)":
                                    if nl<3:
                                        print("你没有足够的能量")
                                    else:
                                        sp[sc-1]=""
                                        nl-=3
                                        djs=3
                                elif sp[sc-1]=="手榴弹(1)":
                                    if nl>=1:
                                        sp[sc-1]=""
                                        nl-=1
                                        scd=int(input("对谁使用手榴弹?"))
                                        if dr[scd-1]!="":
                                            if dyin[scd-1]==0:
                                                dblo[scd-1]-=8
                                                if dblo[scd-1]<=0:
                                                    print(dr[scd-1],"已死亡")
                                                    drsy-=1
                                                    dr[scd-1]=""
                                            else:
                                                print(dr[scd-1]+"隐身,没受伤害")
                                        else:
                                            print("这个位置没有敌人,你打空了")
                                    else:
                                        print("你没有足够的能量")
                                elif sp[sc-1]=="烟雾弹(2)":
                                    if nl>=2:
                                        nl-=2
                                        sp[sc-1]=""
                                        print(yanwu)
                                        for i in range(drsl):
                                            if dr[i]!="":
                                                if dmian[i]==0 :###################gfdgesgsdgsdf
                                                    dra-=da[i]
                                                    da[i]=0
                                                    print(dr[i]+"被遮挡视线,无法攻击")
                                                else:
                                                    dmian[i]-=1
                                                    print(dr[i]+"一层免控抵消")
                                        break #烟雾弹结束回合
                                    else:
                                        print("你没有足够的能量")
                                else:
                                    print("你没有这张牌")
                        for i in range(drsl):
                            if dr[i]!="":
                                print(dr[i]+"血量"+str(dblo[i]))
                        if drsy<1:
                            print("好好搜刮")
                            print("夺回金币:",dqjb)
                            mon+=dqjb
                            hdjb=randint(1,100)
                            print("额外获得金币:",hdjb)
                            mon+=hdjb
                            jiali=['','','']
                            for i in range(3):
                                kap=randint(0,zdrz-1)
                                jiali[i]=zdrkp[kap]
                                if jiali[i]=="烟雾弹(2)":
                                    print("烟雾弹(2):结束回合,使敌方无法攻击一回合(下回合解除)")
                                elif jiali[i]=="手榴弹(1)":
                                    print("手榴弹(1):对一名敌人造成8伤害")
                                elif jiali[i]=="定时炸弹(3)":
                                    print("定时炸弹(3):三回合后对所有敌人造成40伤害")
                            print("奖励卡牌三选一(输入0跳过):",jiali)
                            huo=int(input())
                            if huo!=0:
                                card.append(jiali[huo-1])
                                print("现在卡组:",card)
                                casl+=1
                            break
                        print("敌方回合")
                        blood-=dra
                        print("你剩余血量:"+str(blood))

    elif juese=="998":
        mon=999999999999998
        blood=88
        blomax=88
        print("欢迎“财神”来到游戏")
        card=["金币(1)","金币(1)","撒钱(2)","金币护身(1)",'金币护身(1)']
        casl=5
        print("你的卡牌:",card)
        print("你的血量"+str(blood)+"/"+str(blomax)+",金币数量:"+str(mon))
        print("金币(1):对一名敌人造成8伤害")
        print("撒钱(2):消耗1000金币击杀一名非精英/BOSS敌人")
        print("金币护身(1):获得6格挡")
        print("开始前,你将获得一个奖励")
        jl=input("随机一张卡牌输入1,240金币输入2,加5最大生命输入3")
        if jl=="2":
            mon+=240
            print("金币数量:"+str(mon))
        elif jl=="1":
            jiaka=randint(0,csz-1)
            card.append(cskp[jiaka])
            print("你获得了"+cskp[jiaka])
            print("现在卡组:",card)
            casl+=1
        elif jl=="3":
            blood+=5
            blomax+=5
            print("你的血量"+str(blood)+"/"+str(blomax))
        print("第一个世界:草原")##1-10关
        for i in range(9):
            if blood<=0:
                print("你已死亡")
                break
            else:
                print("现在你的血量"+str(blood)+",金币数量:"+str(mon))
            print("第",i+1,"关")
            djs=-1
            if (i+1)%5!=0:
                drxh=randint(1,1)
                if drxh==1:
                    drsy=1
                    drsl=1
                    print("敌人:抢劫的")
                    dqjb=randint(0,int((mon+1)/2))
                    mon-=dqjb
                    print("被盗金币:"+str(dqjb))
                    dr=["抢劫的"]
                    dmian=[0]
                    da=[0]
                    dra=0
                    dblo=[0]
                    j=-1
                    for i in dr:
                        j+=1
                        if i =="抢劫的":
                            dblo[j]=randint(3,5)
                            dblo[j]*=10
                            print(i+"的血量"+str(dblo[j]))
                    input("开战")
                    huihe=0
                    while (blood>0 and huihe<=6):
                        huihe+=1
                        print("第"+str(huihe)+"回合")
                        if huihe<=5:
                            print("敌人意图:攻击")
                            dra=0
                            for i in range(drsl):
                                drai=randint(10,15)
                                da[i]=drai
                                dra+=drai
                                print(dr[i]+"意图:攻击"+str(drai))
                        else:
                            print("敌人意图:逃跑")
                        print("我方回合")
                        sp=["","","","","","","","","",""]
                        for i in range(5):
                            sp[i]=randint(0,casl-1)
                            sp[i]=card[sp[i]]
                        nl=3
                        while(nl>=0 and drsy>=1 and blood>0):
                            print("你还有"+str(nl)+"能量")
                            spp=sp
                            sp=["","","","","","","","","",""]
                            k=0
                            for i in spp:
                                if i!="":
                                    sp[k]=i
                                    k+=1
                            spp=["","","","","","","","","",""]
                            print("现在手牌",sp[0],sp[1],sp[2],sp[3],sp[4],sp[5],sp[6],sp[7],sp[8],sp[9])
                            sc=int(input("使用哪张牌?(结束输入0,不要超出范围!)")) 
                            if sc==0:
                                break
                        for i in range(drsl):
                            if dr[i]!="":
                                print(dr[i]+"血量"+str(dblo[i]))
                        if drsy<1:
                            print("好好搜刮")
                            print("夺回金币:",dqjb)
                            mon+=dqjb
                            hdjb=randint(1,100)
                            print("额外获得金币:",hdjb)
                            mon+=hdjb
                            jiali=['','','']
                            for i in range(3):
                                kap=randint(0,csz-1)
                                jiali[i]=cskp[kap]#"看破红尘(1)","金币光环(1)","财富之路(4)","贿赂(1)",金币能量(0)
                                if jiali[i]=="看破红尘(1)":
                                    print("看破红尘(1):使用一半的金币造成100伤害")
                                elif jiali[i]=="金币光环(1)":
                                    print("金币光环(1):")
                                elif jiali[i]=="财富之路(4)":
                                    print("财富之路(4):金币翻倍")
                                elif jiali[i]=="贿赂(1)":
                                    print("贿赂(1):消耗3000金币,使敌人在该回合内丧失攻击能力")
                                elif jiali[i]=="金币能量(0)":
                                    print("金币能量(0):消耗3000金币,使一名敌人在该回合内丧失攻击能力")
                            print("奖励卡牌三选一(输入0跳过):",jiali)
                            huo=int(input())
                            if huo!=0:
                                card.append(jiali[huo-1])
                                print("现在卡组:",card)
                                casl+=1
                            break
                        print("敌方回合")
                        if huihe==6:
                            print("敌人逃走了")
                            break
                        else:
                            print("敌人:“还不把钱交出来”")
                            m=input("是否把钱交出?")
                            if m=="是":
                                print("敌人:“谢谢你的钱啦”")
                                drsl=0
                                mon=0
                                break
                            else:
                                blood-=dra
                                print("你剩余血量:"+str(blood))
            if i+1==5:
                print("精英即将来袭")
                print("商店:")
                gm=-1
                sjkp=["","","","",""]
                sjkpj=[0,0,0,0,0]
                for i in range(5):
                    abcd=randint(0,zdrz-1)
                    sjkp[i]=zdrkp[abcd]
                    sjkpj[i]=randint(60,310)
                while (gm!=0):
                    print("金币:"+str(mon))
                    print("上架卡片:1号",sjkp[0],sjkpj[0],"元,2号",sjkp[1],sjkpj[1],"元,3号",sjkp[2],sjkpj[2],"元,4号",sjkp[3],sjkpj[3],"元,5号",sjkp[4],sjkpj[4],"元")
                    print("服务: 6号 最大生命+6 250元 7号 生命值+26 260元")
                    gm=int(input("你要购买哪一个(按顺序输入数字,不要输入0)"))
                    if gm==0:
                        break
                    elif gm<=5:
                        if mon>=sjkpj[gm-1]:
                            mon-=sjkpj[gm-1]
                            print("成交! 给你一张",sjkp[gm-1])
                            card.append(sjkp[gm-1])
                            abcd=randint(0,zdrz-1)
                            sjkp[gm-1]=zdrkp[abcd]
                            sjkpj[gm-1]=randint(20,100)
                            print("现在卡组:",card)
                            casl+=1
                        else:
                            print("你没有这么多钱")
                    elif gm==6:
                        if mon>=250:
                            mon-=250
                            blomax+=6
                            blood+=6
                            print("成交!生命值:"+str(blood)+"/"+str(blomax))
                        else:
                            print("你没有这么多钱")
                    elif gm==7:
                        if mon>=260:
                            mon-=260
                            blood+=26
                            if blood>blomax:
                                blood=blomax
                            print("成交!生命值:"+str(blood)+"/"+str(blomax))
                        else:
                            print("你没有这么多钱")
                print("休息区:")
                jiali=input("请选择:1.加最大生命值的20%。2.升级一张卡牌。(退出输入其他)")
                if jiali=="1":
                    jiasm=blomax-blood
                    if jiasm>int(blomax/5):
                        jiasm=int(blomax/5)
                    blood+=jiasm
                    print("增加"+str(jiasm)+"生命值,现在生命"+str(blood)+"/"+str(blomax))
                elif jiali=="2":
                    print("你的牌",card)
                    while True:
                        duan=int(input("你要锻造哪张牌?(有加号的代表已经锻造过,不能重复锻造)输入在1-"+str(casl)+"之间,不然会出错"))
                        if card[duan-1]=="自爆(1)":
                            print("自爆(1)+:消耗自身一半(向上取整)的血量击杀一名非BOSS敌人,*使用后重新加入卡组*")
                            sf=input("是否确认锻造?")
                            if sf=="是":
                                break
                        elif card[duan-1]=="投掷炸弹(2)":
                            print("投掷炸弹(2)+:对所有敌人造成*18*伤害")
                            sf=input("是否确认锻造?")
                            if sf=="是":
                                break
                        elif card[duan-1]=="定时炸弹(3)":
                            print("定时炸弹(3)+:三回合后对所有敌人造成*50*伤害")
                            sf=input("是否确认锻造?")
                            if sf=="是":
                                break
                        elif card[duan-1]=="手榴弹(1)":
                            print("手榴弹(1)+:对一名敌人造成*12*伤害")
                            sf=input("是否确认锻造?")
                            if sf=="是":
                                break
                        elif card[duan-1]=="烟雾弹(2)":
                            print("烟雾弹(2)+:需要能量降低(只需*1*)")
                            sf=input("是否确认锻造?")
                            if sf=="是":
                                break
                        else:
                            print("这张卡牌已经锻造过了")
                    print("正在锻造"+card[duan-1])
                    #card[duan-1]=card[duan-1]+"+"
                    #print(card[duan-1])
                    print("锻造时起火了,你急忙逃跑,锻造失败")
                drxh=randint(1,1)
                if drxh==1:
                    drsy=1
                    drsl=1
                    print("精英怪:小偷")
                    dqjb=randint(0,int((mon+1)/2))
                    mon-=dqjb
                    print("被盗金币:"+str(dqjb))
                    dr=["小偷"]
                    dmian=[0]
                    dyin=[0]
                    da=[0]
                    dra=0
                    dblo=[0]
                    j=-1
                    for i in dr:
                        j+=1
                        if i =="小偷":
                            dblo[j]=randint(3,5)
                            dblo[j]*=10
                            print(i+"的血量"+str(dblo[j]))
                    input("开战")
                    huihe=0
                    while (blood>0):
                        huihe+=1
                        print("第"+str(huihe)+"回合")
                        if huihe%5==1:
                            if huihe>=6:
                                print("敌人隐身效果解除")
                                dyin[0]=0
                            print("敌人在寻找隐身药水")
                        elif huihe%5==2:
                            print("敌人在饮用隐身药水")
                        elif huihe>2:
                            dyin[0]=1
                            print("敌人意图:攻击")
                            dra=0
                            drai=randint(5,10)
                            hhh=randint(1,2)
                            drai*=hhh
                            da[0]=drai
                            dra+=drai
                            print(dr[0]+"意图:攻击"+str(drai))
                        print("我方回合")
                        sp=["","","","","","","","","",""]
                        for i in range(5):
                            sp[i]=randint(0,casl-1)
                            sp[i]=card[sp[i]]
                        nl=3
                        while(nl>=0 and drsy>=1 and blood>0):
                            print("你还有"+str(nl)+"能量")
                            spp=sp
                            sp=["","","","","","","","","",""]
                            k=0
                            for i in spp:
                                if i!="":
                                    sp[k]=i
                                    k+=1
                            spp=["","","","","","","","","",""]
                            print("现在手牌",sp[0],sp[1],sp[2],sp[3],sp[4],sp[5],sp[6],sp[7],sp[8],sp[9])
                            sc=int(input("使用哪张牌?(结束输入0,不要超出范围!)")) 
                            if sc==0:
                                break
                            
                        for i in range(drsl):
                            if dr[i]!="":
                                print(dr[i]+"血量"+str(dblo[i]))
                        if drsy<1:
                            print("好好搜刮")
                            print("夺回金币:",dqjb)
                            mon+=dqjb
                            hdjb=randint(1,100)
                            print("额外获得金币:",hdjb)
                            mon+=hdjb
                            jiali=['','','']
                            for i in range(3):
                                kap=randint(0,csz-1)
                                jiali[i]=cskp[kap]#"看破红尘(1)","金币光环(1)","财富之路(4)","贿赂(1)",金币能量(0)
                                if jiali[i]=="看破红尘(1)":
                                    print("看破红尘(1):使用一半的金币造成100伤害")
                                elif jiali[i]=="金币光环(1)":
                                    print("金币光环(1):")
                                elif jiali[i]=="财富之路(4)":
                                    print("财富之路(4):金币翻倍")
                                elif jiali[i]=="贿赂(1)":
                                    print("贿赂(1):消耗3000金币,使敌人在该回合内丧失攻击能力")
                                elif jiali[i]=="金币能量(0)":
                                    print("金币能量(0):消耗3000金币,,获得3能量")
                            print("奖励卡牌三选一(输入0跳过):",jiali)
                            huo=int(input())
                            if huo!=0:
                                card.append(jiali[huo-1])
                                print("现在卡组:",card)
                                casl+=1
                            break
                        print("敌方回合")
                        dra-=ged
                        if dra>0:
                            blood-=dra
                        print("你剩余血量:"+str(blood))