tianta/project/floors/nandu.js

395 lines
18 KiB
JavaScript
Raw Normal View History

2022-10-21 23:00:12 +08:00
main.floors.nandu=
{
"floorId": "nandu",
"title": "难度选择",
"name": "难度选择",
"canFlyTo": false,
"canUseQuickShop": true,
"cannotViewMap": true,
"images": [
{
"name": "nanduxuanze.jpg",
"canvas": "whole",
"x": 0,
2022-10-21 23:00:12 +08:00
"y": 0
}
],
"item_ratio": 1,
"color": [
0,
0,
0,
1
],
"firstArrive": [
{
"type": "function",
"function": "function(){\ncontrol.prototype.hideStatusBar();\n}"
},
2022-10-21 23:00:12 +08:00
{
"type": "trigger",
"loc": [
2022-10-22 19:23:02 +08:00
1,
2022-10-21 23:00:12 +08:00
0
]
}
],
"events": {
2022-10-22 19:23:02 +08:00
"4,3": null,
"4,7": null,
"1,0": [
2022-10-21 23:00:12 +08:00
{
"type": "setGlobalAttribute",
"name": "font",
"value": "fzchyjw"
},
{
"type": "setText",
"background": "winking.png"
},
{
"type": "setValue",
"name": "flag:__B__",
"value": "1"
},
{
"type": "setValue",
"name": "flag:__A__",
"value": "1"
},
{
"type": "playBgm",
"name": "Swordland.mp3",
"keep": true
},
{
"type": "setCurtain",
"color": [
0,
0,
0,
0
],
"time": 500,
"keep": true
},
{
"type": "setValue",
"name": "flag:hard",
"value": "1"
2022-10-21 23:00:12 +08:00
},
{
"type": "function",
"function": "function(){\ncore.drawImage(core.dom.wholeCtx, core.material.images.images['nanduxuanze.jpg'], 0, 0);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 1 ? \"\" : \"an\") + 'easy.png'], -30, -55, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 2 ? \"\" : \"an\") + 'normal.png'], -30, 20, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 3 ? \"\" : \"an\") + 'hard.png'], -30, 95, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 4 ? \"\" : \"an\") + 'hell.png'], -30, 170, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 5 || flags.hard == 0 ? \"\" : \"an\") + 'cheating.png'], -30, 245, 710 * 0.6, 487 * 0.6);\n}"
2022-10-21 23:00:12 +08:00
},
{
"type": "showImage",
"code": 6,
"image": "0easy.png",
"loc": [
-160,
2022-10-21 23:00:12 +08:00
0
],
"opacity": 1,
"time": 500
},
{
"type": "if",
"condition": "(flag:__B__==1)",
"true": [
{
"type": "setValue",
"name": "flag:__B__",
"value": "0"
},
{
"type": "setValue",
"name": "flag:hard",
"value": "1"
},
{
"type": "while",
"condition": "1",
"data": [
{
"type": "wait"
},
{
"type": "if",
"condition": "(flag:type==0)",
"true": [
{
"type": "if",
"condition": "(flag:keycode==13)",
"true": [
{
"type": "setValue",
"name": "flag:xuanzhong",
"value": "1"
}
],
"false": []
},
{
"type": "if",
"condition": "(flag:keycode==32)",
"true": [
{
"type": "setValue",
"name": "flag:xuanzhong",
"value": "1"
}
],
"false": []
},
{
"type": "if",
"condition": "(flag:keycode==38)",
"true": [
{
"type": "setValue",
"name": "flag:hard",
"value": "flag:hard-1"
}
],
"false": []
},
{
"type": "if",
"condition": "(flag:keycode==40)",
"true": [
{
"type": "setValue",
"name": "flag:hard",
"value": "flag:hard+1"
}
],
"false": []
}
],
"false": [
{
"type": "function",
"function": "function(){\nvar h = -1;\nif (flags.px <= 160 && flags.py >= 46 && flags.py <= 430) h = Math.floor((flags.py - 46) / 77) + 1;\nif (h > 0) {\n\tif (h == flags.hard) flags.xuanzhong = 1;\n\telse flags.hard = h;\n}\n}"
2022-10-21 23:00:12 +08:00
}
]
},
{
"type": "if",
"condition": "(flag:hard==6)",
"true": [
{
"type": "setValue",
"name": "flag:hard",
"value": "1"
}
],
"false": []
},
{
"type": "if",
"condition": "(flag:hard==0)",
"true": [
{
"type": "setValue",
"name": "flag:hard",
"value": "5"
}
],
"false": []
},
{
"type": "if",
"condition": "(flag:xuanzhong==1)",
"true": [
{
"type": "function",
"function": "function(){\ncore.insertAction([{\n\t\"type\": \"choices\",\n\t\"text\": \"是否选择\" + [\"作弊\", \"简单\", \"中等\", \"困难\", \"噩梦\", \"作弊\"][flags.hard] + \"难度\",\n\t\"choices\": [{\n\t\t\t\"text\": \"是\",\n\t\t\t\"action\": [\n\t\t\t\t{ \"type\": \"break\" },\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"text\": \"否\",\n\t\t\t\"action\": [\n\t\t\t\t{ \"type\": \"setValue\", \"name\": \"fla\" + \"g:xuanzhong\", \"value\": \"0\" },\n\t\t\t]\n\t\t},\n\t]\n}, ])\n}"
2022-10-21 23:00:12 +08:00
}
],
"false": [
{
"type": "function",
"function": "function(){\ncore.drawImage(core.dom.wholeCtx, core.material.images.images['nanduxuanze.jpg'], 0, 0);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 1 ? \"\" : \"an\") + 'easy.png'], -30, -55, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 2 ? \"\" : \"an\") + 'normal.png'], -30, 20, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 3 ? \"\" : \"an\") + 'hard.png'], -30, 95, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 4 ? \"\" : \"an\") + 'hell.png'], -30, 170, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 5 || flags.hard == 0 ? \"\" : \"an\") + 'cheating.png'], -30, 245, 710 * 0.6, 487 * 0.6);\n\ncore.insertAction({ \"type\": \"showImage\", \"code\": 6, \"image\": [\"0cheating.png\", \"0easy.png\", \"0normal.png\", \"0hard.png\", \"0hell.png\", \"0cheating.png\"][flags.hard], \"loc\": [-160, 0], \"opacity\": 1, \"time\": 0 })\n}"
2022-10-21 23:00:12 +08:00
}
]
}
]
},
{
"type": "hideImage",
"code": 6,
"time": 0
},
{
"type": "setText",
"position": "down",
"title": [
255,
255,
255,
1
],
"text": [
255,
255,
255,
1
],
2022-10-21 23:00:12 +08:00
"background": "winskin2.png",
"time": 20
},
{
"type": "function",
"function": "function(){\ncore.insertAction({ \"type\": \"setGlobalAttribute\", \"name\": \"statusLeftBackground\", \"value\": \"url(project/images/heng\" + flags.hard + \".png) 0 0/100% 100% no-repeat\" })\ncore.insertAction({ \"type\": \"setGlobalAttribute\", \"name\": \"toolsBackground\", \"value\": \"url(project/images/dibu\" + flags.hard + \".png) 0 0/100% 100% no-repeat\" })\ncore.insertAction({ \"type\": \"update\" });\nif (flags.hard != 3 && flags.hard != 4) core.insertAction({\n\t\"type\": \"setBlock\",\n\t\"number\": \"122\",\n\t\"loc\": [\n\t\t[5, 5]\n\t],\n\t\"floorId\": \"MT0\"\n})\nif (flags.hard == 2) core.insertAction({\n\t\"type\": \"setBlock\",\n\t\"number\": \"122\",\n\t\"loc\": [\n\t\t[5, 4]\n\t],\n\t\"floorId\": \"MT0\"\n})\nif (flags.hard == 0 || flags.hard == 5) core.status.hero.mdef += 800;\n}"
2022-10-21 23:00:12 +08:00
},
{
"type": "function",
"function": "function(){\nswitch(core.getFlag(\"hard\")){\n\tcase 1 :core.status.hard=\"简单\";\n\t\tbreak;\n\tcase 2 :core.status.hard=\"中等\";\n\t\tbreak;\t\n\tcase 3 :core.status.hard=\"困难\";\n\t\tbreak;\t\n\tcase 4 :core.status.hard=\"噩梦\";\n\t\tbreak;\t\n\tcase 5 :core.status.hard=\"作弊\";\n\t\tbreak;\n}\n}"
},
{
"type": "function",
"function": "function(){\ncore.dom.wholeCtx.fillRect(0, 0, core.dom.whole.width, core.dom.whole.height);\n}"
},
2022-10-21 23:00:12 +08:00
{
"type": "choices",
"text": "是否跳过开始剧情",
"choices": [
{
"text": "是",
"action": [
{
"type": "playBgm",
"name": "xingkong.mp3",
"keep": true
},
2022-10-21 23:00:12 +08:00
{
"type": "changeFloor",
"floorId": "MT0",
"loc": [
2022-10-22 19:23:02 +08:00
7,
2022-10-21 23:00:12 +08:00
11
],
"time": 0
},
{
"type": "function",
"function": "function(){\ncore.plugin.donghua();\n}"
},
{
"type": "setCurtain",
"color": [
0,
0,
0,
0
],
"time": 0,
"keep": true
}
]
2022-11-02 21:12:18 +08:00
},
{
"text": "否",
"action": [
{
"type": "changeFloor",
"floorId": "QISHI",
"loc": [
0,
0
],
"time": 0
},
{
"type": "trigger",
"loc": [
1,
0
]
}
]
2022-10-21 23:00:12 +08:00
}
]
}
]
}
],
2022-10-22 19:23:02 +08:00
"2,0": [
2022-10-21 23:00:12 +08:00
{
"type": "setCurtain",
"keep": true,
"time": 500
},
{
"type": "playBgm",
"name": "longyingsuifeng.mp3"
},
{
"type": "changeFloor",
"floorId": "PIANTOU8",
"loc": [
2022-10-22 19:23:02 +08:00
8,
2022-10-21 23:00:12 +08:00
8
],
"direction": "up",
"time": 0
},
{
"type": "trigger",
"loc": [
2022-10-22 19:23:02 +08:00
1,
2022-10-21 23:00:12 +08:00
0
]
}
]
},
"changeFloor": {},
"afterBattle": {
2022-10-22 19:23:02 +08:00
"5,5": null
2022-10-21 23:00:12 +08:00
},
"afterGetItem": {},
"afterOpenDoor": {},
"cannotMove": {},
"ratio": 1,
"map": [
2022-10-22 19:23:02 +08:00
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2022-10-21 23:00:12 +08:00
],
"bgmap": [
],
"fgmap": [
],
2022-10-22 19:23:02 +08:00
"width": 15,
"height": 15,
2022-10-21 23:00:12 +08:00
"autoEvent": {
2022-10-22 19:23:02 +08:00
"1,0": {
2022-10-21 23:00:12 +08:00
"0": null,
"1": null,
"2": null,
"3": null,
"4": null,
"5": null,
"6": null,
"7": null,
"8": null
}
},
"beforeBattle": {},
"cannotMoveIn": {}
}