51_AstralParty/project/floors/MAL38.js
2025-09-11 22:30:07 +08:00

195 lines
7.4 KiB
JavaScript

main.floors.MAL38=
{
"floorId": "MAL38",
"title": "魔法学院:38F",
"name": "主楼 38F",
"width": 13,
"height": 13,
"map": [
[148,148,148,148,148,148,148,148,148,148,148,148,148],
[148, 88, 0, 83,216, 0, 0, 0,216, 81, 0, 87,148],
[148, 0, 0,148, 0,122, 21, 0, 0,148, 0, 0,148],
[148,212,148,148,148,148,148, 81,148,148,148, 81,148],
[148, 0, 0,225,225, 0,148, 0,148, 21,148, 0,148],
[148,148,148,148,148, 82,148, 0,148, 21,148, 0,148],
[148, 0, 0, 0, 82, 82,148,212,148, 21,148,212,148],
[148, 0,421, 0,148,148,148,224,148, 0,227, 0,148],
[148, 0, 0, 0,148,412, 31, 0,148,148,148, 81,148],
[148,148,148,148,148,148,148,148,148, 21, 0,212,148],
[148,222, 0,222,148, 0, 0, 0,148, 0,227, 0,148],
[148, 0, 0, 0, 81,224, 0,213, 81,225, 0, 32,148],
[148,148,148,148,148,148,148,148,148,148,148,148,148]
],
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"images": [],
"ratio": 4,
"defaultGround": "magicground",
"bgm": "maps4L.mp3",
"firstArrive": null,
"eachArrive": [],
"parallelDo": "",
"events": {
"5,2": [
{
"type": "if",
"condition": "switch:A",
"true": [
"\t[商人,woman]永远不存在没有门卫的特殊门。换言之,一定有门卫守卫同楼层的特殊门。所以……",
{
"type": "hide",
"remove": true
}
],
"false": [
{
"type": "choices",
"text": "\t[商人,woman]我以200星币特价卖${core.hasItem(\"Backpack\") ?6:3}把黄钥匙,先到先得。",
"choices": [
{
"text": "我太需要了",
"need": "status:money>=200",
"action": [
{
"type": "setValue",
"name": "status:money",
"operator": "-=",
"value": "200"
},
{
"type": "setValue",
"name": "item:yellowKey",
"operator": "+=",
"value": "3"
},
{
"type": "if",
"condition": "core.hasItem(\"Backpack\")",
"true": [
{
"type": "setValue",
"name": "item:yellowKey",
"operator": "+=",
"value": "3"
}
]
},
{
"type": "setValue",
"name": "switch:A",
"value": "true"
}
]
},
{
"text": "使用1星光支付",
"need": "flags.star.level>0",
"condition": "item:FriendshipBadge&&!switch:B",
"action": [
{
"type": "function",
"function": "function(){\nflags.star.level--\n}"
},
{
"type": "setValue",
"name": "item:yellowKey",
"operator": "+=",
"value": "3"
},
{
"type": "if",
"condition": "core.hasItem(\"Backpack\")",
"true": [
{
"type": "setValue",
"name": "item:yellowKey",
"operator": "+=",
"value": "3"
}
]
},
{
"type": "setValue",
"name": "switch:B",
"value": "true"
}
]
},
{
"text": "离开",
"action": []
}
]
}
]
}
]
},
"changeFloor": {
"1,1": {
"floorId": ":before",
"stair": "upFloor"
},
"11,1": {
"floorId": ":next",
"stair": "downFloor"
}
},
"afterBattle": {
"1,10": [
{
"type": "function",
"function": "function(){\nvar bool = true;\nvar loc_arr = [\n\t[1, 10],\n\t[3, 10],\n]\nloc_arr.forEach(loc => {\n\tif (core.getBlockCls(loc[0], loc[1]) == \"enemys\") {\n\t\tbool = false;\n\t}\n});\ncore.setFlag(\"open_yes\", bool)\n}"
},
{
"type": "if",
"condition": "flag:open_yes",
"true": [
{
"type": "function",
"function": "function(){\ncore.removeBlock(2, 9)\ncore.drawMap()\n}"
}
]
}
],
"3,10": [
{
"type": "function",
"function": "function(){\nvar bool = true;\nvar loc_arr = [\n\t[1, 10],\n\t[3, 10],\n]\nloc_arr.forEach(loc => {\n\tif (core.getBlockCls(loc[0], loc[1]) == \"enemys\") {\n\t\tbool = false;\n\t}\n});\ncore.setFlag(\"open_yes\", bool)\n}"
},
{
"type": "if",
"condition": "flag:open_yes",
"true": [
{
"type": "function",
"function": "function(){\ncore.removeBlock(2, 9)\ncore.drawMap()\n}"
}
]
}
]
},
"afterGetItem": {},
"afterOpenDoor": {},
"cannotMove": {},
"fgmap": [
],
"bgmap": [
],
"upFloor": [
10,
1
],
"downFloor": [
2,
1
],
"autoEvent": {},
"beforeBattle": {},
"cannotMoveIn": {},
"bg2map": [],
"fg2map": []
}