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

257 lines
9.9 KiB
JavaScript

main.floors.SX2_2=
{
"floorId": "SX2_2",
"title": "水乡古镇:2-2",
"name": "2-2",
"width": 13,
"height": 13,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"images": [],
"ratio": 1,
"defaultGround": "ground7",
"bgm": "maps3.mp3",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {
"4,4": [
{
"type": "if",
"condition": "switch:A",
"true": [
"\t[商人,woman]如果你拥有十字架,在对战丧尸和吸血鬼的时候攻击力翻倍。没有十字架的时候很难打倒他们,特别是吸血鬼。",
{
"type": "hide",
"remove": true
}
],
"false": [
{
"type": "choices",
"text": "\t[商人,woman]我200星币卖${core.hasItem(\"Backpack\") ?2:1}把蓝钥匙,你买吗?",
"choices": [
{
"text": "我太需要了",
"need": "status:money>=200",
"action": [
{
"type": "setValue",
"name": "status:money",
"operator": "-=",
"value": "200"
},
{
"type": "setValue",
"name": "item:blueKey",
"operator": "+=",
"value": "1"
},
{
"type": "if",
"condition": "core.hasItem(\"Backpack\")",
"true": [
{
"type": "setValue",
"name": "item:blueKey",
"operator": "+=",
"value": "1"
}
]
},
{
"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:blueKey",
"operator": "+=",
"value": "1"
},
{
"type": "if",
"condition": "core.hasItem(\"Backpack\")",
"true": [
{
"type": "setValue",
"name": "item:blueKey",
"operator": "+=",
"value": "1"
}
]
},
{
"type": "setValue",
"name": "switch:B",
"value": "true"
}
]
},
{
"text": "离开",
"action": []
}
]
}
]
}
]
},
"changeFloor": {
"0,12": {
"floorId": "SX2_1",
"loc": [
11,
12
],
"direction": "left"
},
"12,8": {
"floorId": "SX2_3",
"loc": [
1,
8
],
"direction": "right"
},
"6,0": {
"floorId": "SX3_2",
"loc": [
6,
11
],
"direction": "up"
}
},
"beforeBattle": {},
"afterBattle": {
"5,8": [
{
"type": "function",
"function": "function(){\nlet bool = true;\nlet loc_arr = [\n\t[5, 8],\n\t[5, 9],\n\t[7, 8],\n\t[7, 9],\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": "openDoor",
"loc": [
6,
10
]
}
]
}
],
"7,8": [
{
"type": "function",
"function": "function(){\nlet bool = true;\nlet loc_arr = [\n\t[5, 8],\n\t[5, 9],\n\t[7, 8],\n\t[7, 9],\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": "openDoor",
"loc": [
6,
10
]
}
]
}
],
"5,9": [
{
"type": "function",
"function": "function(){\nlet bool = true;\nlet loc_arr = [\n\t[5, 8],\n\t[5, 9],\n\t[7, 8],\n\t[7, 9],\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": "openDoor",
"loc": [
6,
10
]
}
]
}
],
"7,9": [
{
"type": "function",
"function": "function(){\nlet bool = true;\nlet loc_arr = [\n\t[5, 8],\n\t[5, 9],\n\t[7, 8],\n\t[7, 9],\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": "openDoor",
"loc": [
6,
10
]
}
]
}
]
},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"map": [
[203, 81,206, 21,401,140, 91,140, 0,218, 55,218, 0],
[203,140,140,140,140,140, 0,140, 21,140,140,140, 21],
[ 81,140,203, 0,206, 81, 0,140, 0,215, 0,215, 0],
[213,140, 81,140,140,140,140,140,140,140, 82,140,140],
[206,140,206,140,122,140, 0, 21,140, 0,203,140, 32],
[205,140, 81,140, 0, 81,214, 0, 81,205, 0,140, 31],
[ 0,205, 0,203, 31,140, 0, 21,140, 0,205, 82, 21],
[ 81,140,140,140,140,140, 81,140,140, 81,140,140,140],
[ 0,206, 0,203,140,213, 0,213,140, 0, 0, 0, 94],
[214,140,140, 82,140,214, 0,214,140, 81,140,140,140],
[ 0,213, 81, 0,140,140, 85,140,140,205,140,411, 0],
[140,140,140,218,140, 21, 0, 21,140, 0,140, 0,401],
[ 92, 0, 0, 0,140,401, 32,411,140,205, 82, 21, 0]
],
"bgmap": [
[141,141,141,141,141, 0,141, 0,141,141,141,141,141],
[141, 0, 0, 0, 0, 0,141, 0,141, 0, 0, 0,141],
[141, 0,141,141,141,141,141, 0,141,141,141,141,141],
[141, 0,141, 0, 0, 0, 0, 0, 0, 0,141, 0, 0],
[141, 0,141, 0,141, 0,141,141, 0,141,141, 0,141],
[141, 0,141, 0,141,141,141,141,141,141,141, 0,141],
[141,141,141,141,141, 0,141,141, 0,141,141,141,141],
[141, 0, 0, 0, 0, 0,141, 0, 0,141, 0, 0, 0],
[141,141,141,141, 0,141,141,141, 0,141,141,141,141],
[141, 0, 0,141, 0,141,141,141, 0,141, 0, 0, 0],
[141,141,141,141, 0, 0,141, 0, 0,141, 0,141,141],
[ 0, 0, 0,141, 0,141,141,141, 0,141, 0,141,141],
[141,141,141,141, 0,141,141,141, 0,141,141,141,141]
],
"fgmap": [
]
}