main.floors.MT3=
{
    "floorId": "MT3",
    "title": "魔塔 第03层",
    "name": "第 3 层",
    "width": 13,
    "height": 13,
    "map": [
    [  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1],
    [  1, 21, 28,  1, 21, 32, 21,  1,  0,  1,  0, 31,  1],
    [  1,  0, 31,  1, 32, 21, 32,  1,  0, 81,205,  0,  1],
    [  1,217,  0,  1, 21, 22, 21,  1,  0,  1,  1,  1,  1],
    [  1, 81,  1,  1,  1,  0,  1,  1,  0,  1,  0,182,  1],
    [  1,  0,  0,205,  0,  0,  0,201,  0,  0,  0,  0,  1],
    [  1, 81,  1,  1,  0,  0,  0,  1,  0,  1,  1,  1,  1],
    [  1,209,  0,  1,  1,321,  1,  1,  0,  1,  0, 31,  1],
    [  1,  0, 21,  1,  0,  0,  0,  1,  0, 81,217, 21,  1],
    [  1, 31, 27,  1,  0,  0,  0,  1,  0,  1,  1,  1,  1],
    [  1,  1,  1,  1,  1,  0,  1,  1,202,  1,  0,  0,  1],
    [  1, 88,  0,  0,  0,  0,129,  1,  0, 81,  0, 87,  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": [],
    "eachArrive": [],
    "parallelDo": "",
    "events": {
        "5,9": [
            {
                "type": "setValue",
                "name": "flag:03",
                "value": "1"
            },
            {
                "type": "playSound",
                "name": "3F.mp3"
            },
            {
                "type": "setBlock",
                "number": "red",
                "loc": [
                    [
                        5,
                        7
                    ]
                ],
                "time": 500
            },
            {
                "type": "function",
                "function": "function(){ core.plugin.insertBlockDialog(5, 7, null, '欢迎来到魔塔，你是第一百位挑战者。你若能打败我所有的手下，我就与你一对一的决斗。现在你必须接受我的安排。'); }"
            },
            {
                "type": "setBlock",
                "number": "blue",
                "loc": [
                    [
                        5,
                        8
                    ],
                    [
                        4,
                        9
                    ],
                    [
                        6,
                        9
                    ],
                    [
                        5,
                        10
                    ]
                ],
                "time": 500
            },
            "\t[hero]什么？",
            {
                "type": "function",
                "function": "function(){\n// 四方向相对于格子中心的原始“图心”偏移（单位：像素）\nconst groupOffsets = {\n\tup: { x: 0, y: -8 },\n\tright: { x: 8, y: 0 },\n\tdown: { x: 0, y: 8 },\n\tleft: { x: -8, y: 0 }\n};\n\n// 可复用的旋转函数（旋转向量 (vx,vy) by angle radians）\nfunction rotateVec(vx, vy, angle) {\n\tvar c = Math.cos(angle),\n\t\ts = Math.sin(angle);\n\treturn { x: vx * c - vy * s, y: vx * s + vy * c };\n}\n\n/**\n * 在格子中心作为枢轴，让四张图一起顺时针旋转 180°（默认）。\n * x,y 为格子坐标（格子左上角为 x*32,y*32）\n * duration 毫秒，rotateSelf: 是否让每张图自身也跟着旋转（true = 图也自转）\n */\nfunction showGroupPivotRotatingDamage(x, y, duration = 500) {\n\tvar image = core.material.images.images['85.png'];\n\tif (!image) return;\n\tvar start = Date.now();\n\tvar dirs = ['up', 'right', 'down', 'left'];\n\tvar tileCX = x * 32 + 16; // 格子中心 x (像素)\n\tvar tileCY = y * 32 + 16; // 格子中心 y (像素)\n\tvar w = 16,\n\t\th = 16; // 绘制大小（图大小或你想要的大小）\n\n\t// 如果你想让初始状态是四方向都存在（如用户所说），就直接开始绘制\n\tfunction frame() {\n\t\tvar now = Date.now();\n\t\tvar p = (now - start) / duration;\n\t\tif (p > 1) p = 1;\n\n\t\t// 顺时针旋转角度从 0 到 PI (180°)\n\t\tvar baseAngle = p * Math.PI;\n\n\t\t// 清空 event2 层（只清该层以免破坏其他层）\n\t\tcore.clearMap('event2');\n\n\t\t// 对每个方向计算旋转后的位置并绘制\n\t\tdirs.forEach(function (dir) {\n\t\t\tvar off = groupOffsets[dir];\n\t\t\t// 先把原向量绕格子中心旋转 baseAngle（顺时针 -> 用正角）\n\t\t\tvar r = rotateVec(off.x, off.y, baseAngle);\n\n\t\t\t// 求出图像的目标左上角，使图心放在 (tileCX + r.x, tileCY + r.y)\n\t\t\tvar destCenterX = tileCX + r.x;\n\t\t\tvar destCenterY = tileCY + r.y;\n\t\t\tvar x1 = Math.round(destCenterX - w / 2);\n\t\t\tvar y1 = Math.round(destCenterY - h / 2);\n\n\t\t\t// 如果要让图自身也旋转（和组一起转），设 angleSelf；否则 angleSelf = 0\n\t\t\tvar angleSelf = 0;\n\t\t\t// 让图的朝向也随组旋转：原本朝向角（up 为 0，其它按 baseDirectionAngles） + baseAngle\n\t\t\tvar baseDirAngle = (dir === 'up' ? 0 : dir === 'right' ? Math.PI / 2 : dir === 'down' ? Math.PI : Math.PI * 3 / 2);\n\t\t\tangleSelf = baseDirAngle + baseAngle;\n\n\t\t\t// 使用你已有的 core.drawImage 的参数签名：\n\t\t\t// core.drawImage(name, image, sx, sy, sw, sh, dx, dy, dw, dh, angle)\n\t\t\t// 这里假设素材整张就是 16x16（若不是请调整 sx,sy,sw,sh）\n\t\t\tcore.drawImage(\n\t\t\t\t'event2',\n\t\t\t\timage,\n\t\t\t\t0, 0, w, h,\n\t\t\t\tx1, y1, w, h,\n\t\t\t\tangleSelf // 旋转围绕每张图的自身中心（注意：我们的位移已完成“围绕格子中心”的旋转）\n\t\t\t);\n\t\t});\n\n\t\tif (p < 1) {\n\t\t\trequestAnimationFrame(frame);\n\t\t} else {\n\t\t\t// 动画结束：如果想保留最后一帧短时显示，可取消下面清除\n\t\t\t// core.clearMap('event2');\n\t\t\tcore.drawMap(); // 确保其他层正确覆盖\n\t\t}\n\t}\n\n\trequestAnimationFrame(frame);\n}\nshowGroupPivotRotatingDamage(core.getHeroLoc('x'), core.getHeroLoc('y'))\n}"
            },
            {
                "type": "sleep",
                "time": 500
            },
            {
                "type": "setCurtain",
                "color": [
                    0,
                    0,
                    0,
                    1
                ],
                "time": 1000,
                "keep": true,
                "async": true
            },
            {
                "type": "playSound",
                "name": "阻激夹域",
                "stop": true
            },
            {
                "type": "sleep",
                "time": 300
            },
            {
                "type": "playSound",
                "name": "阻激夹域"
            },
            {
                "type": "sleep",
                "time": 150
            },
            {
                "type": "playSound",
                "name": "阻激夹域"
            },
            {
                "type": "sleep",
                "time": 300
            },
            {
                "type": "playSound",
                "name": "阻激夹域"
            },
            {
                "type": "sleep",
                "time": 150
            },
            {
                "type": "playSound",
                "name": "阻激夹域"
            },
            {
                "type": "waitAsync"
            },
            {
                "type": "setValue",
                "name": "flag:03",
                "value": "1"
            },
            {
                "type": "setValue",
                "name": "flag:nowWeapon",
                "value": "null"
            },
            {
                "type": "setValue",
                "name": "flag:nowShield",
                "value": "null"
            },
            {
                "type": "setValue",
                "name": "flag:魔法免疫",
                "value": "false"
            },
            {
                "type": "hide",
                "loc": [
                    [
                        5,
                        7
                    ],
                    [
                        5,
                        8
                    ],
                    [
                        4,
                        9
                    ],
                    [
                        6,
                        9
                    ],
                    [
                        5,
                        10
                    ],
                    [
                        5,
                        9
                    ]
                ],
                "remove": true,
                "time": 0
            },
            {
                "type": "changeFloor",
                "floorId": "MT2",
                "loc": [
                    3,
                    8
                ],
                "direction": "down",
                "time": 0
            },
            {
                "type": "sleep",
                "time": 500
            },
            "------",
            "------ 喂！",
            "------ 喂！醒醒！",
            {
                "type": "setCurtain",
                "time": 500
            }
        ],
        "6,11": [
            "\\c[14]\r[gold]\\d【MOD规则】\r\\d\n\n①大部分图块分别在自身合集内进行了洗牌（重新排序）：\n绿色合集（绿色怪物）\n黄色合集（黄色怪物、黄门、黄钥匙）\n蓝色合集（蓝色怪物、蓝宝石、蓝药水、蓝门、蓝钥匙、老人、商店）\n红色合集（红色怪物、红宝石、红药水、红门、红钥匙、商人）\n  \r[red]\\d但50层依然打败魔王\r\\d\n黑白合集（黑色怪物、白色怪物）\n特殊道具合集（所有剑盾+特殊道具）\n  \r[red]\\d地震、冰冻徽章随商人和魔龙进入红色合集\r\\d\n\n②\r[orange]\\d隐藏图块（特殊道具除外）\r\\d会\r[orange]\\d随机\r\\d变成自身合集内的图块（非洗牌）",
            "\\c[14]③初始商店、剑盾效果均为\r[orange]\\d一区状态\r\\d，在商店选择升级后（消耗4张凭证），这些\r[lime]\\d效果会提升1次\r\\d\n凭证获取途径：\n\r[gold]\\d>>每次拾取剑、盾后，凭证+1\n>>摧毁商店后，凭证+2\n>>BOSS战（10、20、40、49层）结束后，凭证+1\n>>击杀回收钥匙商人，凭证+2\r\\d\n\n④最终持有的\r[orange]\\d凭证\r\\d可以削弱50层魔王 \r[lime]\\d2%\r\\d 的全属性/张\n\n⑤楼传为\r[orange]\\d超级楼传\r\\d，可以在任意位置传送到0、44、50以外的楼层"
        ]
    },
    "changeFloor": {
        "11,11": {
            "floorId": ":next",
            "stair": "downFloor",
            "time": 0
        },
        "1,11": {
            "floorId": ":before",
            "stair": "upFloor",
            "time": 0
        }
    },
    "afterBattle": {},
    "afterGetItem": {},
    "afterOpenDoor": {},
    "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": [
        10,
        11
    ],
    "downFloor": [
        2,
        11
    ],
    "autoEvent": {},
    "beforeBattle": {},
    "cannotMoveIn": {}
}