main.floors.MT1=
{
    "floorId": "MT1",
    "title": "魔塔 第01层",
    "name": "第 1 层",
    "width": 13,
    "height": 13,
    "map": [
    [  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1],
    [  1, 87,  0,201,202,201,  0,  0,  0,  0,  0,  0,  1],
    [  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  1],
    [  1, 31,  0,  0, 81,  0,  1, 27, 21,  0,  1,  0,  1],
    [  1,  0,209,  0,  1,  0,  1, 28, 31,  0,  1,  0,  1],
    [  1,  1, 81,  1,  1,  0,  1,  1,  1, 81,  1,  0,  1],
    [  1, 21,  0,  0,  1,  0, 81,205,217,205,  1,  0,  1],
    [  1,  0,210,  0,  1,  0,  1,  1,  1,  1,  1,  0,  1],
    [  1,  1, 81,  1,  1,  0,  0,  0,  0,  0,  0,  0,  1],
    [  1,  0,  0,  0,  1,  1, 86,  1,  1,  1, 81,  1,  1],
    [  1, 31,  0, 21,  1, 25, 73,127,  1,  0,205,  0,  1],
    [  1, 31,  0, 21,  1, 46,  0, 45,  1,201, 32,201,  1],
    [  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1]
],
    "canFlyTo": true,
    "canFlyFrom": true,
    "canUseQuickShop": true,
    "images": [],
    "ratio": 1,
    "defaultGround": "ground",
    "bgm": "section1.mp3",
    "firstArrive": [
        {
            "type": "tip",
            "text": "游戏已重启"
        },
        {
            "type": "loadBgm",
            "name": "Ending.mp3"
        },
        {
            "type": "loadBgm",
            "name": "SkeletonA.mp3"
        },
        {
            "type": "loadBgm",
            "name": "Vampire.mp3"
        },
        {
            "type": "loadBgm",
            "name": "GreatMagicMaster.mp3"
        },
        {
            "type": "loadBgm",
            "name": "Knight.mp3"
        },
        {
            "type": "loadBgm",
            "name": "Zeno.mp3"
        },
        {
            "type": "setValue",
            "name": "flag:调试模式",
            "value": "false"
        },
        {
            "type": "setValue",
            "name": "flag:小游戏开关",
            "value": "false"
        },
        {
            "type": "setValue",
            "name": "flag:道具存档",
            "value": "true"
        },
        {
            "type": "choices",
            "text": "\t[作者,oldMan]选择模式",
            "choices": [
                {
                    "text": "原版",
                    "action": [
                        {
                            "type": "setValue",
                            "name": "flag:模式",
                            "value": "0"
                        }
                    ]
                },
                {
                    "text": "剑盾互换",
                    "action": [
                        {
                            "type": "function",
                            "function": "function(){\n/**\n * @name swapSwordAndShield\n * @description 搜索当前地图所有ID以 \"sword\" 和 \"shield\" 开头的物品图块，并互相交换其前缀。\n * 例如, \"sword1\" 会变成 \"shield1\", \"shield_wood\" 会变成 \"sword_wood\"。\n * 你可以在事件编辑器中使用\"执行脚本\"指令来调用这个函数： swapSwordAndShield();\n */\nfunction swapSwordAndShield() {\n\tfor (let floorId of core.floorIds) {\n\t\t// 检查是否成功获取到floorId\n\t\tif (!floorId) {\n\t\t\tconsole.error(\"无法确定当前楼层ID。\");\n\t\t\tcore.drawTip('无法确定当前楼层ID', 'error');\n\t\t\treturn;\n\t\t}\n\n\t\t// 1. 搜索所有以 \"sword\" 开头的物品图块\n\t\tconst swords = core.searchBlockWithFilter(\n\t\t\t(block) => {\n\t\t\t\t// 检查是否为物品，并且ID以\"sword\"开头\n\t\t\t\treturn block.event.cls === 'items' && block.event.id.startsWith('sword');\n\t\t\t},\n\t\t\tfloorId\n\t\t);\n\n\t\t// 2. 搜索所有以 \"shield\" 开头的物品图块\n\t\tconst shields = core.searchBlockWithFilter(\n\t\t\t(block) => {\n\t\t\t\t// 检查是否为物品，并且ID以\"shield\"开头\n\t\t\t\treturn block.event.cls === 'items' && block.event.id.startsWith('shield');\n\t\t\t},\n\t\t\tfloorId\n\t\t);\n\n\t\t// 在控制台输出查找到的数量，方便调试\n\t\tconsole.log(`在楼层 ${floorId} 找到了 ${swords.length} 个剑类物品和 ${shields.length} 个盾类物品。`);\n\n\t\t// 3. 替换操作：将剑替换为盾\n\t\tswords.forEach(blockInfo => {\n\t\t\tconst oldId = blockInfo.block.event.id;\n\t\t\t// 使用正则表达式替换前缀，确保只替换开头的 \"sword\"\n\t\t\tconst newId = oldId.replace(/^sword/, 'shield');\n\t\t\tconsole.log(`正在将 (${blockInfo.x}, ${blockInfo.y}) 的 ${oldId} 替换为 ${newId}`);\n\t\t\t// 在原位置设置新图块\n\t\t\tcore.setBlock(newId, blockInfo.x, blockInfo.y, floorId);\n\t\t});\n\n\t\t// 4. 替换操作：将盾替换为剑\n\t\tshields.forEach(blockInfo => {\n\t\t\tconst oldId = blockInfo.block.event.id;\n\t\t\t// 替换前缀\n\t\t\tconst newId = oldId.replace(/^shield/, 'sword');\n\t\t\tconsole.log(`正在将 (${blockInfo.x}, ${blockInfo.y}) 的 ${oldId} 替换为 ${newId}`);\n\t\t\t// 在原位置设置新图块\n\t\t\tcore.setBlock(newId, blockInfo.x, blockInfo.y, floorId);\n\t\t});\n\t}\n\n\tcore.drawTip('剑与盾已成功互换！', 'tools');\n\tconsole.log(\"物品图块替换完成！\");\n}\n\n// 调用函数\nswapSwordAndShield();\n}"
                        },
                        {
                            "type": "setValue",
                            "name": "flag:模式",
                            "value": "1"
                        }
                    ]
                },
                {
                    "text": "红蓝宝石互换",
                    "action": [
                        {
                            "type": "function",
                            "function": "function(){\nfunction swapRedAndBlueGems() {\n\tfor (let floorId of core.floorIds) {\n\n\t\tif (!floorId) {\n\t\t\tconsole.error(\"无法确定当前楼层ID。\");\n\t\t\tcore.drawTip('无法确定当前楼层ID', 'error');\n\t\t\treturn;\n\t\t}\n\n\t\tconst redGems = core.searchBlock('redGem', floorId);\n\t\tconst blueGems = core.searchBlock('blueGem', floorId);\n\n\n\t\tredGems.forEach(blockInfo => {\n\t\t\tcore.setBlock('blueGem', blockInfo.x, blockInfo.y, floorId);\n\t\t});\n\n\t\tblueGems.forEach(blockInfo => {\n\t\t\tcore.setBlock('redGem', blockInfo.x, blockInfo.y, floorId);\n\t\t});\n\n\t\tconsole.log(\"红蓝宝石替换完成！\");\n\t}\n}\nswapRedAndBlueGems()\n}"
                        },
                        {
                            "type": "setValue",
                            "name": "flag:模式",
                            "value": "2"
                        }
                    ]
                },
                {
                    "text": "钥匙血瓶互换（简单）",
                    "action": [
                        {
                            "type": "function",
                            "function": "function(){\nfunction swapPotionsAndKeys() {\n\tfor (let floorId of core.floorIds) {\n\t\tif (!floorId) {\n\t\t\tconsole.error(\"无法确定当前楼层ID。\");\n\t\t\tcore.drawTip('无法确定当前楼层ID', 'error');\n\t\t\treturn;\n\t\t}\n\n\t\t// 为防止替换冲突，先搜索并记录所有图块的位置\n\t\tconst redPotions = core.searchBlock('redPotion', floorId);\n\t\tconst yellowKeys = core.searchBlock('yellowKey', floorId);\n\t\tconst bluePotions = core.searchBlock('bluePotion', floorId);\n\t\tconst blueKeys = core.searchBlock('blueKey', floorId);\n\n\n\t\t// 执行替换\n\t\tredPotions.forEach(blockInfo => {\n\t\t\tcore.setBlock('yellowKey', blockInfo.x, blockInfo.y, floorId);\n\t\t});\n\t\tyellowKeys.forEach(blockInfo => {\n\t\t\tcore.setBlock('redPotion', blockInfo.x, blockInfo.y, floorId);\n\t\t});\n\t\tbluePotions.forEach(blockInfo => {\n\t\t\tcore.setBlock('blueKey', blockInfo.x, blockInfo.y, floorId);\n\t\t});\n\t\tblueKeys.forEach(blockInfo => {\n\t\t\tcore.setBlock('bluePotion', blockInfo.x, blockInfo.y, floorId);\n\t\t});\n\t}\n}\nswapPotionsAndKeys();\n}"
                        },
                        {
                            "type": "setValue",
                            "name": "item:I332",
                            "operator": "+=",
                            "value": "1"
                        },
                        {
                            "type": "setValue",
                            "name": "flag:模式",
                            "value": "3"
                        },
                        "\t[作者,oldMan]给你一个新人，帮你互换钥匙！"
                    ]
                }
            ]
        }
    ],
    "eachArrive": [],
    "parallelDo": "",
    "events": {
        "7,10": [
            "\t[作者,oldMan]每个区域1到9层楼层都翻转了！",
            "\t[hero]我看这里也没变化啊？",
            "\t[作者,oldMan]一区前三层是没变化的，原因你自己也知道",
            "\t[hero]嗯……",
            "\t[作者,oldMan]说起来，这个塔本来想加点剧情的，但是越想越不适合这个塔",
            "\t[作者,oldMan]所以转而多加了几个新模式",
            "\t[作者,oldMan]当然，由于只是改变了地图，所以这个机制的兼容性很高，所以……说不定以后还会更新？",
            "\t[作者,oldMan]如果你有哪个想加入的mod机制的话，也欢迎联系作者！"
        ]
    },
    "changeFloor": {
        "1,1": {
            "floorId": ":next",
            "stair": "downFloor",
            "time": 0
        }
    },
    "afterBattle": {},
    "afterGetItem": {},
    "afterOpenDoor": {
        "6,9": [
            "修改较多，放在样板简介里面了！就是工具栏那个长得像卷轴一样的东西"
        ]
    },
    "cannotMove": {},
    "bgmap": [
    [ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17],
    [ 17,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17],
    [ 17,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17],
    [ 17,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17],
    [ 17,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17],
    [ 17,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17],
    [ 17,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17],
    [ 17,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17],
    [ 17,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17],
    [ 17,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17],
    [ 17,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17],
    [ 17,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17],
    [ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17]
],
    "fgmap": [

],
    "upFloor": [
        2,
        1
    ],
    "downFloor": [
        6,
        11
    ],
    "autoEvent": {},
    "beforeBattle": {},
    "cannotMoveIn": {}
}