main.floors.MT50=
{
    "floorId": "MT50",
    "title": "魔塔 第50层",
    "name": "第 50 层",
    "width": 13,
    "height": 13,
    "map": [
    [  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4],
    [  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4],
    [  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4],
    [  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4],
    [  4,  4,  4,  4,  1,  1,  1,  1,  1,  4,  4,  4,  4],
    [  4,  4,  4,  4,  1,  0,123,  0,  1,  4,  4,  4,  4],
    [  4,  4,  4,  4,  1,  0,  0,  0,  1,  4,  4,  4,  4],
    [  4,  4,  4,  4,  1,  0,  0,  0,  1,  4,  4,  4,  4],
    [  4,  4,  4,  4,  1,  1,  1,  1,  1,  4,  4,  4,  4],
    [  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4],
    [  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4],
    [  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4],
    [  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4]
],
    "canFlyTo": false,
    "canFlyFrom": false,
    "canUseQuickShop": true,
    "images": [],
    "ratio": 5,
    "defaultGround": "ground",
    "bgm": null,
    "firstArrive": [],
    "eachArrive": [],
    "parallelDo": "",
    "events": {
        "6,5": [
            {
                "type": "playBgm",
                "name": "LastFight.mp3"
            },
            "\t[我]\f[jh1.png,1,1,130,130]勇者问：“你怎会在这里！你到底是谁？”",
            "\t[小偷,thief]小偷回答：“我在这里只有一个理由，那就是...”",
            {
                "type": "hide",
                "time": 500
            },
            {
                "type": "setEnemy",
                "id": "redKing",
                "name": "hp",
                "value": "70000"
            },
            {
                "type": "setEnemy",
                "id": "redKing",
                "name": "atk",
                "value": "2500"
            },
            {
                "type": "setEnemy",
                "id": "redKing",
                "name": "def",
                "value": "700"
            },
            {
                "type": "setBlock",
                "number": "redKing"
            },
            {
                "type": "show",
                "time": 500
            },
            "\t[我]\f[jh1.png,1,1,130,130]神偷魔王不跟你废话了",
            "\t[redKing]？？？",
            {
                "type": "setValue",
                "name": "flag:与50层小偷对话",
                "value": "true"
            }
        ]
    },
    "changeFloor": {},
    "afterBattle": {
        "6,5": [
            "祝贺你顺利过关",
            {
                "type": "if",
                "condition": "flag:TE",
                "true": [
                    {
                        "type": "setValue",
                        "name": "flag:endingType",
                        "value": "\"TE\""
                    }
                ],
                "false": [
                    {
                        "type": "setValue",
                        "name": "flag:endingType",
                        "value": "\"NE\""
                    }
                ]
            },
            {
                "type": "while",
                "condition": "true",
                "data": [
                    {
                        "type": "choices",
                        "text": "\t[king]选择要提交的榜单！",
                        "choices": [
                            {
                                "text": "生命值",
                                "action": [
                                    {
                                        "type": "setValue",
                                        "name": "flag:rankType",
                                        "value": "\"生命\""
                                    },
                                    {
                                        "type": "break",
                                        "n": 1
                                    }
                                ]
                            },
                            {
                                "text": "攻击值（最高）",
                                "action": [
                                    {
                                        "type": "setValue",
                                        "name": "flag:rankType",
                                        "value": "\"最高攻击\""
                                    },
                                    {
                                        "type": "setValue",
                                        "name": "status:hp",
                                        "value": "status:atk",
                                        "norefresh": true
                                    },
                                    {
                                        "type": "break",
                                        "n": 1
                                    }
                                ]
                            },
                            {
                                "text": "防御值（最高）",
                                "action": [
                                    {
                                        "type": "setValue",
                                        "name": "flag:rankType",
                                        "value": "\"最高防御\""
                                    },
                                    {
                                        "type": "setValue",
                                        "name": "status:hp",
                                        "value": "status:def",
                                        "norefresh": true
                                    },
                                    {
                                        "type": "break",
                                        "n": 1
                                    }
                                ]
                            },
                            {
                                "text": "金币数量",
                                "action": [
                                    {
                                        "type": "setValue",
                                        "name": "flag:rankType",
                                        "value": "\"金币\""
                                    },
                                    {
                                        "type": "setValue",
                                        "name": "status:hp",
                                        "value": "status:money",
                                        "norefresh": true
                                    },
                                    {
                                        "type": "break",
                                        "n": 1
                                    }
                                ]
                            },
                            {
                                "text": "攻防和（最高）",
                                "action": [
                                    {
                                        "type": "setValue",
                                        "name": "flag:rankType",
                                        "value": "\"最高攻防和\""
                                    },
                                    {
                                        "type": "setValue",
                                        "name": "status:hp",
                                        "value": "status:atk + status:def",
                                        "norefresh": true
                                    },
                                    {
                                        "type": "break",
                                        "n": 1
                                    }
                                ]
                            },
                            {
                                "text": "商店加点次数（最高）",
                                "action": [
                                    {
                                        "type": "setValue",
                                        "name": "flag:rankType",
                                        "value": "\"最高商店加点次数\""
                                    },
                                    {
                                        "type": "setValue",
                                        "name": "status:hp",
                                        "value": "flag:times1",
                                        "norefresh": true
                                    },
                                    {
                                        "type": "break",
                                        "n": 1
                                    }
                                ]
                            },
                            {
                                "text": "存活怪物数量",
                                "action": [
                                    {
                                        "type": "function",
                                        "function": "function(){\nlet n = 0;\nfor (const f of core.floorIds) {\n\tn += core.searchBlockWithFilter(b => b.event.cls === 'enemys' || b.event.cls === 'enemy48', f).length;\n}\ncore.setFlag('t', n);\n}"
                                    },
                                    {
                                        "type": "setValue",
                                        "name": "flag:rankType",
                                        "value": "\"存活怪物数量\""
                                    },
                                    {
                                        "type": "setValue",
                                        "name": "status:hp",
                                        "value": "flag:t",
                                        "norefresh": true
                                    },
                                    {
                                        "type": "break",
                                        "n": 1
                                    }
                                ]
                            },
                            {
                                "text": "下一页",
                                "action": [
                                    {
                                        "type": "choices",
                                        "text": "\t[king]选择要提交的榜单！",
                                        "choices": [
                                            {
                                                "text": "攻击值（最低）",
                                                "action": [
                                                    {
                                                        "type": "setValue",
                                                        "name": "flag:rankType",
                                                        "value": "\"最低攻击\""
                                                    },
                                                    {
                                                        "type": "setValue",
                                                        "name": "status:hp",
                                                        "value": "status:atk + (1000000000 - 100000*status:atk)",
                                                        "norefresh": true
                                                    },
                                                    {
                                                        "type": "break",
                                                        "n": 1
                                                    }
                                                ]
                                            },
                                            {
                                                "text": "防御值（最低）",
                                                "action": [
                                                    {
                                                        "type": "setValue",
                                                        "name": "flag:rankType",
                                                        "value": "\"最低防御\""
                                                    },
                                                    {
                                                        "type": "setValue",
                                                        "name": "status:hp",
                                                        "value": "status:def + (1000000000 - 100000*status:def)",
                                                        "norefresh": true
                                                    },
                                                    {
                                                        "type": "break",
                                                        "n": 1
                                                    }
                                                ]
                                            },
                                            {
                                                "text": "攻防和（最低）",
                                                "action": [
                                                    {
                                                        "type": "setValue",
                                                        "name": "flag:rankType",
                                                        "value": "\"最低攻防和\""
                                                    },
                                                    {
                                                        "type": "setValue",
                                                        "name": "status:hp",
                                                        "value": "(status:atk + status:def) + (1000000000 - 100000*(status:atk + status:def))",
                                                        "norefresh": true
                                                    },
                                                    {
                                                        "type": "break",
                                                        "n": 1
                                                    }
                                                ]
                                            },
                                            {
                                                "text": "商店加点次数（最低）",
                                                "action": [
                                                    {
                                                        "type": "setValue",
                                                        "name": "flag:rankType",
                                                        "value": "\"最低商店加点次数\""
                                                    },
                                                    {
                                                        "type": "setValue",
                                                        "name": "status:hp",
                                                        "value": "100000-1000*flag:times1 + flag:times1",
                                                        "norefresh": true
                                                    },
                                                    {
                                                        "type": "break",
                                                        "n": 1
                                                    }
                                                ]
                                            },
                                            {
                                                "text": "下一页",
                                                "action": [
                                                    {
                                                        "type": "choices",
                                                        "text": "\t[king]选择要提交的榜单！",
                                                        "choices": [
                                                            {
                                                                "text": "持有道具数量（不计钥匙）",
                                                                "action": [
                                                                    {
                                                                        "type": "setValue",
                                                                        "name": "flag:rankType",
                                                                        "value": "\"持有道具数量\""
                                                                    },
                                                                    {
                                                                        "type": "function",
                                                                        "function": "function(){\nconst keyItems = ['yellowKey', 'blueKey', 'redKey'];\n\nfunction countNonKeyItems(data) {\n\tlet t = 0;\n\tObject.values(data.constants).forEach(v => t += v);\n\tfor (const [k, v] of Object.entries(data.tools)) {\n\t\tif (!keyItems.includes(k)) t += v;\n\t}\n\tObject.values(data.equips).forEach(v => t += v);\n\treturn t;\n}\ncore.status.hero.hp = countNonKeyItems(core.status.hero.items) - 1;\n}"
                                                                    },
                                                                    {
                                                                        "type": "break",
                                                                        "n": 1
                                                                    }
                                                                ]
                                                            },
                                                            {
                                                                "text": "回到第一页",
                                                                "action": []
                                                            }
                                                        ]
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                ]
                            }
                        ]
                    }
                ]
            },
            {
                "type": "win",
                "reason": "${flag:versionType}-${flag:endingType}（${flag:rankType}）"
            }
        ]
    },
    "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": [

],
    "autoEvent": {},
    "beforeBattle": {},
    "cannotMoveIn": {}
}