mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-19 20:59:37 +08:00
feat: 黄蓝门转换机制
This commit is contained in:
parent
6417d9218b
commit
763ff0f3e7
@ -291,10 +291,10 @@ editor_multi = function () {
|
|||||||
_previewButton.onclick = function () {
|
_previewButton.onclick = function () {
|
||||||
if (!editor_multi.preview) return;
|
if (!editor_multi.preview) return;
|
||||||
_format();
|
_format();
|
||||||
if (editor_multi.hasError()) {
|
// if (editor_multi.hasError()) {
|
||||||
alert("当前好像存在严重的语法错误,请处理后再预览。");
|
// alert("当前好像存在严重的语法错误,请处理后再预览。");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
editor.uievent.previewEditorMulti(editor_multi.preview, codeEditor.getValue());
|
editor.uievent.previewEditorMulti(editor_multi.preview, codeEditor.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -350,10 +350,10 @@ editor_multi = function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
editor_multi.confirm = function (keep) {
|
editor_multi.confirm = function (keep) {
|
||||||
if (editor_multi.hasError()) {
|
// if (editor_multi.hasError()) {
|
||||||
alert("当前好像存在严重的语法错误,请处理后再保存。\n严重的语法错误可能会导致整个编辑器的崩溃。");
|
// alert("当前好像存在严重的语法错误,请处理后再保存。\n严重的语法错误可能会导致整个编辑器的崩溃。");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (!editor_multi.id) {
|
if (!editor_multi.id) {
|
||||||
editor_multi.id = '';
|
editor_multi.id = '';
|
||||||
|
@ -173,7 +173,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
|
|||||||
"E646": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
"E646": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||||
"E647": {"name":"苍蓝之灵-虚","hp":30000,"atk":5000,"def":3000,"money":10,"exp":2500,"point":0,"special":[28],"paleShield":10},
|
"E647": {"name":"苍蓝之灵-虚","hp":30000,"atk":5000,"def":3000,"money":10,"exp":2500,"point":0,"special":[28],"paleShield":10},
|
||||||
"E656": {"name":"触手史莱姆","hp":12500,"atk":5000,"def":2500,"money":4,"exp":200,"point":0,"special":[8],"together":25},
|
"E656": {"name":"触手史莱姆","hp":12500,"atk":5000,"def":2500,"money":4,"exp":200,"point":0,"special":[8],"together":25},
|
||||||
"E657": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
"E657": {"name":"触手法师","hp":50000,"atk":2000,"def":3000,"money":5,"exp":300,"point":0,"special":[8,13],"crit":null,"together":25},
|
||||||
"E658": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
"E658": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||||
"E659": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}
|
"E659": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}
|
||||||
}
|
}
|
@ -31,7 +31,8 @@ main.floors.MT50=
|
|||||||
"欢迎来到苍蓝之殿,这是本塔第二章里面最大的一个区,也是最复杂的一个区。整个苍蓝之殿分为无个部分:左下角、右下角、左上角、右上角和中心,每个部分都有不一样的玩法,多多动脑哦。"
|
"欢迎来到苍蓝之殿,这是本塔第二章里面最大的一个区,也是最复杂的一个区。整个苍蓝之殿分为无个部分:左下角、右下角、左上角、右上角和中心,每个部分都有不一样的玩法,多多动脑哦。"
|
||||||
],
|
],
|
||||||
"9,13": [
|
"9,13": [
|
||||||
"在你刚进入苍蓝之殿时,你只能先前往左下角部分(本地图的左面),右下角暂时不能前往。注意往上走往左依然可以进入左下角,不要只盯着这个地图的左边不放。"
|
"在你刚进入苍蓝之殿时,你只能先前往左下角部分(本地图的左面),右下角暂时不能前往。注意往上走往左依然可以进入左下角,不要只盯着这个地图的左边不放。",
|
||||||
|
"注意火炬可通行,而且跳跃时会跳过火炬,不会跳到火炬上"
|
||||||
],
|
],
|
||||||
"9,1": [
|
"9,1": [
|
||||||
"建议优先点出学习技能,对于特定场景将会非常有帮助",
|
"建议优先点出学习技能,对于特定场景将会非常有帮助",
|
||||||
|
@ -92,7 +92,7 @@ main.floors.MT51=
|
|||||||
[648,648,648,648,648, 0,648,648,648, 33,648,648,648,578,648],
|
[648,648,648,648,648, 0,648,648,648, 33,648,648,648,578,648],
|
||||||
[648,594, 33,381,648,539, 34,492, 0,243,648,376,403,378,648],
|
[648,594, 33,381,648,539, 34,492, 0,243,648,376,403,378,648],
|
||||||
[648, 33,648,492,648, 0,648,648,648, 0,648, 33, 21, 33,648],
|
[648, 33,648,492,648, 0,648,648,648, 0,648, 33, 21, 33,648],
|
||||||
[648, 27,648, 0, 34, 0,219, 0, 34, 0,648,648,494,648,648],
|
[648, 27,648, 0, 34, 0,219, 0,103, 0,648,648,494,648,648],
|
||||||
[648,243,648,656,648,648, 0,648, 0,648,648, 27, 0, 0, 94],
|
[648,243,648,656,648,648, 0,648, 0,648,648, 27, 0, 0, 94],
|
||||||
[ 92, 0, 34, 0, 27,492, 34,648, 0, 0,539, 0,381, 0,648],
|
[ 92, 0, 34, 0, 27,492, 34,648, 0, 0,539, 0,381, 0,648],
|
||||||
[648,648,648,648,648,648, 0,648,656,648,648,648,648,648,648],
|
[648,648,648,648,648,648, 0,648,656,648,648,648,648,648,648],
|
||||||
|
@ -24,6 +24,13 @@ main.floors.MT52=
|
|||||||
0,
|
0,
|
||||||
8
|
8
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"4,0": {
|
||||||
|
"floorId": "MT54",
|
||||||
|
"loc": [
|
||||||
|
4,
|
||||||
|
14
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"beforeBattle": {},
|
"beforeBattle": {},
|
||||||
|
@ -24,6 +24,13 @@ main.floors.MT53=
|
|||||||
7,
|
7,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"0,7": {
|
||||||
|
"floorId": "MT54",
|
||||||
|
"loc": [
|
||||||
|
14,
|
||||||
|
7
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"beforeBattle": {},
|
"beforeBattle": {},
|
||||||
@ -34,20 +41,20 @@ main.floors.MT53=
|
|||||||
"cannotMove": {},
|
"cannotMove": {},
|
||||||
"cannotMoveIn": {},
|
"cannotMoveIn": {},
|
||||||
"map": [
|
"map": [
|
||||||
[648,648,648,648,648,648,648,648,648,648,648,648,648,648,648],
|
[648,648,648,648,648,648,648, 91,648,648,648,648,648,648,648],
|
||||||
[648,656, 0,219,648, 0, 0, 0,243, 0, 0,492,482,482,648],
|
[648,656, 34,219,648, 0,482, 0,243, 29, 33,492,482,482,648],
|
||||||
[648, 0,648, 0,648,648,648,578,648,648,656,648,648,648,648],
|
[648, 0,648,381,648,648,648,578,648,648,656,648,648,648,648],
|
||||||
[648, 0,648, 0,648, 0, 0, 0,648, 0, 0,648, 0, 0,648],
|
[648, 0,648,482,648, 27,484, 28,648,381, 0,648,376,403,648],
|
||||||
[648, 0,648,563,492, 0, 0, 0,648, 0, 0,240, 0, 0,648],
|
[648, 0,648,563,492, 0,381, 0,648, 0, 34,240,484,378,648],
|
||||||
[648, 0,648,648,648,648,494,648,648,219,648,648,648,648,648],
|
[648,484,648,648,648,648,494,648,648,219,648,648,648,648,648],
|
||||||
[648, 0,578, 0,648,403, 0,484,648, 0, 0,648, 0, 0,648],
|
[648, 0,578, 0,648,403, 0,484,648, 0, 33,648, 33, 0,648],
|
||||||
[ 92, 0,648, 0,648, 0, 21, 0,648, 0, 0,220, 0, 0, 94],
|
[ 92, 0,648,482,648, 0, 21, 0,648,103, 0,220, 0, 0, 94],
|
||||||
[648,648,648, 0,648,376, 0,378,648, 0, 0,648, 0, 0,648],
|
[648,492,648, 0,648,376, 0,378,648, 0, 33,648, 33, 0,648],
|
||||||
[648, 0,648, 0,648,648,249,648,648,219,648,648,648,648,648],
|
[648,381,648,381,648,648,249,648,648,219,648,648,648,492,648],
|
||||||
[648, 0,648, 0, 0,596, 0, 0,648, 0, 0,539, 0, 0,648],
|
[648,482,648, 0, 0,596, 33, 0,492, 0, 0,539, 27, 0,648],
|
||||||
[648, 0,243, 0, 0,648, 0, 0,648, 0, 0,648, 0, 0,648],
|
[648, 0,243,378, 0,648, 0,103,648, 33, 0,648, 0, 28,648],
|
||||||
[648,601,648,648,648,648,243,648,648,648,539,648, 0, 0,648],
|
[648,601,648,492,648,648,243,648,648,648,539,648, 29, 0,648],
|
||||||
[648, 0, 0, 0, 0,648, 0, 0, 0, 0, 0,656, 0, 0,648],
|
[648, 28, 0, 0, 27,648, 0, 0, 34, 0, 0,656, 0,482,648],
|
||||||
[648,648,648,648,648,648,648, 93,648,648,648,648,648,648,648]
|
[648,648,648,648,648,648,648, 93,648,648,648,648,648,648,648]
|
||||||
],
|
],
|
||||||
"bgmap": [
|
"bgmap": [
|
||||||
|
@ -1,45 +1,91 @@
|
|||||||
main.floors.MT54=
|
main.floors.MT54=
|
||||||
{
|
{
|
||||||
"floorId": "MT54",
|
"floorId": "MT54",
|
||||||
"title": "苍蓝之殿-左下",
|
"title": "苍蓝之殿-左下",
|
||||||
"name": "54",
|
"name": "54",
|
||||||
"width": 15,
|
"width": 15,
|
||||||
"height": 15,
|
"height": 15,
|
||||||
"canFlyTo": true,
|
"canFlyTo": true,
|
||||||
"canFlyFrom": true,
|
"canFlyFrom": true,
|
||||||
"canUseQuickShop": true,
|
"canUseQuickShop": true,
|
||||||
"cannotViewMap": false,
|
"cannotViewMap": false,
|
||||||
"images": [],
|
"images": [],
|
||||||
"ratio": 8,
|
"ratio": 8,
|
||||||
"defaultGround": "T650",
|
"defaultGround": "T650",
|
||||||
"bgm": "palaceSouth.mp3",
|
"bgm": "palaceSouth.mp3",
|
||||||
"firstArrive": [],
|
"firstArrive": [],
|
||||||
"eachArrive": [],
|
"eachArrive": [],
|
||||||
"parallelDo": "",
|
"parallelDo": "",
|
||||||
"events": {},
|
"events": {
|
||||||
"changeFloor": {},
|
"9,13": [
|
||||||
"beforeBattle": {},
|
"注意,对于同时拥有二连击、三连击等连击属性时,各连击之间为乘算叠加",
|
||||||
"afterBattle": {},
|
"那个开关一定要试着去触发一下"
|
||||||
"afterGetItem": {},
|
],
|
||||||
"afterOpenDoor": {},
|
"7,9": [
|
||||||
"autoEvent": {},
|
{
|
||||||
"cannotMove": {},
|
"type": "function",
|
||||||
"cannotMoveIn": {},
|
"async": true,
|
||||||
"map": [
|
"function": "function(){\nMota.require('module', 'Mechanism').BluePalace.doorConvert(7, 9);\n}"
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
}
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
]
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
},
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
"changeFloor": {
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
"14,7": {
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
"floorId": "MT53",
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
"loc": [
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
0,
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
7
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
]
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
},
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
"4,14": {
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
"floorId": "MT52",
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
"loc": [
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
4,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"0,7": {
|
||||||
|
"floorId": "MT55",
|
||||||
|
"loc": [
|
||||||
|
14,
|
||||||
|
7
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"beforeBattle": {},
|
||||||
|
"afterBattle": {},
|
||||||
|
"afterGetItem": {},
|
||||||
|
"afterOpenDoor": {},
|
||||||
|
"autoEvent": {},
|
||||||
|
"cannotMove": {},
|
||||||
|
"cannotMoveIn": {},
|
||||||
|
"map": [
|
||||||
|
[648,648,648,648,648,648,648, 91,648,648,648,648,648,648,648],
|
||||||
|
[648, 28, 33,648, 0, 27,648, 0, 0,656, 0,482, 0, 0,648],
|
||||||
|
[648, 33, 27,601, 29, 0,563, 0, 0,648,648,648,648,539,648],
|
||||||
|
[648,648,492,648,648,220,648,648,648,648,487,441,492, 0,648],
|
||||||
|
[648, 0,482, 0,219, 0,103,656, 0,648,594,648,648,578,648],
|
||||||
|
[648, 29, 0, 29,648,378, 0,648,381,494,376,240,378,491,648],
|
||||||
|
[648,648,648,539,648,648,648,648,376,648,648,648,648,648,648],
|
||||||
|
[ 92, 0,648, 0,657,403,482,648,482,492,482,484,648, 0, 94],
|
||||||
|
[648, 0,648, 0,648,648,648,648,656,648,492,648,648, 0,648],
|
||||||
|
[648, 0,656, 0, 27,381,648,660, 21,648, 0, 0, 0, 0,648],
|
||||||
|
[648,648,648,648,103, 21,648,648,648,648,539,648,648,648,648],
|
||||||
|
[648, 28,648, 0, 28,482,648, 0, 27, 0, 33, 0, 28, 0,648],
|
||||||
|
[648, 33,648,596,648,648,648,596,648,648,494,648,648,249,648],
|
||||||
|
[648, 27,243, 0, 0, 0, 0, 0, 0,129,376,378,381,491,648],
|
||||||
|
[648,648,648,648, 93,648,648,648,648,648,648,648,648,648,648]
|
||||||
],
|
],
|
||||||
|
"bgmap": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"fgmap": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"bg2map": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"fg2map": [
|
||||||
|
|
||||||
|
]
|
||||||
}
|
}
|
@ -1,45 +1,73 @@
|
|||||||
main.floors.MT55=
|
main.floors.MT55=
|
||||||
{
|
{
|
||||||
"floorId": "MT55",
|
"floorId": "MT55",
|
||||||
"title": "苍蓝之殿-左下",
|
"title": "苍蓝之殿-左下",
|
||||||
"name": "55",
|
"name": "55",
|
||||||
"width": 15,
|
"width": 15,
|
||||||
"height": 15,
|
"height": 15,
|
||||||
"canFlyTo": true,
|
"canFlyTo": true,
|
||||||
"canFlyFrom": true,
|
"canFlyFrom": true,
|
||||||
"canUseQuickShop": true,
|
"canUseQuickShop": true,
|
||||||
"cannotViewMap": false,
|
"cannotViewMap": false,
|
||||||
"images": [],
|
"images": [],
|
||||||
"ratio": 8,
|
"ratio": 8,
|
||||||
"defaultGround": "T650",
|
"defaultGround": "T650",
|
||||||
"bgm": "palaceSouth.mp3",
|
"bgm": "palaceSouth.mp3",
|
||||||
"firstArrive": [],
|
"firstArrive": [],
|
||||||
"eachArrive": [],
|
"eachArrive": [],
|
||||||
"parallelDo": "",
|
"parallelDo": "",
|
||||||
"events": {},
|
"events": {
|
||||||
"changeFloor": {},
|
"6,7": [
|
||||||
"beforeBattle": {},
|
{
|
||||||
"afterBattle": {},
|
"type": "function",
|
||||||
"afterGetItem": {},
|
"async": true,
|
||||||
"afterOpenDoor": {},
|
"function": "function(){\nMota.require('module', 'Mechanism').BluePalace.doorConvert(6, 7);\n}"
|
||||||
"autoEvent": {},
|
}
|
||||||
"cannotMove": {},
|
]
|
||||||
"cannotMoveIn": {},
|
},
|
||||||
"map": [
|
"changeFloor": {
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
"14,7": {
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
"floorId": "MT54",
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
"loc": [
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
0,
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
7
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
]
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
}
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
},
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
"beforeBattle": {},
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
"afterBattle": {},
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
"afterGetItem": {},
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
"afterOpenDoor": {},
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
"autoEvent": {},
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
"cannotMove": {},
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
"cannotMoveIn": {},
|
||||||
|
"map": [
|
||||||
|
[648,648,648,648,648,648,648, 91,648,648,648,648,648,648,648],
|
||||||
|
[648, 0, 0,648, 0, 0,648, 0,578, 0, 0,648, 0, 0,648],
|
||||||
|
[648, 0, 0,648, 0, 0,219, 0,648, 0, 0,648, 0, 0,648],
|
||||||
|
[648,601,648,648,648,648,648,563,648,648,648,648,657,648,648],
|
||||||
|
[648,103, 0,594, 0, 0,648, 0, 0, 0, 0,648, 33, 27,648],
|
||||||
|
[648, 0, 0,648, 0, 0,648,648,648,648,656,648, 29, 33,648],
|
||||||
|
[648,657,648,648,648,648,648, 0, 27, 0,482,648,648,243,648],
|
||||||
|
[648, 0, 0, 0, 0, 0,660,381,103,648,648,648, 0, 0, 94],
|
||||||
|
[648,648,648,648,492,648,648, 0, 28,656, 0, 0, 0, 0,648],
|
||||||
|
[648, 0, 0,601, 0, 0,648,494,648,648,657,648,648,648,648],
|
||||||
|
[648, 0, 0,648, 0, 0,492, 0, 0, 0, 0,648, 0, 0,648],
|
||||||
|
[648,240,648,648,648,492,648,243,648,648,648,648, 0, 0,648],
|
||||||
|
[648, 0, 0,648, 0, 0,648, 0,648, 0, 0,648,648,220,648],
|
||||||
|
[648, 0, 0,249, 0, 0,648, 0,657, 0, 0, 0, 0, 0,648],
|
||||||
|
[648,648,648,648,648,648,648,648,648,648,648,648,648,648,648]
|
||||||
],
|
],
|
||||||
|
"bgmap": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"fgmap": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"bg2map": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"fg2map": [
|
||||||
|
|
||||||
|
]
|
||||||
}
|
}
|
@ -40,8 +40,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "items",
|
"cls": "items",
|
||||||
"name": "小绿宝石",
|
"name": "小绿宝石",
|
||||||
"text": ",护盾+${core.values.greenGem}",
|
"text": ",护盾+${core.values.greenGem}",
|
||||||
"itemEffect": "core.status.hero.mdef += 20 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1)",
|
"itemEffect": "core.status.hero.mdef += Math.round(20 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1))",
|
||||||
"itemEffectTip": ",智慧+${20 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1)}",
|
"itemEffectTip": ",智慧+${Math.round(20 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1))}",
|
||||||
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
||||||
"canUseItemEffect": "true"
|
"canUseItemEffect": "true"
|
||||||
},
|
},
|
||||||
@ -97,8 +97,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "items",
|
"cls": "items",
|
||||||
"name": "红血瓶",
|
"name": "红血瓶",
|
||||||
"text": ",生命+${core.values.redPotion}",
|
"text": ",生命+${core.values.redPotion}",
|
||||||
"itemEffect": "core.status.hero.hp += 100 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50)",
|
"itemEffect": "core.status.hero.hp += Math.round(100 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50))",
|
||||||
"itemEffectTip": ",生命+${100 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50)}",
|
"itemEffectTip": ",生命+${Math.round(100 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50))}",
|
||||||
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
|
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
|
||||||
"canUseItemEffect": "true"
|
"canUseItemEffect": "true"
|
||||||
},
|
},
|
||||||
@ -106,8 +106,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "items",
|
"cls": "items",
|
||||||
"name": "蓝血瓶",
|
"name": "蓝血瓶",
|
||||||
"text": ",生命+${core.values.bluePotion}",
|
"text": ",生命+${core.values.bluePotion}",
|
||||||
"itemEffect": "core.status.hero.hp += 200 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50)",
|
"itemEffect": "core.status.hero.hp += Math.round(200 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50))",
|
||||||
"itemEffectTip": ",生命+${200 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50)}",
|
"itemEffectTip": ",生命+${Math.round(200 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50))}",
|
||||||
"useItemEffect": "core.status.hero.hp += core.values.bluePotion",
|
"useItemEffect": "core.status.hero.hp += core.values.bluePotion",
|
||||||
"canUseItemEffect": "true"
|
"canUseItemEffect": "true"
|
||||||
},
|
},
|
||||||
@ -115,8 +115,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "items",
|
"cls": "items",
|
||||||
"name": "黄血瓶",
|
"name": "黄血瓶",
|
||||||
"text": ",生命+${core.values.yellowPotion}",
|
"text": ",生命+${core.values.yellowPotion}",
|
||||||
"itemEffect": "core.status.hero.hp += 400 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50)",
|
"itemEffect": "core.status.hero.hp += Math.round(400 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50))",
|
||||||
"itemEffectTip": ",生命+${400 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50)}",
|
"itemEffectTip": ",生命+${Math.round(400 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50))}",
|
||||||
"useItemEffect": "core.status.hero.hp += core.values.yellowPotion",
|
"useItemEffect": "core.status.hero.hp += core.values.yellowPotion",
|
||||||
"canUseItemEffect": "true"
|
"canUseItemEffect": "true"
|
||||||
},
|
},
|
||||||
@ -124,8 +124,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "items",
|
"cls": "items",
|
||||||
"name": "绿血瓶",
|
"name": "绿血瓶",
|
||||||
"text": ",生命+${core.values.greenPotion}",
|
"text": ",生命+${core.values.greenPotion}",
|
||||||
"itemEffect": "core.status.hero.hp += 800 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50)",
|
"itemEffect": "core.status.hero.hp += Math.round(800 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50))",
|
||||||
"itemEffectTip": ",生命+${800 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50)}",
|
"itemEffectTip": ",生命+${Math.round(800 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50))}",
|
||||||
"useItemEffect": "core.status.hero.hp += core.values.greenPotion",
|
"useItemEffect": "core.status.hero.hp += core.values.greenPotion",
|
||||||
"canUseItemEffect": "true"
|
"canUseItemEffect": "true"
|
||||||
},
|
},
|
||||||
@ -626,8 +626,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "items",
|
"cls": "items",
|
||||||
"name": "中绿宝石",
|
"name": "中绿宝石",
|
||||||
"text": ",护盾+${core.values.greenGem}",
|
"text": ",护盾+${core.values.greenGem}",
|
||||||
"itemEffect": "core.status.hero.mdef += 40 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1)",
|
"itemEffect": "core.status.hero.mdef += Math.round(40 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1))",
|
||||||
"itemEffectTip": ",智慧+${40 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1)}",
|
"itemEffectTip": ",智慧+${Math.round(40 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1))}",
|
||||||
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
||||||
"canUseItemEffect": "true"
|
"canUseItemEffect": "true"
|
||||||
},
|
},
|
||||||
@ -729,8 +729,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "items",
|
"cls": "items",
|
||||||
"name": "大绿宝石",
|
"name": "大绿宝石",
|
||||||
"text": ",护盾+${core.values.greenGem}",
|
"text": ",护盾+${core.values.greenGem}",
|
||||||
"itemEffect": "core.status.hero.mdef += 80 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1)",
|
"itemEffect": "core.status.hero.mdef += Math.round(80 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1))",
|
||||||
"itemEffectTip": ",智慧+${80 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1)}",
|
"itemEffectTip": ",智慧+${Math.round(80 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1))}",
|
||||||
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
||||||
"canUseItemEffect": "true"
|
"canUseItemEffect": "true"
|
||||||
},
|
},
|
||||||
@ -896,8 +896,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "items",
|
"cls": "items",
|
||||||
"name": "超大绿宝石",
|
"name": "超大绿宝石",
|
||||||
"text": ",护盾+${core.values.greenGem}",
|
"text": ",护盾+${core.values.greenGem}",
|
||||||
"itemEffect": "core.status.hero.mdef += 160 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1)",
|
"itemEffect": "core.status.hero.mdef += Math.round(160 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1))",
|
||||||
"itemEffectTip": ",智慧+${160 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1)}",
|
"itemEffectTip": ",智慧+${Math.round(160 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1))}",
|
||||||
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
||||||
"canUseItemEffect": "true"
|
"canUseItemEffect": "true"
|
||||||
},
|
},
|
||||||
@ -1019,8 +1019,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "items",
|
"cls": "items",
|
||||||
"name": "璀璨绿宝石",
|
"name": "璀璨绿宝石",
|
||||||
"text": ",护盾+${core.values.greenGem}",
|
"text": ",护盾+${core.values.greenGem}",
|
||||||
"itemEffect": "core.status.hero.mdef += 320 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1)",
|
"itemEffect": "core.status.hero.mdef += Math.round(320 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1))",
|
||||||
"itemEffectTip": ",智慧+${320 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1)}",
|
"itemEffectTip": ",智慧+${Math.round(320 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1))}",
|
||||||
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
||||||
"canUseItemEffect": "true"
|
"canUseItemEffect": "true"
|
||||||
},
|
},
|
||||||
@ -1050,8 +1050,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "items",
|
"cls": "items",
|
||||||
"name": "新物品",
|
"name": "新物品",
|
||||||
"text": ",防御+${core.values.blueGem}",
|
"text": ",防御+${core.values.blueGem}",
|
||||||
"itemEffect": "core.status.hero.mdef += 640 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1)",
|
"itemEffect": "core.status.hero.mdef += Math.round(640 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1))",
|
||||||
"itemEffectTip": ",智慧+${640 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1)}",
|
"itemEffectTip": ",智慧+${Math.round(640 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1))}",
|
||||||
"useItemEffect": "core.status.hero.def += core.values.blueGem",
|
"useItemEffect": "core.status.hero.def += core.values.blueGem",
|
||||||
"canUseItemEffect": "true"
|
"canUseItemEffect": "true"
|
||||||
},
|
},
|
||||||
@ -1071,8 +1071,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "items",
|
"cls": "items",
|
||||||
"name": "史诗绿宝石",
|
"name": "史诗绿宝石",
|
||||||
"text": ",护盾+${core.values.greenGem}",
|
"text": ",护盾+${core.values.greenGem}",
|
||||||
"itemEffect": "core.status.hero.mdef += 1280 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1)",
|
"itemEffect": "core.status.hero.mdef += Math.round(1280 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1))",
|
||||||
"itemEffectTip": ",智慧+${1280 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1)}",
|
"itemEffectTip": ",智慧+${Math.round(1280 * core.status.thisMap.ratio / core.getFlag(\"hard\") * (Mota.Plugin.require('skillTree_g').getSkillLevel(12) / 20 + 1))}",
|
||||||
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
"useItemEffect": "core.status.hero.mdef += core.values.greenGem",
|
||||||
"canUseItemEffect": "true"
|
"canUseItemEffect": "true"
|
||||||
},
|
},
|
||||||
@ -1100,8 +1100,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "items",
|
"cls": "items",
|
||||||
"name": "大红血瓶",
|
"name": "大红血瓶",
|
||||||
"text": ",生命+${core.values.redPotion}",
|
"text": ",生命+${core.values.redPotion}",
|
||||||
"itemEffect": "core.status.hero.hp += 1000 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50)",
|
"itemEffect": "core.status.hero.hp += Math.round(1000 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50))",
|
||||||
"itemEffectTip": ",生命+${1000 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50)}",
|
"itemEffectTip": ",生命+${Math.round(1000 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50))}",
|
||||||
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
|
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
|
||||||
"canUseItemEffect": "true"
|
"canUseItemEffect": "true"
|
||||||
},
|
},
|
||||||
@ -1113,8 +1113,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "items",
|
"cls": "items",
|
||||||
"name": "大蓝血瓶",
|
"name": "大蓝血瓶",
|
||||||
"text": ",生命+${core.values.redPotion}",
|
"text": ",生命+${core.values.redPotion}",
|
||||||
"itemEffect": "core.status.hero.hp += 2000 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50)",
|
"itemEffect": "core.status.hero.hp += Math.round(2000 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50))",
|
||||||
"itemEffectTip": ",生命+${2000 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50)}",
|
"itemEffectTip": ",生命+${Math.round(2000 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50))}",
|
||||||
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
|
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
|
||||||
"canUseItemEffect": "true"
|
"canUseItemEffect": "true"
|
||||||
},
|
},
|
||||||
@ -1130,8 +1130,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "items",
|
"cls": "items",
|
||||||
"name": "大绿血瓶",
|
"name": "大绿血瓶",
|
||||||
"text": ",生命+${core.values.redPotion}",
|
"text": ",生命+${core.values.redPotion}",
|
||||||
"itemEffect": "core.status.hero.hp += 8000 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50)",
|
"itemEffect": "core.status.hero.hp += Math.round(8000 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50))",
|
||||||
"itemEffectTip": ",生命+${8000 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50)}",
|
"itemEffectTip": ",生命+${Math.round(8000 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50))}",
|
||||||
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
|
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
|
||||||
"canUseItemEffect": "true"
|
"canUseItemEffect": "true"
|
||||||
},
|
},
|
||||||
@ -1151,8 +1151,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "items",
|
"cls": "items",
|
||||||
"name": "大黄血瓶",
|
"name": "大黄血瓶",
|
||||||
"text": ",生命+${core.values.redPotion}",
|
"text": ",生命+${core.values.redPotion}",
|
||||||
"itemEffect": "core.status.hero.hp += 4000 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50)",
|
"itemEffect": "core.status.hero.hp += Math.round(4000 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50))",
|
||||||
"itemEffectTip": ",生命+${4000 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50)}",
|
"itemEffectTip": ",生命+${Math.round(4000 * core.status.thisMap.ratio * (1 + Mota.Plugin.require('skillTree_g').getSkillLevel(13) / 50))}",
|
||||||
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
|
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
|
||||||
"canUseItemEffect": "true"
|
"canUseItemEffect": "true"
|
||||||
},
|
},
|
||||||
|
@ -11,11 +11,12 @@ import { setCanvasFilterByFloorId } from '@/plugin/fx/gameCanvas';
|
|||||||
* 最大光源数量,必须设置,且光源数不能超过这个值,这个值决定了会预留多少的缓冲区,因此最好尽可能小,同时游戏过程中不可修改
|
* 最大光源数量,必须设置,且光源数不能超过这个值,这个值决定了会预留多少的缓冲区,因此最好尽可能小,同时游戏过程中不可修改
|
||||||
* 这个值越大,对显卡尤其是显存的要求会越大,不过考虑到各种设备的性能差异,不建议超过10
|
* 这个值越大,对显卡尤其是显存的要求会越大,不过考虑到各种设备的性能差异,不建议超过10
|
||||||
*/
|
*/
|
||||||
const MAX_LIGHT_NUM = 10;
|
const MAX_LIGHT_NUM = 5;
|
||||||
/** 阴影层的Z值 */
|
/** 阴影层的Z值 */
|
||||||
const Z_INDEX = 55;
|
const Z_INDEX = 55;
|
||||||
// 我也不知道这个数怎么来的,试出来是这个,别动就行
|
// 我也不知道这个数怎么来的,试出来是这个,别动就行
|
||||||
const FOVY = Math.PI / 1.86;
|
const FOVY = Math.PI / 1.86;
|
||||||
|
const ignore: Set<AllNumbers> = new Set([660]);
|
||||||
|
|
||||||
interface LightConfig {
|
interface LightConfig {
|
||||||
decay: number;
|
decay: number;
|
||||||
@ -76,7 +77,7 @@ Mota.require('var', 'loading').once('coreInit', () => {
|
|||||||
103,
|
103,
|
||||||
{ decay: 50, r: 300, color: [0.9333, 0.6, 0.333, 0.3] },
|
{ decay: 50, r: 300, color: [0.9333, 0.6, 0.333, 0.3] },
|
||||||
{ background: [0, 0, 0, 0.26] },
|
{ background: [0, 0, 0, 0.26] },
|
||||||
{ decay: 50, r: 200, color: [0, 0, 0, 0] }
|
{ decay: 50, r: 250, color: [0, 0, 0, 0] }
|
||||||
);
|
);
|
||||||
addLightFromBlock(
|
addLightFromBlock(
|
||||||
['MT50'],
|
['MT50'],
|
||||||
@ -97,7 +98,7 @@ Mota.require('var', 'loading').once('coreInit', () => {
|
|||||||
y: core.status.heroCenter.py
|
y: core.status.heroCenter.py
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
shadow.requestRefresh();
|
if (shadow.followHero.size > 0) shadow.requestRefresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -1207,7 +1208,8 @@ export function calMapWalls(floor: FloorIds, nocache: boolean = false) {
|
|||||||
if (
|
if (
|
||||||
!used.has(x + y * width) &&
|
!used.has(x + y * width) &&
|
||||||
requiredCls.includes(block.event.cls) &&
|
requiredCls.includes(block.event.cls) &&
|
||||||
block.event.noPass
|
block.event.noPass &&
|
||||||
|
!ignore.has(block.id)
|
||||||
) {
|
) {
|
||||||
const queue: Block[] = [block];
|
const queue: Block[] = [block];
|
||||||
const arr: [number, number][] = [];
|
const arr: [number, number][] = [];
|
||||||
@ -1233,7 +1235,8 @@ export function calMapWalls(floor: FloorIds, nocache: boolean = false) {
|
|||||||
if (
|
if (
|
||||||
requiredCls.includes(blk.event.cls) &&
|
requiredCls.includes(blk.event.cls) &&
|
||||||
blk.event.noPass &&
|
blk.event.noPass &&
|
||||||
!used.has(blk.x + blk.y * width)
|
!used.has(blk.x + blk.y * width) &&
|
||||||
|
!ignore.has(blk.id)
|
||||||
) {
|
) {
|
||||||
used.add(blk.x + blk.y * width);
|
used.add(blk.x + blk.y * width);
|
||||||
queue.push(blk);
|
queue.push(blk);
|
||||||
|
@ -236,6 +236,11 @@ gameKey
|
|||||||
name: '评论区',
|
name: '评论区',
|
||||||
defaults: KeyCode.KeyP
|
defaults: KeyCode.KeyP
|
||||||
})
|
})
|
||||||
|
.register({
|
||||||
|
id: 'debug',
|
||||||
|
name: '调试模式',
|
||||||
|
defaults: KeyCode.F8
|
||||||
|
})
|
||||||
// --------------------
|
// --------------------
|
||||||
.group('general', '通用按键')
|
.group('general', '通用按键')
|
||||||
.register({
|
.register({
|
||||||
@ -557,6 +562,9 @@ gameKey
|
|||||||
if (flags.shield) flags.shield = false;
|
if (flags.shield) flags.shield = false;
|
||||||
else flags.shield = true;
|
else flags.shield = true;
|
||||||
core.updateStatusBar();
|
core.updateStatusBar();
|
||||||
|
})
|
||||||
|
.realize('debug', () => {
|
||||||
|
core.debug();
|
||||||
});
|
});
|
||||||
|
|
||||||
// ----- Storage
|
// ----- Storage
|
||||||
|
@ -7,6 +7,7 @@ import { specials } from './enemy/special';
|
|||||||
import { gameListener, hook, loading } from './game';
|
import { gameListener, hook, loading } from './game';
|
||||||
import * as battle from './enemy/battle';
|
import * as battle from './enemy/battle';
|
||||||
import * as hero from './hero';
|
import * as hero from './hero';
|
||||||
|
import * as miscMechanism from './mechanism/misc';
|
||||||
|
|
||||||
// ----- 类注册
|
// ----- 类注册
|
||||||
Mota.register('class', 'DamageEnemy', damage.DamageEnemy);
|
Mota.register('class', 'DamageEnemy', damage.DamageEnemy);
|
||||||
@ -25,6 +26,9 @@ Mota.register('var', 'hook', hook);
|
|||||||
Mota.register('var', 'gameListener', gameListener);
|
Mota.register('var', 'gameListener', gameListener);
|
||||||
Mota.register('var', 'loading', loading);
|
Mota.register('var', 'loading', loading);
|
||||||
// ----- 模块注册
|
// ----- 模块注册
|
||||||
|
Mota.register('module', 'Mechanism', {
|
||||||
|
BluePalace: miscMechanism.BluePalace
|
||||||
|
});
|
||||||
|
|
||||||
main.loading = loading;
|
main.loading = loading;
|
||||||
|
|
||||||
|
78
src/game/mechanism/misc.ts
Normal file
78
src/game/mechanism/misc.ts
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
import { has } from '@/plugin/game/utils';
|
||||||
|
|
||||||
|
export namespace BluePalace {
|
||||||
|
type DoorConvertInfo = [id: AllIds, x: number, y: number];
|
||||||
|
|
||||||
|
function drawDoors(
|
||||||
|
ctx: CanvasRenderingContext2D,
|
||||||
|
convert: DoorConvertInfo[],
|
||||||
|
frame: number
|
||||||
|
) {
|
||||||
|
ctx.clearRect(0, 0, 480, 480);
|
||||||
|
convert.forEach(v => {
|
||||||
|
core.drawIcon(ctx, v[0], v[1] * 32, v[2] * 32, 32, 32, frame);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function doorConvert(
|
||||||
|
x?: number,
|
||||||
|
y?: number,
|
||||||
|
floorId: FloorIds = core.status.floorId
|
||||||
|
) {
|
||||||
|
core.autosave();
|
||||||
|
core.extractBlocks(floorId);
|
||||||
|
const blocks = core.status.maps[floorId].blocks;
|
||||||
|
|
||||||
|
const ctx = core.createCanvas(`@doorConvert`, 0, 0, 480, 480, 35);
|
||||||
|
const time = core.values.animateSpeed / 4;
|
||||||
|
|
||||||
|
const toConvert: DoorConvertInfo[] = [];
|
||||||
|
blocks.forEach(v => {
|
||||||
|
if (v.id === 492) {
|
||||||
|
core.setBlock(494, v.x, v.y, floorId);
|
||||||
|
toConvert.push(['A492', v.x, v.y]);
|
||||||
|
} else if (v.id === 494) {
|
||||||
|
core.setBlock(492, v.x, v.y, floorId);
|
||||||
|
toConvert.push(['A494', v.x, v.y]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (has(x) && has(y)) {
|
||||||
|
core.removeBlock(x, y, floorId);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (core.isReplaying() || core.status.floorId !== floorId) {
|
||||||
|
core.doAction();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
core.lockControl();
|
||||||
|
core.playSound('door.mp3');
|
||||||
|
|
||||||
|
new Promise<void>(res => {
|
||||||
|
drawDoors(ctx, toConvert, 0);
|
||||||
|
setTimeout(res, time);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
drawDoors(ctx, toConvert, 1);
|
||||||
|
return new Promise<void>(res => {
|
||||||
|
setTimeout(res, time);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
drawDoors(ctx, toConvert, 2);
|
||||||
|
return new Promise<void>(res => {
|
||||||
|
setTimeout(res, time);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
drawDoors(ctx, toConvert, 3);
|
||||||
|
return new Promise<void>(res => {
|
||||||
|
core.unlockControl();
|
||||||
|
core.deleteCanvas('@doorConvert');
|
||||||
|
core.doAction();
|
||||||
|
setTimeout(res, time);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -24,6 +24,7 @@ import type * as hero from './hero';
|
|||||||
import type * as damage from './enemy/damage';
|
import type * as damage from './enemy/damage';
|
||||||
import type { Logger } from '@/core/common/logger';
|
import type { Logger } from '@/core/common/logger';
|
||||||
import type { Danmaku } from '@/core/main/custom/danmaku';
|
import type { Danmaku } from '@/core/main/custom/danmaku';
|
||||||
|
import type * as misc from './mechanism/misc';
|
||||||
|
|
||||||
interface ClassInterface {
|
interface ClassInterface {
|
||||||
// 渲染进程与游戏进程通用
|
// 渲染进程与游戏进程通用
|
||||||
@ -85,7 +86,11 @@ interface VariableInterface {
|
|||||||
logger: Logger;
|
logger: Logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ModuleInterface {}
|
interface ModuleInterface {
|
||||||
|
Mechanism: {
|
||||||
|
BluePalace: typeof misc.BluePalace;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
interface SystemInterfaceMap {
|
interface SystemInterfaceMap {
|
||||||
class: ClassInterface;
|
class: ClassInterface;
|
||||||
|
@ -132,7 +132,8 @@ function checkMockery(loc: string, force: boolean = false) {
|
|||||||
'npcs',
|
'npcs',
|
||||||
'npc48',
|
'npc48',
|
||||||
'terrains'
|
'terrains'
|
||||||
].includes(block.event.cls)
|
].includes(block.event.cls) &&
|
||||||
|
block.event.noPass
|
||||||
) {
|
) {
|
||||||
action.push(
|
action.push(
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user