418 lines
19 KiB
JavaScript
418 lines
19 KiB
JavaScript
main.floors.nandu=
|
||
{
|
||
"floorId": "nandu",
|
||
"title": "难度选择",
|
||
"name": "难度选择",
|
||
"canFlyTo": false,
|
||
"canUseQuickShop": true,
|
||
"cannotViewMap": true,
|
||
"images": [
|
||
{
|
||
"name": "black.png",
|
||
"canvas": "whole",
|
||
"x": 0,
|
||
"y": 0
|
||
}
|
||
],
|
||
"item_ratio": 1,
|
||
"color": [
|
||
0,
|
||
0,
|
||
0,
|
||
0
|
||
],
|
||
"firstArrive": [
|
||
{
|
||
"type": "function",
|
||
"function": "function(){\ncontrol.prototype.hideStatusBar();\n}"
|
||
},
|
||
{
|
||
"type": "trigger",
|
||
"loc": [
|
||
1,
|
||
0
|
||
]
|
||
}
|
||
],
|
||
"events": {
|
||
"4,3": null,
|
||
"4,7": null,
|
||
"1,0": [
|
||
{
|
||
"type": "setValue",
|
||
"name": "flag:isRMTitle",
|
||
"value": "true"
|
||
},
|
||
{
|
||
"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": "function",
|
||
"function": "function(){\nvar time = 500;\ntime /= Math.max(core.status.replay.speed, 1)\nvar per_time = 50,\n\tstep = 0,\n\tsteps = parseInt(time / per_time);\nvar animate = core.isReplaying() ? 0 : setInterval(function () {\n\tstep++;\n\tcore.dom.wholeCtx.globalAlpha = 1;\n\tcore.dom.wholeCtx.fillRect(0, 0, core.dom.whole.width, core.dom.whole.height);\n\tcore.dom.wholeCtx.globalAlpha = step / steps;\n\tcore.drawImage(core.dom.wholeCtx, core.material.images.images['nanduxuanze.jpg'], 0, 0);\n\tif (step == steps) {\n\t\tclearInterval(animate);\n\t}\n}, per_time);\n}"
|
||
},
|
||
{
|
||
"type": "sleep",
|
||
"time": 550,
|
||
"noSkip": true
|
||
},
|
||
{
|
||
"type": "setValue",
|
||
"name": "flag:hard",
|
||
"value": "1"
|
||
},
|
||
{
|
||
"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}"
|
||
},
|
||
{
|
||
"type": "showImage2",
|
||
"code": 6,
|
||
"image": "0easy.png",
|
||
"loc": [
|
||
-160,
|
||
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}"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"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\": \"\\\\\\c[21] 是否选择\" + [\"\\u000d[#ffff80]作弊\", \"\\u000d[#80ff80]简单\", \"\\u000d[#8080ff]普通\", \"\\u000d[#ff80ff]困难\", \"\\u000d[#ff8080]噩梦\", \"\\u000d[#ffff80]作弊\"][flags.hard] + \"\\u000d难度?\",\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}"
|
||
}
|
||
],
|
||
"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\": \"showImage2\", \"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}"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"type": "hideImage",
|
||
"code": 6,
|
||
"time": 0
|
||
},
|
||
{
|
||
"type": "setText",
|
||
"position": "down",
|
||
"title": [
|
||
255,
|
||
255,
|
||
255,
|
||
1
|
||
],
|
||
"text": [
|
||
255,
|
||
255,
|
||
255,
|
||
1
|
||
],
|
||
"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}"
|
||
},
|
||
{
|
||
"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}"
|
||
},
|
||
{
|
||
"type": "function",
|
||
"function": "function(){\ncore.createCanvas('shifoutiaoguo',0,0,480,480,200);\n}"
|
||
},
|
||
{
|
||
"type": "function",
|
||
"function": "function(){\ncore.drawTextContent('shifoutiaoguo', '是否跳过开始剧情,直接进入游戏?', { \t\t\t\tleft: 100, \t\t\t\ttop: 180, \t\t\t\tmaxWidth: 400, \t\t\t\tfontSize: 20, \t\t\t\tlineHeight: 20, \t\t\t\tbold: false, \t\t\t});\n}"
|
||
},
|
||
{
|
||
"type": "setText",
|
||
"background": "winskin4.png"
|
||
},
|
||
{
|
||
"type": "choices",
|
||
"text": " ",
|
||
"choices": [
|
||
{
|
||
"text": "是",
|
||
"action": [
|
||
{
|
||
"type": "function",
|
||
"function": "function(){\ncore.clearMap('shifoutiaoguo');\n}"
|
||
},
|
||
{
|
||
"type": "playBgm",
|
||
"name": "xingkong.mp3",
|
||
"keep": true
|
||
},
|
||
{
|
||
"type": "changeFloor",
|
||
"floorId": "MT0",
|
||
"loc": [
|
||
7,
|
||
11
|
||
],
|
||
"direction": "down",
|
||
"time": 0
|
||
},
|
||
{
|
||
"type": "function",
|
||
"function": "function(){\ncore.plugin.donghua();\n}"
|
||
},
|
||
{
|
||
"type": "setCurtain",
|
||
"color": [
|
||
0,
|
||
0,
|
||
0,
|
||
0
|
||
],
|
||
"time": 0,
|
||
"keep": true
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"text": "否",
|
||
"action": [
|
||
{
|
||
"type": "function",
|
||
"function": "function(){\ncore.clearMap('shifoutiaoguo');\n}"
|
||
},
|
||
{
|
||
"type": "changeFloor",
|
||
"floorId": "QISHI",
|
||
"loc": [
|
||
0,
|
||
0
|
||
],
|
||
"time": 0
|
||
},
|
||
{
|
||
"type": "trigger",
|
||
"loc": [
|
||
1,
|
||
0
|
||
]
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"2,0": [
|
||
{
|
||
"type": "setCurtain",
|
||
"keep": true,
|
||
"time": 500
|
||
},
|
||
{
|
||
"type": "playBgm",
|
||
"name": "longyingsuifeng.mp3"
|
||
},
|
||
{
|
||
"type": "changeFloor",
|
||
"floorId": "PIANTOU8",
|
||
"loc": [
|
||
8,
|
||
8
|
||
],
|
||
"direction": "up",
|
||
"time": 0
|
||
},
|
||
{
|
||
"type": "trigger",
|
||
"loc": [
|
||
1,
|
||
0
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"changeFloor": {},
|
||
"afterBattle": {
|
||
"5,5": null
|
||
},
|
||
"afterGetItem": {},
|
||
"afterOpenDoor": {},
|
||
"cannotMove": {},
|
||
"ratio": 1,
|
||
"map": [
|
||
[ 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]
|
||
],
|
||
"bgmap": [
|
||
|
||
],
|
||
"fgmap": [
|
||
|
||
],
|
||
"width": 15,
|
||
"height": 15,
|
||
"autoEvent": {
|
||
"1,0": {
|
||
"0": null,
|
||
"1": null,
|
||
"2": null,
|
||
"3": null,
|
||
"4": null,
|
||
"5": null,
|
||
"6": null,
|
||
"7": null,
|
||
"8": null
|
||
}
|
||
},
|
||
"beforeBattle": {},
|
||
"cannotMoveIn": {}
|
||
} |