当前位置:首页 » 《随便一记》 » 正文

卡牌对决(2版)_kaka_zheng的博客

4 人参与  2021年12月17日 09:27  分类 : 《随便一记》  评论

点击全文阅读


目录

1.基础版

2.提高版


1.基础版

知识:

        1.ramdom模块

                random.randint(0,100)

        2.字典

                zidianList={‘key’:‘value’}

                dict = {'Name': 'Runoob', 'Age': 7, 'Class': 'First'}

                print ("dict['Name']: ", dict['Name'])

                print("dict['Age']: ", dict['Age'])

                以上实例输出结果:

        dict['Name']:  Runoob
        dict['Age']:  7
import random
print("-- -- -- 卡牌对决 -- -- --")
card1 = {"名称":"于杨大帅哥", "攻击力":1, "防御力":1, "敏捷":1,'攻击距离':100000}
card2 = {"名称":"Bug于杨", "攻击力":-100, "防御力":-100, "敏捷":0,'攻击距离':1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000}
card3 = {"名称":"蓝儿", "攻击力":2000, "防御力":6000, "敏捷":30,'攻击距离':10000000000000000000000000000000000000000000000000000}
card4 = {"名称":"白儿", "攻击力":2000, "防御力":4000, "敏捷":50,'攻击距离':100000}
card5 = {"名称":"云龙", "攻击力":6000, "防御力":2000, "敏捷":20,'攻击距离':100000}
card6 = {"名称":"永恒天星云儿", "攻击力":6000, "防御力":6000, "敏捷":60,'攻击距离':345}
#card7 = {"名称":"永恒骚星陈智昊", "攻击力":0, "防御力":10000, "敏捷":0,'攻击距离':10000000000000000000000000000000000000000}
card9 = {"名称":"永恒天王狗兄弟", "攻击力":1000000000, "防御力":1000000000, "敏捷":1000000000,'攻击距离':10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000}
card8 = {"名称":"狗兄弟", "攻击力":10000, "防御力":10000, "敏捷":100,'攻击距离':10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000}
print("""规则:
1、双方初始血量:10000
2、对决之前,双方随机获得3张卡牌
3、每回合双方派出1张卡牌出战,对决后,出战卡牌消失,并重新抽取1张卡牌
4、敏捷高的一方进行攻击,对方根据自身卡牌的防御力,扣除血量
5、接着敏捷低的一方进行反击,对方根据自身卡牌的防御力,扣除血量
6、血量低于0的一方输掉比赛
""")

# 血量
playerHP = 10000
enemyHP = 10000
# 卡池
cards = [card1, card2, card3, card4, card5,card8,card6]
# 抽取卡牌
playerCards = [card9]
enemyCards = []
for i in range(3):
    a = random.randint(0, len(cards) - 1)
    playerCards.append(cards[a])
    b = random.randint(0, len(cards) - 1)
    enemyCards.append(cards[b])
while True:
    # 卡牌展示
    print("我方卡牌:")
    for i in playerCards:
        print(i)
    # 我方出牌
    playerSelect = input("派第几张卡牌出战:")
    playerC = playerCards[int(playerSelect) - 1]
    print("我方派出了:" + playerC["名称"])
    # 敌方出牌
    enemySelect = random.randint(0, len(enemyCards) - 1)
    enemyC = enemyCards[enemySelect]
    print("敌方派出了:" + enemyC["名称"])

    # 我方先攻击
    if playerC["敏捷"] > enemyC["敏捷"]:
        print("我方发起攻击!")
        playerHurt = playerC["攻击力"] - enemyC["防御力"]
        if playerHurt < 0:
            playerHurt = 0
        enemyHP = enemyHP - playerHurt
        if enemyHP <= 0:
            print("对决结束,敌方血量为0,我方获胜!")
            break
        else:
            print("我方造成伤害:" + str(playerHurt) + ",敌方剩余血量:" + str(enemyHP))
        # 敌方反击
        if enemyC['攻击距离']>=playerC['攻击距离']:
            print("敌方发起反击!")
            enemyHurt = enemyC["攻击力"] - playerC["防御力"]
            if enemyHurt < 0:
                enemyHurt = 0
            playerHP = playerHP - enemyHurt
            if playerHP <= 0:
                print("对决结束,我方血量为0,敌方获胜!")
                break
            else:
                print("敌方造成伤害:" + str(enemyHurt) + ",我方剩余血量:" + str(playerHP))
    # 敌方先攻击
    elif playerC["敏捷"] < enemyC["敏捷"]:
        print("敌方发起攻击!")
        enemyHurt = enemyC["攻击力"] - playerC["防御力"]
        if enemyHurt < 0:
            enemyHurt = 0
        playerHP = playerHP - enemyHurt
        if playerHP <= 0:
            print("对决结束,我方血量为0,敌方获胜!")
            break
        else:
            print("敌方造成伤害:" + str(enemyHurt) + ",我方剩余血量:" + str(playerHP))
        #我方反击
        if playerC['攻击距离']>=enemyC['攻击距离']:
            print("我方发起反击!")
            playerHurt = playerC["攻击力"] - enemyC["防御力"]
            if playerHurt < 0:
                playerHurt = 0
            enemyHP = enemyHP - playerHurt
            if enemyHP <= 0:
                print("对决结束,敌方血量为0,我方获胜!")
                break
            else:
                print("我方造成伤害:" + str(playerHurt) + ",敌方剩余血量:" + str(enemyHP))
    # 不攻击
    else:
        print("对方跑得太快,追不上!")

    # 删除卡牌
    playerCards.remove(playerC)
    enemyCards.remove(enemyC)
    # 补充卡牌
    a = random.randint(0, len(cards) - 1)
    playerCards.append(cards[a])
    b = random.randint(0, len(cards) - 1)
    enemyCards.append(cards[b])
    # 魔法州
    spring = random.randint(1,100)
    if spring<=30:
        print('陈老师爆发')
        magic=random.randint(1,100)
        if magic<=99:
            print('陈老师很开心')
            for i in cards:
                if i['攻击力']<3000:
                    i['buff']='陈老师'
        else:
            print('陈老师严重暴怒')
            for i in cards:
                if i['攻击力']<3000:
                    i['buff']='bad'
    else:
        print('Too quiet!')
    #buff
    for i in cards:
        if 'buff' in i:
            if i["buff"]=='陈老师':
                i['防御力']+=1000
            else:
                i['防御力']-=1000

2.提高版

知识:

        1.ramdom模块

                random.randint(0,100)

        2.字典

                zidianList={‘key’:‘value’}

                dict = {'Name': 'Runoob', 'Age': 7, 'Class': 'First'}

                print ("dict['Name']: ", dict['Name'])

                print("dict['Age']: ", dict['Age'])

                以上实例输出结果:

        dict['Name']:  Runoob
        dict['Age']:  7

        3.time模块

                等待 2 秒:

                time.sleep(2)

        4.import ... as ...

                例:import random as r

                则:r.randint(1,2)

import random
import time as t

while True:
    
    print(" -- -- -- 卡牌对决 -- -- -- ")
    card1 = {"名称":"诺兹多姆","攻击力":8,"防御力":8,"敏捷":9,"攻击距离":5}
    card2 = {"名称":"阿莱克斯塔萨","攻击力":8,"防御力":8,"敏捷":6,"攻击距离":5}
    card3 = {"名称":"伊瑟拉","攻击力":4,"防御力":12,"敏捷":3,"攻击距离":5}
    card4 = {"名称":"玛雷苟斯","攻击力":4,"防御力":12,"敏捷":5,"攻击距离":5}
    card5 = {"名称":"耐萨里奥","攻击力":12,"防御力":12,"敏捷":2,"攻击距离":5}
    card6 = {"名称":"奥妮克希亚","攻击力":7,"防御力":7,"敏捷":4,"攻击距离":5}
    card7 = {"名称":"雏龙","攻击力":1,"防御力":1,"敏捷":2,"攻击距离":2}
    card8 = {"名称":"暮光守护者","攻击力":3,"防御力":6,"敏捷":12,"攻击距离":4}
    card9 = {"名称":"考达拉幼龙","攻击力":6,"防御力":3,"敏捷":12,"攻击距离":4}
    card10 = {"名称":"冰喉","攻击力":7,"防御力":8,"敏捷":7,"攻击距离":4}
    card11 = {"名称":"精灵龙","攻击力":3,"防御力":8,"敏捷":5,"攻击距离":3}
    card12 = {"名称":"午夜噩龙","攻击力":12,"防御力":1,"敏捷":10,"攻击距离":4}
    card13 = {"名称":"梦魇之龙","攻击力":2,"防御力":8,"敏捷":6,"攻击距离":4}
    card14 = {"名称":"黑龙领主死亡之翼","攻击力":12,"防御力":12,"敏捷":2,"攻击距离":5}
    card15 = {"名称":"龙人侦测者","攻击力":5,"防御力":6,"敏捷":7,"攻击距离":3}
    card16 = {"名称":"碧蓝幼龙","攻击力":4,"防御力":4,"敏捷":5,"攻击距离":2}
    card17 = {"名称":"龙王配偶","攻击力":5,"防御力":5,"敏捷":5,"攻击距离":5}
    card18 = {"名称":"火山幼龙","攻击力":6,"防御力":4,"敏捷":5,"攻击距离":4}
    card19 = {"名称":"龙人打击者","攻击力":6,"防御力":6,"敏捷":7,"攻击距离":3}
    card20 = {"名称":"克洛玛古斯","攻击力":6,"防御力":6,"敏捷":6,"攻击距离":4}
    card21 = {"名称":"奈法利安","攻击力":8,"防御力":8,"敏捷":6,"攻击距离":4}
    card22 = {"名称":"迦拉克隆","攻击力":10,"防御力":10,"敏捷":8,"攻击距离":11}
    card23 = {"名称":"辛达苟萨","攻击力":7,"防御力":7,"敏捷":7,"攻击距离":2}
    card24 = {"名称":"克苏恩","攻击力":6,"防御力":6,"敏捷":5,"攻击距离":11}
    card25 = {"名称":"尤格 萨隆","攻击力":7,"防御力":5,"敏捷":5,"攻击距离":11}
    card26 = {"名称":"恩佐斯","攻击力":5,"防御力":7,"敏捷":5,"攻击距离":11}
    card27 = {"名称":"亚煞极","攻击力":10,"防御力":10,"敏捷":5,"攻击距离":11}
    card28 = {"名称":"小型石魔像","攻击力":2,"防御力":5,"敏捷":6,"攻击距离":5}
    card29 = {"名称":"中型石魔像","攻击力":6,"防御力":7,"敏捷":4,"攻击距离":6}
    card30 = {"名称":"大型石魔像","攻击力":9,"防御力":10,"敏捷":4,"攻击距离":7}
    card31 = {"名称":"泥岩巨像","攻击力":10,"防御力":12,"敏捷":4,"攻击距离":8}
    card32 = {"名称":"泥岩","攻击力":8,"防御力":10,"敏捷":5,"攻击距离":6}

    magic1 = {"名称":"流星雨","伤害":2,"类型":"群伤"}
    magic2 = {"名称":"刺骨","伤害":3,"类型":"连击"}
    magic3 = {"名称":"舞空术","伤害":0,"类型":"法术"}
    magic4 = {"名称":"星坠","伤害":7,"类型":"单体"}
    magic5 = {"名称":"沉默","伤害":2,"类型":"法术"}
    magic6 = {"名称":"冰封","伤害":1,"类型":"法术"}
    magic7 = {"名称":"火球术","伤害":5,"类型":"单体"}
    magic8 = {"名称":"混沌虚无","伤害":21,"类型":"群伤"}
    magic9 = {"名称":"寂静之森传送门","伤害":0,"类型":"法术"}
    magic10 = {"名称":"次级治疗术","伤害":2,"类型":"治愈"}
    magic11 = {"名称":"神圣新星","伤害":2,"类型":"群伤"}
    magic12 = {"名称":"火焰咆哮","伤害":2,"类型":"群伤"}
    magic13 = {"名称":"奥术吐息","伤害":2,"类型":"群伤"}
    magic14 = {"名称":"利刃出鞘","伤害":4,"类型":"连击"}
    magic15 = {"名称":"毁灭打击","伤害":21,"类型":"单体"}
    magic16 = {"名称":"梦境之门","伤害":0,"类型":"法术"}
    magic17 = {"名称":"星火术","伤害":5,"类型":"单体"}
    magic18 = {"名称":"猛击","伤害":4,"类型":"连击"}
    magic19 = {"名称":"复苏","伤害":3,"类型":"治愈"}


    totem1 = {"名称":"空气之怒图腾","攻击力":10,"防御力":5,"敏捷":5,"攻击距离":8}
    totem2 = {"名称":"毒蛇图腾","攻击力":5,"防御力":10,"敏捷":5,"攻击距离":8}
    totem3 = {"名称":"流星图腾","攻击力":5,"防御力":5,"敏捷":10,"攻击距离":8}
    
    plus_1 = 0
    plus_2 = 0
    plus_3 = 0
    unplus = False
    unplus_ = False
    unplus_n = False
    dh = False
    dh1 = False
    rounds = 0
    timepoint = 0
    flag_1 = False
    flag_2 = False

    print("""
    规则:
    1、双方初始血量:40
    2、对决之前,双方随机获得4张卡牌
    3、每回合双方派出1张卡牌出战,对决后,出战卡牌消失,并重新抽取1张卡牌
    4、每人各放一个法术,但都可选择不放,如打出的话法术消失
    5、敏捷高的一方进行攻击,对方根据自身卡牌的防御力,扣除血量(如果攻击距离不够,则打不到,舞空术除外)
    6、接着敏捷低的一方进行反击,对方根据自身卡牌的防御力,扣除血量(如果攻击距离不够,则打不到,舞空术除外)
    7、血量低于0的一方输掉比赛
    8、有些卡牌有特殊效果,会对比赛有帮助
    """)

    playerHP = 40
    enemyHP = 40

    cards = [card1,card2,card3,card4,card5,card6,card7,card8,card9,card10,card11,card12,card13,card14,card15,card16,card17,card18,card19,card20,card21,card22,card23,card24,card25,card26,card27,card27,card28,card29,card30,card32]
    magics = [magic1,magic2,magic3,magic4,magic5,magic6,magic7,magic8,magic9,magic10,magic11,magic12,magic13,magic14,magic15]
    totems = [totem1,totem2,totem3]
    
    playerCards = []
    playerMagics = []
    enemyCards = []
    for i in range(4):
        a = random.randint(0,len(cards) - 1)
        playerCards.append(cards[a])
        b = random.randint(0,len(cards) - 1)
        enemyCards.append(cards[b])
    for i in range(3):
        a = random.randint(0,len(magics) - 1)
        playerMagics.append(magics[a])
    while True:        
        rounds += 1
        print("第%d回合开始"%rounds)

        a = random.randint(0,3)
        if a == 0:
            playerCards.append(card18)
            playerMagics.append(magic12)
            t.sleep(0.2)
            print("事件 - 火焰之地传送门")
        elif a == 1:
            playerMagics.append(magic1)
            playerMagics.append(magic4)
            playerMagics.append(magic3)
            playerMagics.append(magic13)
            print("事件 - 星之赐福")
        elif a == 2:
            playerCards.append(card28)
            playerCards.append(card29)
            playerCards.append(card30)
            playerCards.append(card31)
            playerMagics.append(magic19)
            print("事件 - 自然力量")
        print("我方卡牌:")
        for i in playerCards:
            print(i)

        print("我方法术:")
        for i in playerMagics:
            print(i)

        playerSelect = input("派第几张卡牌出战:")
        playerC = playerCards[int(playerSelect) - 1]
        print("我方派出了:" + playerC["名称"])

        enemySelect = random.randint(0,len(enemyCards) - 1)
        enemyC = enemyCards[enemySelect]
        t.sleep(0.2)
        print("敌方派出了:" + enemyC["名称"])

        c_p = playerC
        c_e = enemyC
        if playerC["名称"] == "泥岩":
            t.sleep(0.2)
            print("泥岩 发动技能 巨石增援 让你获得二只 泥岩巨像")
            for i in range(2):
                playerCards.append(card31)
            t.sleep(0.2)
            print("我方卡牌:")
            for i in playerCards:
                print(i)
                
            t.sleep(0.2)
            print("泥岩 发动技能 自然生长 让你手牌中的所有卡牌攻击加1、防御加2,石魔像攻击另外加2")
            for i in playerCards:
                i["攻击力"] += 1
                i["防御力"] += 2
                a = i["名称"]
                if "石魔像" in a:
                    i["攻击力"] += 2
        elif playerC["名称"] == "迦拉克隆":
            playerCards.append(card1)
            playerCards.append(card2)
            playerCards.append(card3)
            playerCards.append(card4)
            playerCards.append(card5)
            print("我方卡牌:")
            for i in playerCards:
                print(i)
        elif playerC["名称"] == "伊瑟拉":
            magics.append(magic16)
            t.sleep(0.2)
            print("伊瑟拉 发动技能 梦境大门 每回合有几率抽到梦境之门 抽到时会让你获得一个法术、一个随从")
        elif playerC["名称"] == "奥妮克希亚":
            for i in range(3):
                a = card7
                a["攻击力"] = 5
                a["防御力"] = 4
                a["敏捷"] = 5
                a["攻击距离"] = 4
                a["名称"] = "幼龙"
                playerCards.append(a)
            playerCards.append(card18)
            t.sleep(0.2)
            print("奥妮克希亚 发动技能 幼龙增援 让你获得三只 幼龙 和一只 火山幼龙")
        elif playerC["名称"] == "火山幼龙":
            if magic12 in playerMagics:
                t.sleep(0.2)
                print("火山幼龙 发动技能 火焰力量 让我方法术伤害加一 并有几率让其中一个单体法术变为群伤")
                a = False
                for i in playerMagics:
                    a = random.randint(0,1)
                    if a == 0 and i["类型"] == "单体":
                        a = True
                        t.sleep(0.2)
                        print("火焰力量:",i,"变为群伤法术")
                        i["类型"] == "群伤"
                    t.sleep(0.2)
                    print("火焰力量:",i,"伤害加一")
                    i["伤害"] += 1
                if a == False:
                    lst = []
                    for i in playerMagics:
                        lst.append(i["类型"])
                    if not "单体" in lst:
                        t.sleep(0.2)
                        print("你的魔法库里没有单体法术")
                        t.sleep(0.2)
                        print("火山幼龙 怜悯了你 教会了你一个法术")
                        magic13 = {"名称":"火神力","伤害":4,"类型":"单体"}
                        playerMagics.append(magic13)
                        t.sleep(0.2)
                        print("我方法术:")
                        for i in playerMagics:
                            t.sleep(0.2)
                            print(i)
            else:
                t.sleep(0.2)
                print("火山幼龙 发动技能 心灵之火 让所有手牌攻击力、防御力加一")
                for i in playerCards:
                    i["攻击力"] += 1
                    i["防御力"] += 1
        elif playerC["名称"] == "碧蓝幼龙":
            for i in playerMagics:
                i["伤害"] += 3
            print("碧蓝幼龙 发动技能 魔力迸发 让我方法术伤害加三")
        elif playerC["名称"] == "诺兹多姆":
            for i in enemyCards:
                i["敏捷"] -= 2
                i["攻击距离"] -= 1
                if i["敏捷"] < 0:
                    i["敏捷"] = 0
                if  i["攻击距离"] < 1:
                     i["攻击距离"] = 1
            t.sleep(0.2)
            print("诺兹多姆 发动技能 时间漩涡 让敌方所有卡牌敏捷减2 攻击距离减1")
            unplus_n = True
        elif playerC["名称"] == "玛雷苟斯":
            for i in playerMagics:
                i["伤害"] += 4
            print("玛雷苟斯 发动技能 魔力源泉 让我方法术伤害加四")
        elif playerC["名称"] == "阿莱克斯塔萨" :
            if enemyHP >= 20:
                enemyHP = 20
                t.sleep(0.2)
                print("阿莱克斯塔萨 发动技能 烈焰吐息 敌方生命变为%d"%enemyHP)
            if playerHP <= 20:
                playerHP = 20
                t.sleep(0.2)
                print("阿莱克斯塔萨 发动技能 生命之火 我方生命变为%d"%playerHP)
        elif playerC["名称"] == "耐萨里奥":
            enemyHP -= 15
            t.sleep(0.2)
            print("耐萨里奥 发动技能 火球滚滚 敌方生命减15 变为%d"%enemyHP)
            if enemyHP <= 0:
                print("对决结束,敌方死亡,我方胜利")
                t.sleep(0.2)
                a = input("是否再来一局(如否,请输入“f”)")
                if a == "f":
                    exit(0)
                else:
                    break
        elif playerC["名称"] == "冰喉":
            enemyHP -= 4
            t.sleep(0.2)
            if enemyHP <= 0:
                print("对决结束,敌方死亡,我方胜利")
                t.sleep(0.2)
                a = input("是否再来一局(如否,请输入“f”)")
                if a == "f":
                    exit(0)
                else:
                    break
            print("冰喉 发动技能 冰刺 敌方生命减4 变为%d"%enemyHP)
        elif playerC["名称"] == "辛达苟萨":
            enemyHP -= 3
            t.sleep(0.2)
            print("辛达苟萨 发动技能 暗影弹 敌方生命减3 变为%d"%enemyHP)
        elif playerC["名称"] == "黑龙领主死亡之翼":
            enemyHP -= 15
            playerHP -= 7
            t.sleep(0.2)
            if enemyHP <= 0:
                print("对决结束,敌方死亡,我方胜利")
                t.sleep(0.2)
                a = input("是否再来一局(如否,请输入“f”)")
                if a == "f":
                    exit(0)
                else:
                    break
            elif playerHP <= 0:
                print("对决结束,我方死亡,敌方胜利")
                t.sleep(0.2)
                a = input("是否再来一局(如否,请输入“f”)")
                if a == "f":
                    exit(0)
                else:
                    break
            print("黑龙领主死亡之翼 发动技能 死亡之熔岩 敌方生命减15 我方生命减7 分别变为",enemyHP,playerHP)
        elif playerC["名称"] == "龙人打击者":
            a = random.randint(0,1)
            if a == 1:
                t.sleep(0.2)
                print("打到了!")
                enemyHP -= 2
                t.sleep(0.2)
                print("龙人打击者 发动技能 增强拳 敌方生命减2 变为%d"%enemyHP)
                if enemyHP <= 0:
                    print("对决结束,敌方死亡,我方胜利")
                    t.sleep(0.2)
                    a = input("是否再来一局(如否,请输入“f”)")
                    if a == "f":
                        exit(0)
                    else:
                        break
            else:
                t.sleep(0.2)
                print("没打到")
        elif playerC["名称"] == "龙王配偶":
            plus_1 += 1
            plus_2 += 1
            plus_3 += 1
            t.sleep(0.2)
            print("龙王配偶 发动技能 战舞 激活1、2、3号特殊加成,每回合给全体手牌攻击力、防御力、敏捷加1,持续3回合")
            timepoint += 3
        elif playerC["名称"] == "梦魇之龙":
            playerC["攻击力"] += rounds
            t.sleep(0.2)
            print("梦魇之龙 发动技能 自我增强 加回合数攻击力 现在攻击力为%d"%playerC["攻击力"])
        elif playerC["名称"] == "暮光守护者":
            t.sleep(0.2)
            print("暮光守护者 发动技能 守护气场 激活1号特殊加成,每回合给全体手牌敏捷加1,持续2回合")
            timepoint += 2
            plus_1 += 1
        elif playerC["名称"] == "雏龙":
            plus_2 += 1
            t.sleep(0.2)
            print("雏龙 发动技能 卖萌 激活2号特殊加成,每回合给全体手牌攻击力加1,持续2回合")
            timepoint += 2
        elif playerC["名称"] == "午夜噩龙":
            unplus == True
            t.sleep(0.2)
            print(" 午夜噩龙 发动技能 恶灵天谴 每回合让对手手牌攻击力、防御力、敏捷随机减一")
        elif playerC["名称"] == "尤格 萨隆":
            if rounds >= 5:
                a = random.randint(1,6)
                if a == 1:
                    for i in enemyCards:
                        i["buff"] = "混沌的诅咒"
                        t.sleep(0.2)
                        print("尤格 萨隆 发动技能 黏糊臭泥 给全体敌人加buff:混沌的诅咒")
                elif a == 2:
                    for i in playerCards:
                        i["buff"] = "泰坦的恩赐"
                        t.sleep(0.2)
                    print("尤格 萨隆 发动技能 养生热泥 给全体队友加buff:泰坦的恩赐")
                elif a == 6:
                    unplus_ = True
                    t.sleep(0.2)
                    print("尤格 萨隆 发动技能 瘴气 每回合让对手手牌攻击力、防御力、敏捷随机减二")
                else:
                    enemyHP -= round(a*1.5)
                    t.sleep(0.2)
                    print("尤格 萨隆 发动技能 湿沼泥弹 让对手血量减少%d"%round(a*1.5))
                    if enemyHP <= 0:
                        print("对决结束,敌方死亡,我方胜利")
                        t.sleep(0.2)
                        a = input("是否再来一局(如否,请输入“f”)")
                        if a == "f":
                            exit(0)
                        else:
                            break
                print("尤格 萨隆蓄力未完成,无法发动技能")
        elif playerC["名称"] == "克苏恩":
            t.sleep(0.2)
            print("克苏恩 发动技能 千眼之劫")
            enemyC["防御力"] -= 12
            if enemyC["防御力"] < 0:
                t.sleep(0.2)
                print("破碎之劫:敌方防御力被消耗殆尽")
                a = 12 + enemyC["防御力"]
                enemyC["防御力"] = 0
                enemyHP -= a
                t.sleep(0.2)
                print("破碎之劫:敌方生命值变为%d"%enemyHP)
                if enemyHP <= 0:
                    print("对决结束,敌方死亡,我方胜利")
                    t.sleep(0.2)
                    a = input("是否再来一局(如否,请输入“f”)")
                    if a == "f":
                        exit(0)
                    else:
                        break
            else:
                t.sleep(0.2)
                print("破碎之劫:敌方防御力剩下%d"%enemyC["防御力"])
        elif playerC["名称"] == "恩佐斯":
            enemyHP -= 3
            playerHP -= 5
            for i in enemyCards:
                i["buff"] = "混沌的诅咒"
            t.sleep(0.2)
            print("恩佐斯 发动技能 千须之难")
            t.sleep(0.2)
            print("千须之难:敌方生命减3 我方生命减5 分别变为",enemyHP,playerHP)
            t.sleep(0.2)
            if enemyHP <= 0:
                print("对决结束,敌方死亡,我方胜利")
                t.sleep(0.2)
                a = input("是否再来一局(如否,请输入“f”)")
                if a == "f":
                    exit(0)
                else:
                    break
            elif playerHP <= 0:
                print("对决结束,我方死亡,敌方胜利")
                t.sleep(0.2)
                a = input("是否再来一局(如否,请输入“f”)")
                if a == "f":
                    exit(0)
                else:
                    break
            print("千须之难:每回合让对手手牌攻击力、防御力、敏捷随机减一")
            print("千须之难:每回合让对手手牌攻击力、防御力、敏捷再次随机减二")
            unplus_ = True
            unplus = True
        elif playerC["名称"] == "亚煞极":
            a = random.randint(0,len(cards) - 1)
            t.sleep(0.2)
            print("亚煞极 发动技能 黑羊傀儡")
            b = cards[a]
            b["名称"] = "黑羊傀儡"
            b["buff"] = "泰坦的恩赐"
            b["防御力"] += 2
            b["敏捷"] += 2
            playerCards.append(b)
            t.sleep(0.2)
            print("黑羊傀儡 数值面板为",b)
            a = random.randint(1,3)
            enemyHP -= a
            t.sleep(0.2)
            print("亚煞极 发动技能 黑色吐息 敌方生命值变为%d"%enemyHP)
            if enemyHP <= 0:
                print("对决结束,敌方死亡,我方胜利")
                t.sleep(0.2)
                a = input("是否再来一局(如否,请输入“f”)")
                if a == "f":
                    exit(0)
                else:
                    break

            playerC["敏捷"] += plus_1
            playerC["攻击力"] += plus_2
            playerC["防御力"] += plus_3
            if unplus == True:
                a = random.randint(1,3)
                if a == 1:
                    for i in enemyCards:
                        i["攻击力"] -= 1
                    t.sleep(0.2)
                    print("恶灵天谴:攻击力减1")
                elif a == 2:
                    for i in enemyCards:
                        i["敏捷"] -= 1
                    t.sleep(0.2)
                    print("恶灵天谴:敏捷减1")
                else:
                    for i in enemyCards:
                        i["防御力"] -= 1
                    t.sleep(0.2)
                    print("恶灵天谴:防御力减1")
            if unplus_ == True:
                a = random.randint(1,3)
                if a == 1:
                    for i in enemyCards:
                        i["攻击力"] -= 2
                    t.sleep(0.2)
                    print("瘴气:攻击力减1")
                elif a == 2:
                    for i in enemyCards:
                        i["敏捷"] -= 2
                    t.sleep(0.2)
                    print("瘴气:敏捷减2")
                else:
                    for i in enemyCards:
                        i["防御力"] -= 2
                    t.sleep(0.2)
                    print("瘴气:防御力减2")
            if timepoint == 0:
                plus_1 = 0
                plus_2 = 0
                plus_3 = 0
            else:
                timepoint -= 1

        t.sleep(0.2)
        for i in playerMagics:
            if i["名称"] == "舞空术":
                i = {"名称":"舞空术","伤害":0,"类型":"法术"}
            elif i["名称"] == "冰封":
                i = {"名称":"冰封","伤害":1,"类型":"法术"}
            elif i["名称"] == "沉默":
                i = {"名称":"沉默","伤害":2,"类型":"法术"}
            elif i["名称"] == "寂静之森传送门":
                i = {"名称":"寂静之森传送门","伤害":0,"类型":"法术"}
        c = input("是否要发动法术?(如是,则输入t)")
        if c == "t":
            t.sleep(0.2)
            playerSelect = input("发动第几个法术:")
            playerC = playerMagics[int(playerSelect) - 1]
            if playerC["类型"] == "群伤":
                for i in enemyCards:
                   i["防御力"] -= playerC["伤害"]
                t.sleep(0.2)
                print(playerC["名称"],"使敌方手牌防御力减去%s"%playerC["伤害"])
                if playerC["名称"] == "神圣新星":
                    t.sleep(0.2)
                    print("神圣新星:我方加3点血量")
                    playerHP += 3
                playerMagics.remove(playerC)
                playerC = c_p
                for i in playerCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("我方的",i,"防御力低于0,现在回到了0")
                for i in enemyCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("敌方的",i,"防御力低于0,现在回到了0")
            elif playerC["类型"] == "单体":
                enemyC["防御力"] -= playerC["伤害"]
                t.sleep(0.2)
                print(playerC["名称"],"使敌方",enemyC["名称"],"防御力减去%s"%playerC["伤害"])
                playerMagics.remove(playerC)
                playerC = c_p
                for i in playerCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("我方的",i,"防御力低于0,现在回到了0")
                for i in enemyCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("敌方的",i,"防御力低于0,现在回到了0")
            elif playerC["类型"] == "连击":
                if dh == True:
                    enemyC["防御力"] -= playerC["伤害"]*2
                    t.sleep(0.2)
                    print(playerC["名称"],"触发了连击,使敌方",enemyC["名称"],"防御力减去%s"%playerC["伤害"])
                    playerMagics.remove(playerC)
                    playerC = c_p
                else:
                    enemyC["防御力"] -= playerC["伤害"]
                    t.sleep(0.2)
                    print(playerC["名称"],"使敌方",enemyC["名称"],"防御力减去%s"%playerC["伤害"])
                    playerMagics.remove(playerC)
                    playerC = c_p
                for i in playerCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("我方的",i,"防御力低于0,现在回到了0")
                for i in enemyCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("敌方的",i,"防御力低于0,现在回到了0")
            elif playerC["类型"] == "法术":
                if playerC["名称"] == "舞空术":
                    t.sleep(0.2)
                    print("舞空术会让你的一个随从可以直接攻击到敌方本体,无论它攻击距离和速度够不够")
                    a = input("你确定要让%s获得舞空术吗?(T/F)"%playerC["名称"])
                    if a == "T":
                        playerC["速度"] = 10000
                        playerC["攻击距离"] = 10000
                        playerC["buff"] = "舞空术"
                        flag_1 = True
                        playerMagics.remove(playerC)
                        playerC = c_p
                    else:
                        t.sleep(0.2)
                        print("好吧")
                elif playerC["名称"] == "沉默":
                    a = enemyC["名称"]
                    for i in cards:
                        if i["名称"] == a:
                            a = i
                            break
                    b = enemyC
                    enemyC = a
                    t.sleep(0.2)
                    print("敌方随从变为初始状态,即:",enemyC)
                    enemyC["防御力"] -= playerC["攻击力"]
                    t.sleep(0.2)
                    print("沉默:敌方防御力减2,变为%s"%enemyC["防御力"])
                    playerMagics.remove(playerC)
                    playerC = c_p
                    for i in playerCards:
                        if i ["防御力"] < 0:
                            i["防御力"] = 0
                            t.sleep(0.2)
                            print("我方的",i,"防御力低于0,现在回到了0")
                    for i in enemyCards:
                        if i ["防御力"] < 0:
                            i["防御力"] = 0
                            t.sleep(0.2)
                            print("敌方的",i,"防御力低于0,现在回到了0")
                elif playerC["名称"] == "冰封":
                    t.sleep(0.2)
                    print("冰封会让敌方出战的随从无法攻击,但可以防御")
                    t.sleep(0.2)
                    a = input("你确定要让%s受到冰封吗?(T/F)"%enemyC["名称"])
                    if a == "T":
                        enemyC["攻击力"] = 0
                        enemyC["buff"] = "冰封"
                        flag_2 = True
                        playerMagics.remove(playerC)
                        playerC = c_p
                    else:
                        t.sleep(0.2)
                        print("好吧")
                elif playerC["名称"] == "寂静之森传送门":
                    t.sleep(0.2)
                    print("寂静之森传送门开启")
                    for i in range(2):
                        a = random.randint(1,3)
                        a = totems[a-1]
                        playerCards.append(a)
                    t.sleep(0.2)
                    print("我方卡牌:")
                    for i in playerCards:
                        print(i)
                    t.sleep(0.2)
                    print("寂静之森传送门关闭")
                    playerMagics.remove(playerC)
                    playerC = c_p
            elif playerC["类型"] == "治愈":
                playerHP += playerC["伤害"]
                t.sleep(0.2)
                print(playerC["名称"],"使我方生命值加",playerC["伤害"],"现在生命值为%s"%playerHP)
                playerMagics.remove(playerC)
                playerC = c_p
        

        if playerC["敏捷"] > enemyC["敏捷"]:
            t.sleep(0.2)
            print("我方发起攻击:")
            if flag_1 == True:
                playerHurt = playerC["攻击力"]
            else:
                playerHurt = playerC["攻击力"] - enemyC["防御力"]
            if playerHurt < 0:
                playerHurt = 0
            enemyHP -= playerHurt
            if enemyHP <= 0:
                t.sleep(0.2)
                print("对决结束,敌方死亡,我方胜利")
                t.sleep(0.2)
                a = input("是否再来一局(如否,请输入“f”)")
                if a == "f":
                    exit(0)
                else:
                    break
            else:
                t.sleep(0.2)
                print("我方造成伤害:" + str(playerHurt) + "敌方剩余血量:" + str(enemyHP))
            t.sleep(0.2)
            print("敌方发起反击:")
            a = random.choice(magics)
            t.sleep(0.2)
            enemyC = a
            print("敌方放出了%s"%a)
            if enemyC["类型"] == "群伤":
                for i in playerCards:
                    i["防御力"] -= enemyC["伤害"]
                t.sleep(0.2)
                print(enemyC["名称"],"使我方手牌防御力减去%s"%enemyC["伤害"])
                if enemyC["名称"] == "神圣新星":
                    t.sleep(0.2)
                    print("神圣新星:敌方加3点血量")
                    enemyHP += 3
                enemyC = c_e
                for i in playerCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("我方的",i,"防御力低于0,现在回到了0")
                for i in enemyCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("敌方的",i,"防御力低于0,现在回到了0")
            elif enemyC["类型"] == "单体":
                playerC["防御力"] -= enemyC["伤害"]
                t.sleep(0.2)
                print(enemyC["名称"],"使我方",playerC["名称"],"防御力减去%s"%enemyC["伤害"])
                enemyC = c_e
                for i in playerCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("我方的",i,"防御力低于0,现在回到了0")
                for i in enemyCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("敌方的",i,"防御力低于0,现在回到了0")
            elif enemyC["类型"] == "连击":
                if dh1 == True:
                    playerC["防御力"] -= enemyC["伤害"]*2
                    t.sleep(0.2)
                    print(enemyC["名称"],"触发了连击,使我方",playerC["名称"],"防御力减去%s"%enemyC["伤害"])
                    enemyC = c_e
                else:
                    playerC["防御力"] -= enemyC["伤害"]
                    t.sleep(0.2)
                    print(enemyC["名称"],"使我方",playerC["名称"],"防御力减去%s"%enemyC["伤害"])
                    enemyC = c_e
                for i in playerCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("我方的",i,"防御力低于0,现在回到了0")
                for i in enemyCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("敌方的",i,"防御力低于0,现在回到了0")
            elif enemyC["类型"] == "法术":
                print("敌方没有放出法术")
                enemyC = c_e
            elif enemyC["类型"] == "治愈":
                enemyHP += enemyC["伤害"]
                t.sleep(0.2)
                print(enemyC["名称"],"使敌方生命值加",enemyC["伤害"],"现在生命值为%s"%enemyHP)
                enemyC = c_e
            if flag_2 == True:
                print("敌方已被冰封,无法攻击")
            else:
                enemyHurt = enemyC["攻击力"] - playerC["防御力"]
                if enemyHurt < 0:
                    enemyHurt = 0
                playerHP -= enemyHurt
                if playerHP <= 0:
                    t.sleep(0.2)
                    print("对决结束,我方死亡,敌方胜利")
                    t.sleep(0.2)
                    a = input("是否再来一局(如否,请输入“f”)")
                    if a == "f":
                        exit(0)
                    else:
                        break
                else:
                    t.sleep(0.2)
                    print("敌方造成伤害:" + str(enemyHurt) + "我方剩余血量:" + str(playerHP))

        elif playerC["敏捷"] < enemyC["敏捷"]:
            a = random.choice(magics)
            t.sleep(0.2)
            enemyC = a
            print("敌方放出了%s"%a)
            if enemyC["类型"] == "群伤":
                for i in playerCards:
                    i["防御力"] -= enemyC["伤害"]
                t.sleep(0.2)
                print(enemyC["名称"],"使我方手牌防御力减去%s"%enemyC["伤害"])
                if enemyC["名称"] == "神圣新星":
                    t.sleep(0.2)
                    print("神圣新星:敌方加3点血量")
                    enemyHP += 3
                enemyC = c_e
                for i in playerCards:
                        if i ["防御力"] < 0:
                            i["防御力"] = 0
                            t.sleep(0.2)
                            print("我方的",i,"防御力低于0,现在回到了0")
                for i in enemyCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("敌方的",i,"防御力低于0,现在回到了0")
            elif enemyC["类型"] == "单体":
                playerC["防御力"] -= enemyC["伤害"]
                t.sleep(0.2)
                print(enemyC["名称"],"使我方",playerC["名称"],"防御力减去%s"%enemyC["伤害"])
                enemyC = c_e
                for i in playerCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("我方的",i,"防御力低于0,现在回到了0")
                for i in enemyCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("敌方的",i,"防御力低于0,现在回到了0")
            elif enemyC["类型"] == "连击":
                if dh1 == True:
                    playerC["防御力"] -= enemyC["伤害"]*2
                    t.sleep(0.2)
                    print(enemyC["名称"],"触发了连击,使我方",playerC["名称"],"防御力减去%s"%enemyC["伤害"])
                    enemyC = c_e
                else:
                    playerC["防御力"] -= enemyC["伤害"]
                    t.sleep(0.2)
                    print(enemyC["名称"],"使我方",playerC["名称"],"防御力减去%s"%enemyC["伤害"])
                    enemyC = c_e
                for i in playerCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("我方的",i,"防御力低于0,现在回到了0")
                for i in enemyCards:
                    if i ["防御力"] < 0:
                        i["防御力"] = 0
                        t.sleep(0.2)
                        print("敌方的",i,"防御力低于0,现在回到了0")
            elif enemyC["类型"] == "法术":
                print("敌方没有放出法术")
                enemyC = c_e
            elif enemyC["类型"] == "治愈":
                enemyHP += enemyC["伤害"]
                t.sleep(0.2)
                print(enemyC["名称"],"使敌方生命值加",enemyC["伤害"],"现在生命值为%s"%enemyHP)
                enemyC = c_e
            t.sleep(0.2)
            print("敌方发起攻击:")
            enemyHurt = enemyC["攻击力"] - playerC["防御力"]
            if enemyHurt < 0:
                enemyHurt = 0
            playerHP -= enemyHurt
            if playerHP <= 0:
                t.sleep(0.2)
                print("对决结束,我方死亡,敌方胜利")
                t.sleep(0.2)
                a = input("是否再来一局(如否,请输入“f”)")
                if a == "f":
                    exit(0)
                else:
                    break
            else:
                t.sleep(0.2)
                print("敌方造成伤害:" + str(enemyHurt) + "我方剩余血量:" + str(playerHP))
            
            if playerC["攻击距离"] >= enemyC["攻击距离"]:
                t.sleep(0.2)
                for i in playerMagics:
                    if i["名称"] == "舞空术":
                        i = {"名称":"舞空术","伤害":0,"类型":"法术"}
                    elif i["名称"] == "冰封":
                        i = {"名称":"冰封","伤害":1,"类型":"法术"}
                    elif i["名称"] == "沉默":
                        i = {"名称":"沉默","伤害":2,"类型":"法术"}
                    elif i["名称"] == "寂静之森传送门":
                        i = {"名称":"寂静之森传送门","伤害":0,"类型":"法术"}
                c = input("是否要发动法术?(如是,则输入t)")
                if c == "t":
                    t.sleep(0.2)
                    playerSelect = input("发动第几个法术:")
                    playerC = playerMagics[int(playerSelect) - 1]
                    if playerC["类型"] == "群伤":
                        for i in enemyCards:
                           i["防御力"] -= playerC["伤害"]
                        t.sleep(0.2)
                        print(playerC["名称"],"使敌方手牌防御力减去%s"%playerC["伤害"])
                        if playerC["名称"] == "神圣新星":
                            t.sleep(0.2)
                            print("神圣新星:我方加3点血量")
                            playerHP += 3
                        playerMagics.remove(playerC)
                        playerC = c_p
                        for i in playerCards:
                            if i ["防御力"] < 0:
                                i["防御力"] = 0
                                t.sleep(0.2)
                                print("我方的",i,"防御力低于0,现在回到了0")
                        for i in enemyCards:
                            if i ["防御力"] < 0:
                                i["防御力"] = 0
                                t.sleep(0.2)
                                print("敌方的",i,"防御力低于0,现在回到了0")
                    elif playerC["类型"] == "单体":
                        enemyC["防御力"] -= playerC["伤害"]
                        t.sleep(0.2)
                        print(playerC["名称"],"使敌方",enemyC["名称"],"防御力减去%s"%playerC["伤害"])
                        playerMagics.remove(playerC)
                        playerC = c_p
                        for i in playerCards:
                            if i ["防御力"] < 0:
                                i["防御力"] = 0
                                t.sleep(0.2)
                                print("我方的",i,"防御力低于0,现在回到了0")
                        for i in enemyCards:
                            if i ["防御力"] < 0:
                                i["防御力"] = 0
                                t.sleep(0.2)
                                print("敌方的",i,"防御力低于0,现在回到了0")
                    elif playerC["类型"] == "连击":
                        if dh == True:
                            enemyC["防御力"] -= playerC["伤害"]*2
                            t.sleep(0.2)
                            print(playerC["名称"],"触发了连击,使敌方",enemyC["名称"],"防御力减去%s"%playerC["伤害"])
                            playerMagics.remove(playerC)
                            playerC = c_p
                        else:
                            enemyC["防御力"] -= playerC["伤害"]
                            t.sleep(0.2)
                            print(playerC["名称"],"使敌方",enemyC["名称"],"防御力减去%s"%playerC["伤害"])
                            playerMagics.remove(playerC)
                            playerC = c_p
                        for i in playerCards:
                            if i ["防御力"] < 0:
                                i["防御力"] = 0
                                t.sleep(0.2)
                                print("我方的",i,"防御力低于0,现在回到了0")
                        for i in enemyCards:
                            if i ["防御力"] < 0:
                                i["防御力"] = 0
                                t.sleep(0.2)
                                print("敌方的",i,"防御力低于0,现在回到了0")
                    elif playerC["类型"] == "法术":
                        if playerC["名称"] == "舞空术":
                            t.sleep(0.2)
                            print("舞空术会让你的一个随从可以直接攻击到敌方本体,无论它攻击距离和速度够不够")
                            a = input("你确定要让%s获得舞空术吗?(T/F)"%playerC["名称"])
                            if a == "T":
                                playerC["速度"] = 10000
                                playerC["攻击距离"] = 10000
                                playerC["buff"] = "舞空术"
                                flag_1 = True
                                playerMagics.remove(playerC)
                                playerC = c_p
                            else:
                                t.sleep(0.2)
                                print("好吧")
                        elif playerC["名称"] == "沉默":
                            a = enemyC["名称"]
                            for i in cards:
                                if i["名称"] == a:
                                    a = i
                                    break
                            b = enemyC
                            enemyC = a
                            t.sleep(0.2)
                            print("敌方随从变为初始状态,即:",enemyC)
                            enemyC["防御力"] -= playerC["攻击力"]
                            t.sleep(0.2)
                            print("沉默:敌方防御力减2,变为%s"%enemyC["防御力"])
                            playerMagics.remove(playerC)
                            playerC = c_p
                            for i in playerCards:
                                if i ["防御力"] < 0:
                                    i["防御力"] = 0
                                    t.sleep(0.2)
                                    print("我方的",i,"防御力低于0,现在回到了0")
                            for i in enemyCards:
                                if i ["防御力"] < 0:
                                    i["防御力"] = 0
                                    t.sleep(0.2)
                                    print("敌方的",i,"防御力低于0,现在回到了0")
                        elif playerC["名称"] == "冰封":
                            t.sleep(0.2)
                            print("冰封会让敌方出战的随从无法攻击,但可以防御")
                            t.sleep(0.2)
                            a = input("你确定要让%s受到冰封吗?(T/F)"%enemyC["名称"])
                            if a == "T":
                                enemyC["攻击力"] = 0
                                enemyC["buff"] = "冰封"
                                flag_2 = True
                                playerMagics.remove(playerC)
                                playerC = c_p
                            else:
                                t.sleep(0.2)
                                print("好吧")
                        elif playerC["名称"] == "寂静之森传送门":
                            t.sleep(0.2)
                            print("寂静之森传送门开启")
                            for i in range(2):
                                a = random.randint(1,3)
                                a = totems[a-1]
                                playerCards.append(a)
                            t.sleep(0.2)
                            print("我方卡牌:")
                            for i in playerCards:
                                print(i)
                            t.sleep(0.2)
                            print("寂静之森传送门关闭")
                            playerMagics.remove(playerC)
                            playerC = c_p
                    elif playerC["类型"] == "治愈":
                        playerHP += playerC["伤害"]
                        t.sleep(0.2)
                        print(playerC["名称"],"使我方生命值加",playerC["伤害"],"现在生命值为%s"%playerHP)
                        playerMagics.remove(playerC)
                        playerC = c_p
                    t.sleep(0.2)
                print("我方发起反击:")
                if flag_1 == True:
                    playerHurt = playerC["攻击力"]
                else:
                    playerHurt = playerC["攻击力"] - enemyC["防御力"]
                if playerHurt < 0:
                    playerHurt = 0
                enemyHP -= playerHurt
                if enemyHP <= 0:
                    t.sleep(0.2)
                    print("对决结束,敌方死亡,我方胜利")
                    t.sleep(0.2)
                    a = input("是否再来一局(如否,请输入“f”)")
                    if a == "f":
                        exit(0)
                    else:
                        break
                        exit(0)
                else:
                    t.sleep(0.2)
                    print("我方造成伤害:" + str(playerHurt) + "敌方剩余血量:" + str(enemyHP))

        else:
            if playerC["名称"] == "泥岩":
                t.sleep(0.2)
                print("泥岩 发动技能 巨石增援 让你获得二只 泥岩巨像")
                for i in range(2):
                    playerCards.append(card31)
                t.sleep(0.2)
                print("我方卡牌:")
                for i in playerCards:
                    print(i)
                    
                t.sleep(0.2)
                print("泥岩 发动技能 自然生长 让你手牌中的所有卡牌攻击加1、防御加2,石魔像攻击另外加2")
                for i in playerCards:
                    i["攻击力"] += 1
                    i["防御力"] += 2
                    a = i["名称"]
                    if "石魔像" in a:
                        i["攻击力"] += 2
            elif playerC["名称"] == "玛雷苟斯":
                for i in playerMagics:
                    i["伤害"] += 4
                print("玛雷苟斯 发动技能 魔力源泉 让我方法术伤害加四")
            elif playerC["名称"] == "伊瑟拉":
                magics.append(magic16)
                t.sleep(0.2)
                print("伊瑟拉 发动技能 梦境大门 每回合有几率抽到梦境之门 抽到时会让你获得一个法术、一个随从")
            elif playerC["名称"] == "诺兹多姆":
                for i in enemyCards:
                    i["敏捷"] -= 2
                    i["攻击距离"] -= 1
                    if i["敏捷"] < 0:
                        i["敏捷"] = 0
                    if  i["攻击距离"] < 1:
                         i["攻击距离"] = 1
                t.sleep(0.2)
                print("诺兹多姆 发动技能 时间漩涡 让敌方所有卡牌敏捷减2 攻击距离减1")
                unplus_n = True
            elif playerC["名称"] == "奥妮克希亚":
                for i in range(3):
                    a = card7
                    a["攻击力"] = 5
                    a["防御力"] = 4
                    a["敏捷"] = 5
                    a["攻击距离"] = 4
                    a["名称"] = "幼龙"
                    playerCards.append(a)
                playerCards.append(card18)
                t.sleep(0.2)
                print("奥妮克希亚 发动技能 幼龙增援 让你获得三只 幼龙 和一只 火山幼龙")
            elif playerC["名称"] == "火山幼龙":
                if magic12 in playerMagics:
                    t.sleep(0.2)
                    print("火山幼龙 发动技能 火焰力量 让我方法术伤害加一 并有几率让其中一个单体法术变为群伤")
                    a = False
                    for i in playerMagics:
                        a = random.randint(0,1)
                        if a == 0 and i["类型"] == "单体":
                            a = True
                            t.sleep(0.2)
                            print("火焰力量:",i,"变为群伤法术")
                            i["类型"] == "群伤"
                        t.sleep(0.2)
                        print("火焰力量:",i,"伤害加一")
                        i["伤害"] += 1
                    if a == False:
                        lst = []
                        for i in playerMagics:
                            lst.append(i["类型"])
                        if not "单体" in lst:
                            t.sleep(0.2)
                            print("你的魔法库里没有群伤法术")
                            t.sleep(0.2)
                            print("火山幼龙 怜悯了你 教会了你一个法术")
                            magic13 = {"名称":"火神力","伤害":4,"类型":"群伤"}
                            playerMagics.append(magic13)
                            t.sleep(0.2)
                            print("我方法术:")
                            for i in playerMagics:
                                t.sleep(0.2)
                                print(i)
                else:
                    t.sleep(0.2)
                    print("火山幼龙 发动技能 心灵之火 让所有手牌攻击力、防御力加一")
                    for i in playerCards:
                        i["攻击力"] += 1
                        i["防御力"] += 1
            elif playerC["名称"] == "碧蓝幼龙":
                for i in playerMagics:
                    i["伤害"] += 3
                print("碧蓝幼龙 发动技能 魔力迸发 让我方法术伤害加三")
            elif playerC["名称"] == "阿莱克斯塔萨" :
                if enemyHP >= 20:
                    enemyHP = 20
                    t.sleep(0.2)
                    print("阿莱克斯塔萨 发动技能 烈焰吐息 敌方生命变为%d"%enemyHP)
                if playerHP <= 20:
                    playerHP = 20
                    t.sleep(0.2)
                    print("阿莱克斯塔萨 发动技能 生命之火 我方生命变为%d"%playerHP)
            elif playerC["名称"] == "耐萨里奥":
                enemyHP -= 15
                t.sleep(0.2)
                print("耐萨里奥 发动技能 火球滚滚 敌方生命减15 变为%d"%enemyHP)
                if enemyHP <= 0:
                    print("对决结束,敌方死亡,我方胜利")
                    t.sleep(0.2)
                    a = input("是否再来一局(如否,请输入“f”)")
                    if a == "f":
                        exit(0)
                    else:
                        break
            elif playerC["名称"] == "冰喉":
                enemyHP -= 4
                t.sleep(0.2)
                if enemyHP <= 0:
                    print("对决结束,敌方死亡,我方胜利")
                    t.sleep(0.2)
                    a = input("是否再来一局(如否,请输入“f”)")
                    if a == "f":
                        exit(0)
                    else:
                        break
                print("冰喉 发动技能 冰刺 敌方生命减4 变为%d"%enemyHP)
            elif playerC["名称"] == "辛达苟萨":
                enemyHP -= 3
                t.sleep(0.2)
                print("辛达苟萨 发动技能 暗影弹 敌方生命减3 变为%d"%enemyHP)
            elif playerC["名称"] == "黑龙领主死亡之翼":
                enemyHP -= 15
                playerHP -= 7
                t.sleep(0.2)
                if enemyHP <= 0:
                    print("对决结束,敌方死亡,我方胜利")
                    t.sleep(0.2)
                    a = input("是否再来一局(如否,请输入“f”)")
                    if a == "f":
                        exit(0)
                    else:
                        break
                elif playerHP <= 0:
                    print("对决结束,我方死亡,敌方胜利")
                    t.sleep(0.2)
                    a = input("是否再来一局(如否,请输入“f”)")
                    if a == "f":
                        exit(0)
                    else:
                        break
                print("黑龙领主死亡之翼 发动技能 死亡之熔岩 敌方生命减15 我方生命减7 分别变为",enemyHP,playerHP)
            elif playerC["名称"] == "龙人打击者":
                a = random.randint(0,1)
                if a == 1:
                    t.sleep(0.2)
                    print("打到了!")
                    enemyHP -= 2
                    t.sleep(0.2)
                    print("龙人打击者 发动技能 增强拳 敌方生命减2 变为%d"%enemyHP)
                    if enemyHP <= 0:
                        print("对决结束,敌方死亡,我方胜利")
                        t.sleep(0.2)
                        a = input("是否再来一局(如否,请输入“f”)")
                        if a == "f":
                            exit(0)
                        else:
                            break
                else:
                    t.sleep(0.2)
                    print("没打到")
            elif playerC["名称"] == "龙王配偶":
                plus_1 += 1
                plus_2 += 1
                plus_3 += 1
                t.sleep(0.2)
                print("龙王配偶 发动技能 战舞 激活1、2、3号特殊加成,每回合给全体手牌攻击力、防御力、敏捷加1,持续3回合")
                timepoint += 3
            elif playerC["名称"] == "梦魇之龙":
                playerC["攻击力"] += rounds
                t.sleep(0.2)
                print("梦魇之龙 发动技能 自我增强 加回合数攻击力 现在攻击力为%d"%playerC["攻击力"])
            elif playerC["名称"] == "暮光守护者":
                t.sleep(0.2)
                print("暮光守护者 发动技能 守护气场 激活1号特殊加成,每回合给全体手牌敏捷加1,持续2回合")
                timepoint += 2
                plus_1 += 1
            elif playerC["名称"] == "雏龙":
                plus_2 += 1
                t.sleep(0.2)
                print("雏龙 发动技能 卖萌 激活2号特殊加成,每回合给全体手牌攻击力加1,持续2回合")
                timepoint += 2
            elif playerC["名称"] == "午夜噩龙":
                unplus == True
                t.sleep(0.2)
                print(" 午夜噩龙 发动技能 恶灵天谴 每回合让对手手牌攻击力、防御力、敏捷随机减一")
            elif playerC["名称"] == "尤格 萨隆":
                if rounds >= 5:
                    a = random.randint(1,6)
                    if a == 1:
                        for i in enemyCards:
                            i["buff"] = "混沌的诅咒"
                            t.sleep(0.2)
                            print("尤格 萨隆 发动技能 黏糊臭泥 给全体敌人加buff:混沌的诅咒")
                    elif a == 2:
                        for i in playerCards:
                            i["buff"] = "泰坦的恩赐"
                            t.sleep(0.2)
                        print("尤格 萨隆 发动技能 养生热泥 给全体队友加buff:泰坦的恩赐")
                    elif a == 6:
                        unplus_ = True
                        t.sleep(0.2)
                        print("尤格 萨隆 发动技能 瘴气 每回合让对手手牌攻击力、防御力、敏捷随机减二")
                    else:
                        enemyHP -= round(a*1.5)
                        t.sleep(0.2)
                        print("尤格 萨隆 发动技能 湿沼泥弹 让对手血量减少%d"%round(a*1.5))
                        if enemyHP <= 0:
                            print("对决结束,敌方死亡,我方胜利")
                            t.sleep(0.2)
                            a = input("是否再来一局(如否,请输入“f”)")
                            if a == "f":
                                exit(0)
                            else:
                                break
                    print("尤格 萨隆蓄力未完成,无法发动技能")
            elif playerC["名称"] == "克苏恩":
                t.sleep(0.2)
                print("克苏恩 发动技能 千眼之劫")
                enemyC["防御力"] -= 12
                if enemyC["防御力"] < 0:
                    t.sleep(0.2)
                    print("破碎之劫:敌方防御力被消耗殆尽")
                    a = 12 + enemyC["防御力"]
                    enemyC["防御力"] = 0
                    enemyHP -= a
                    t.sleep(0.2)
                    print("破碎之劫:敌方生命值变为%d"%enemyHP)
                    if enemyHP <= 0:
                        print("对决结束,敌方死亡,我方胜利")
                        t.sleep(0.2)
                        a = input("是否再来一局(如否,请输入“f”)")
                        if a == "f":
                            exit(0)
                        else:
                            break
                else:
                    t.sleep(0.2)
                    print("破碎之劫:敌方防御力剩下%d"%enemyC["防御力"])
            elif playerC["名称"] == "恩佐斯":
                enemyHP -= 3
                playerHP -= 5
                for i in enemyCards:
                    i["buff"] = "混沌的诅咒"
                t.sleep(0.2)
                print("恩佐斯 发动技能 千须之难")
                t.sleep(0.2)
                print("千须之难:敌方生命减3 我方生命减5 分别变为",enemyHP,playerHP)
                t.sleep(0.2)
                if enemyHP <= 0:
                    print("对决结束,敌方死亡,我方胜利")
                    t.sleep(0.2)
                    a = input("是否再来一局(如否,请输入“f”)")
                    if a == "f":
                        exit(0)
                    else:
                        break
                elif playerHP <= 0:
                    print("对决结束,我方死亡,敌方胜利")
                    t.sleep(0.2)
                    a = input("是否再来一局(如否,请输入“f”)")
                    if a == "f":
                        exit(0)
                    else:
                        break
                print("千须之难:每回合让对手手牌攻击力、防御力、敏捷随机减一")
                print("千须之难:每回合让对手手牌攻击力、防御力、敏捷再次随机减二")
                unplus_ = True
                unplus = True
            elif playerC["名称"] == "亚煞极":
                a = random.randint(0,len(cards) - 1)
                t.sleep(0.2)
                print("亚煞极 发动技能 黑羊傀儡")
                b = cards[a]
                b["名称"] = "黑羊傀儡"
                b["buff"] = "泰坦的恩赐"
                b["防御力"] += 2
                b["敏捷"] += 2
                playerCards.append(b)
                t.sleep(0.2)
                print("黑羊傀儡 数值面板为",b)
                a = random.randint(1,3)
                enemyHP -= a
                t.sleep(0.2)
                print("亚煞极 发动技能 黑色吐息 敌方生命值变为%d"%enemyHP)
                if enemyHP <= 0:
                    print("对决结束,敌方死亡,我方胜利")
                    t.sleep(0.2)
                    a = input("是否再来一局(如否,请输入“f”)")
                    if a == "f":
                        exit(0)
                    else:
                        break

                
            t.sleep(0.2)
            for i in playerMagics:
                if i["名称"] == "舞空术":
                    i = {"名称":"舞空术","伤害":0,"类型":"法术"}
                elif i["名称"] == "冰封":
                    i = {"名称":"冰封","伤害":1,"类型":"法术"}
                elif i["名称"] == "沉默":
                    i = {"名称":"沉默","伤害":2,"类型":"法术"}
                elif i["名称"] == "寂静之森传送门":
                    i = {"名称":"寂静之森传送门","伤害":0,"类型":"法术"}
            c = input("是否要发动法术?(如是,则输入t)")
            if c == "t":
                t.sleep(0.2)
                playerSelect = input("发动第几个法术:")
                playerC = playerMagics[int(playerSelect) - 1]
                if playerC["类型"] == "群伤":
                    for i in enemyCards:
                       i["防御力"] -= playerC["伤害"]
                    t.sleep(0.2)
                    print(playerC["名称"],"使敌方手牌防御力减去%s"%playerC["伤害"])
                    if playerC["名称"] == "神圣新星":
                        t.sleep(0.2)
                        print("神圣新星:我方加3点血量")
                        playerHP += 3
                        playerMagics.remove(playerC)
                        playerC = c_p
                    for i in playerCards:
                        if i ["防御力"] < 0:
                            i["防御力"] = 0
                            t.sleep(0.2)
                            print("我方的",i,"防御力低于0,现在回到了0")
                    for i in enemyCards:
                        if i ["防御力"] < 0:
                            i["防御力"] = 0
                            t.sleep(0.2)
                            print("敌方的",i,"防御力低于0,现在回到了0")
                elif playerC["类型"] == "单体":
                    enemyC["防御力"] -= playerC["伤害"]
                    t.sleep(0.2)
                    print(playerC["名称"],"使敌方",enemyC["名称"],"防御力减去%s"%playerC["伤害"])
                    playerMagics.remove(playerC)
                    playerC = c_p
                    for i in playerCards:
                        if i ["防御力"] < 0:
                            i["防御力"] = 0
                            t.sleep(0.2)
                            print("我方的",i,"防御力低于0,现在回到了0")
                    for i in enemyCards:
                        if i ["防御力"] < 0:
                            i["防御力"] = 0
                            t.sleep(0.2)
                            print("敌方的",i,"防御力低于0,现在回到了0")
                elif playerC["类型"] == "连击":
                    if dh == True:
                        enemyC["防御力"] -= playerC["伤害"]*2
                        t.sleep(0.2)
                        print(playerC["名称"],"触发了连击,使敌方",enemyC["名称"],"防御力减去%s"%playerC["伤害"])
                        playerMagics.remove(playerC)
                        playerC = playerCards[int(playerSelect) - 2]
                    else:
                        enemyC["防御力"] -= playerC["伤害"]
                        t.sleep(0.2)
                        print(playerC["名称"],"使敌方",enemyC["名称"],"防御力减去%s"%playerC["伤害"])
                        playerMagics.remove(playerC)
                        playerC = c_p
                    for i in playerCards:
                        if i ["防御力"] < 0:
                            i["防御力"] = 0
                            t.sleep(0.2)
                            print("我方的",i,"防御力低于0,现在回到了0")
                    for i in enemyCards:
                        if i ["防御力"] < 0:
                            i["防御力"] = 0
                            t.sleep(0.2)
                            print("敌方的",i,"防御力低于0,现在回到了0")
                elif playerC["类型"] == "法术":
                    if playerC["名称"] == "舞空术":
                        t.sleep(0.2)
                        print("舞空术会让你的一个随从可以直接攻击到敌方本体,无论它攻击距离和速度够不够")
                        a = input("你确定要让%s获得舞空术吗?(T/F)"%playerC["名称"])
                        if a == "T":
                            playerC["速度"] = 10000
                            playerC["攻击距离"] = 10000
                            playerC["buff"] = "舞空术"
                            flag_1 = True
                            playerMagics.remove(playerC)
                            playerC = c_p
                        else:
                            t.sleep(0.2)
                            print("好吧")
                    elif playerC["名称"] == "沉默":
                        a = enemyC["名称"]
                        for i in cards:
                            if i["名称"] == a:
                                a = i
                                break
                        b = enemyC
                        enemyC = a
                        if a == b:
                            t.sleep(0.2)
                            print("法术空放了")
                        else:
                            t.sleep(0.2)
                            print("敌方随从变为初始状态,即:",enemyC)
                        enemyC["防御力"] -= playerC["攻击力"]
                        t.sleep(0.2)
                        print("沉默:敌方防御力减2,变为%s"%enemyC["防御力"])
                        playerMagics.remove(playerC)
                        playerC = c_p
                        for i in playerCards:
                            if i ["防御力"] < 0:
                                i["防御力"] = 0
                                t.sleep(0.2)
                                print("我方的",i,"防御力低于0,现在回到了0")
                        for i in enemyCards:
                            if i ["防御力"] < 0:
                                i["防御力"] = 0
                                t.sleep(0.2)
                                print("敌方的",i,"防御力低于0,现在回到了0")
                    elif playerC["名称"] == "冰封":
                        t.sleep(0.2)
                        print("冰封会让敌方出战的随从无法攻击,但可以防御")
                        t.sleep(0.2)
                        a = input("你确定要让%s受到冰封吗?(T/F)"%enemyC["名称"])
                        if a == "T":
                            enemyC["攻击力"] = 0
                            enemyC["buff"] = "冰封"
                            flag_2 = True
                            playerMagics.remove(playerC)
                            playerC = c_p
                        else:
                            t.sleep(0.2)
                            print("好吧")
                    elif playerC["名称"] == "寂静之森传送门":
                        t.sleep(0.2)
                        print("寂静之森传送门开启")
                        for i in range(2):
                            a = random.randint(1,3)
                            a = totems[a-1]
                            playerCards.append(a)
                        t.sleep(0.2)
                        print("我方卡牌:")
                        for i in playerCards:
                            print(i)
                        t.sleep(0.2)
                        print("寂静之森传送门关闭")
                        playerMagics.remove(playerC)
                        playerC = c_p
                elif playerC["类型"] == "治愈":
                    playerHP += playerC["伤害"]
                    t.sleep(0.2)
                    print(playerC["名称"],"使我方生命值加",playerC["伤害"],"现在生命值为%s"%playerHP)
                    playerMagics.remove(playerC)
                    playerC = c_p
            
            t.sleep(0.2)
            print("我方发起攻击:")
            if flag_1 == True:
                playerHurt = playerC["攻击力"]
            else:
                playerHurt = playerC["攻击力"] - enemyC["防御力"]
            if playerHurt < 0:
                playerHurt = 0
            enemyHP -= playerHurt
            if enemyHP <= 0:
                t.sleep(0.2)
                print("对决结束,敌方死亡,我方胜利")
                t.sleep(0.2)
                a = input("是否再来一局(如否,请输入“f”)")
                if a == "f":
                    exit(0)
                else:
                    break
                        
                t.sleep(0.2)
                print("我方造成伤害:" + str(playerHurt) + "敌方剩余血量:" + str(enemyHP))
            if enemyC["攻击距离"] >= playerC["攻击距离"]:
                a = random.choice(magics)
                t.sleep(0.2)
                enemyC = a
                print("敌方放出了%s"%a)
                if enemyC["类型"] == "群伤":
                    for i in playerCards:
                        i["防御力"] -= enemyC["伤害"]
                    t.sleep(0.2)
                    print(enemyC["名称"],"使我方手牌防御力减去%s"%enemyC["伤害"])
                    if enemyC["名称"] == "神圣新星":
                        t.sleep(0.2)
                        print("神圣新星:敌方加3点血量")
                        enemyHP += 3
                    enemyC = c_e
                    for i in playerCards:
                        if i ["防御力"] < 0:
                            i["防御力"] = 0
                            t.sleep(0.2)
                            print("我方的",i,"防御力低于0,现在回到了0")
                    for i in enemyCards:
                        if i ["防御力"] < 0:
                            i["防御力"] = 0
                            t.sleep(0.2)
                            print("敌方的",i,"防御力低于0,现在回到了0")
                elif enemyC["类型"] == "单体":
                    playerC["防御力"] -= enemyC["伤害"]
                    t.sleep(0.2)
                    print(enemyC["名称"],"使我方",playerC["名称"],"防御力减去%s"%enemyC["伤害"])
                    enemyC = c_e
                    for i in playerCards:
                        if i ["防御力"] < 0:
                            i["防御力"] = 0
                            t.sleep(0.2)
                            print("我方的",i,"防御力低于0,现在回到了0")
                    for i in enemyCards:
                        if i ["防御力"] < 0:
                            i["防御力"] = 0
                            t.sleep(0.2)
                            print("敌方的",i,"防御力低于0,现在回到了0")
                elif enemyC["类型"] == "连击":
                    if dh1 == True:
                        playerC["防御力"] -= enemyC["伤害"]*2
                        t.sleep(0.2)
                        print(enemyC["名称"],"触发了连击,使我方",playerC["名称"],"防御力减去%s"%enemyC["伤害"])
                        enemyC = c_e
                    else:
                        enemy["防御力"] -= playerC["伤害"]
                        t.sleep(0.2)
                        print(enemyC["名称"],"使我方",playerC["名称"],"防御力减去%s"%enemyC["伤害"])
                        enemyC = c_e
                    for i in playerCards:
                        if i ["防御力"] < 0:
                            i["防御力"] = 0
                            t.sleep(0.2)
                            print("我方的",i,"防御力低于0,现在回到了0")
                    for i in enemyCards:
                        if i ["防御力"] < 0:
                            i["防御力"] = 0
                            t.sleep(0.2)
                            print("敌方的",i,"防御力低于0,现在回到了0")
                elif enemyC["类型"] == "法术":
                    print("敌方没有放出法术")
                    enemyC = c_e
                elif enemyC["类型"] == "治愈":
                    enemyHP += enemyC["伤害"]
                    t.sleep(0.2)
                    print(enemyC["名称"],"使敌方生命值加",enemyC["伤害"],"现在生命值为%s"%enemyHP)
                    enemyC = c_e
                t.sleep(0.2)
                print("敌方发起反击:")
                if flag_2 == True:
                    print("敌方已被冰封,无法攻击")
                else:
                    enemyHurt = enemyC["攻击力"] - playerC["防御力"]
                    if enemyHurt < 0:
                        enemyHurt = 0
                    playerHP -= enemyHurt
                    if playerHP <= 0:
                        t.sleep(0.2)
                        print("对决结束,我方死亡,敌方胜利")
                        t.sleep(0.2)
                        a = input("是否再来一局(如否,请输入“f”)")
                        if a == "f":
                            exit(0)
                        else:
                            break
                            
                    else:
                        t.sleep(0.2)
                        print("敌方造成伤害:" + str(enemyHurt) + "我方剩余血量:" + str(playerHP))

        playerC = c_p
        enemyC = c_e
        a = random.randint(0,len(cards) - 1)
        playerCards.append(cards[a])
        b = random.randint(0,len(cards) - 1)
        enemyCards.append(cards[b])
        playerCards.remove(playerC)
        enemyCards.remove(enemyC)
        a = random.randint(0,len(magics) - 1)
        a1 = magics[a]
        if a1["名称"] == "梦境之门":
            q = random.choice(cards)
            q1 = random.choice(magics)
            t.sleep(0.2)
            print("梦境之门启动 - 获得",q,q1)
            playerMagics.append(cards[q])
            playerMagics.append(magics[q1])
        else:
            playerMagics.append(magics[a])
        

        spring = random.randint(1,100)
        if spring <= 30:
            t.sleep(0.2)
            print("魔法泉发动")
            magic = random.randint(1,100)
            if magic <= 30:
                t.sleep(0.2)
                print("攻击力低于4的手牌获得 泰坦的恩赐")
                for i in playerCards:
                    if i["攻击力"] < 4:
                        i["buff"] = "泰坦的恩赐"
                for i in enemyCards:
                    if i["攻击力"] < 4:
                        i["buff"] = "泰坦的恩赐"
            elif magic > 30 and magic <= 60:
                t.sleep(0.2)
                print("防御力高于6的手牌受到 混沌的诅咒")
                for i in playerCards:
                    if i["防御力"] > 6:
                        i["buff"] = "混沌的诅咒"
                for i in enemyCards:
                    if i["防御力"] > 6:
                        i["buff"] = "混沌的诅咒"
            elif magic > 60 and magic <= 90:
                a = random.randint(1,2)
                if a == 1:
                    t.sleep(0.2)
                    print("魔法泉喷发出了 冰雨")
                    
                    t.sleep(0.2)
                    print("让所有手牌敏捷减2")
                    for i in playerCards:
                        i["敏捷"] -= 2
                        if i["敏捷"] < 0:
                            i["敏捷"] = 0
                    for i in enemyCards:
                        i["敏捷"] -= 2
                        if i["敏捷"] < 0:
                            i["敏捷"] = 0
                    for i in playerCards:
                        if i ["敏捷"] < 0:
                            t.sleep(0.2)
                            print("我方的",i,"敏捷低于0,现在回到了0")
                    for i in enemyCards:
                        if i ["敏捷"] < 0:
                            t.sleep(0.2)
                            print("敌方的",i,"敏捷低于0,现在回到了0")
                else:
                    t.sleep(0.2)
                    print("魔法泉喷发出了 甜美气息")
                    t.sleep(0.2)
                    print("让所有手牌敏捷加2")
                    for i in playerCards:
                        i["敏捷"] += 2
                    for i in enemyCards:
                        i["敏捷"] += 2
            else:
                t.sleep(0.2)
                print("魔法泉的泉水变紫了,比平常更加充满魔力")
                t.sleep(0.2)
                print("你有了三个法术")
                for i in range(3):
                    a = random.randint(0,len(magics) - 1)
                    playerMagics.append(magics[a])
                t.sleep(0.2)
                print("我方法术:")
                for i in playerMagics:
                    print(i)
                
                
                
        else:
            t.sleep(0.2)
            print("魔法泉很安静")

        for i in cards:
            if "buff" in i:
                if i["buff"] == "泰坦的恩赐":
                    i["攻击力"] += 1
                    if i ["攻击力"] > 20:
                        i["攻击力"] = 20
                elif i["buff"] == "混沌的诅咒":
                    i["防御力"] -= 1
                    if i ["防御力"] < 2:
                        i["防御力"] = 2
        if playerHP > 40:
            t.sleep(0.2)
            print("你的血量超标了,现在回到了40")
            playerHP = 40
        if enemyHP > 40:
            t.sleep(0.2)
            print("敌方的血量超标了,现在回到了40")
            enemyHP = 40
        if unplus_n == True:
            for i in enemyCards:
                i["敏捷"] -= 2
                i["攻击距离"] -= 1
                if i["敏捷"] < 0:
                    i["敏捷"] = 0
                if  i["攻击距离"] < 1:
                     i["攻击距离"] = 1
            t.sleep(0.2)
            print("时间漩涡:敌方所有卡牌敏捷减2 攻击距离减1")
        for i in playerCards:
            if i ["防御力"] < 0:
                t.sleep(0.2)
                print("我方的",i,"防御力低于0,现在回到了0")
                i ["防御力"]  = 0
            if i ["敏捷"] < 0:
                t.sleep(0.2)
                print("我方的",i,"敏捷低于0,现在回到了0")
                i ["敏捷"] = 0
            if i ["攻击距离"] < 1:
                t.sleep(0.2)
                print("我方的",i,"攻击距离低于0,现在回到了0")
                i ["攻击距离"] = 1
        for i in enemyCards:
            if i ["防御力"] < 0:
                t.sleep(0.2)
                print("敌方的",i,"防御力低于0,现在回到了0")
                i ["防御力"]  = 0
            if i ["敏捷"] < 0:
                t.sleep(0.2)
                print("敌方的",i,"敏捷低于0,现在回到了0")
                i ["敏捷"] = 0
            if i ["攻击距离"] < 1:
                t.sleep(0.2)
                print("敌方的",i,"攻击距离低于0,现在回到了0")
                i ["攻击距离"] = 1
        for i in playerMagics:
            if i["名称"] == "舞空术":
                i = {"名称":"舞空术","伤害":0,"类型":"法术"}
            elif i["名称"] == "冰封":
                i = {"名称":"冰封","伤害":1,"类型":"法术"}
            elif i["名称"] == "沉默":
                i = {"名称":"沉默","伤害":2,"类型":"法术"}
            elif i["名称"] == "寂静之森传送门":
                i = {"名称":"寂静之森传送门","伤害":0,"类型":"法术"}
                      
        t.sleep(0.2)
        
        print("第%d回合结束"%rounds)


点击全文阅读


本文链接:http://m.zhangshiyu.com/post/31661.html

防御力  名称  敌方  
<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1