feat: 黄蓝门转换机制

This commit is contained in:
unanmed 2024-04-30 21:01:43 +08:00
parent 6417d9218b
commit 763ff0f3e7
15 changed files with 332 additions and 144 deletions

View File

@ -291,10 +291,10 @@ editor_multi = function () {
_previewButton.onclick = function () {
if (!editor_multi.preview) return;
_format();
if (editor_multi.hasError()) {
alert("当前好像存在严重的语法错误,请处理后再预览。");
return;
}
// if (editor_multi.hasError()) {
// alert("当前好像存在严重的语法错误,请处理后再预览。");
// return;
// }
editor.uievent.previewEditorMulti(editor_multi.preview, codeEditor.getValue());
}
@ -350,10 +350,10 @@ editor_multi = function () {
}
editor_multi.confirm = function (keep) {
if (editor_multi.hasError()) {
alert("当前好像存在严重的语法错误,请处理后再保存。\n严重的语法错误可能会导致整个编辑器的崩溃。");
return;
}
// if (editor_multi.hasError()) {
// alert("当前好像存在严重的语法错误,请处理后再保存。\n严重的语法错误可能会导致整个编辑器的崩溃。");
// return;
// }
if (!editor_multi.id) {
editor_multi.id = '';

View File

@ -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":[]},
"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},
"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":[]},
"E659": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}
}

View File

@ -31,7 +31,8 @@ main.floors.MT50=
"欢迎来到苍蓝之殿,这是本塔第二章里面最大的一个区,也是最复杂的一个区。整个苍蓝之殿分为无个部分:左下角、右下角、左上角、右上角和中心,每个部分都有不一样的玩法,多多动脑哦。"
],
"9,13": [
"在你刚进入苍蓝之殿时,你只能先前往左下角部分(本地图的左面),右下角暂时不能前往。注意往上走往左依然可以进入左下角,不要只盯着这个地图的左边不放。"
"在你刚进入苍蓝之殿时,你只能先前往左下角部分(本地图的左面),右下角暂时不能前往。注意往上走往左依然可以进入左下角,不要只盯着这个地图的左边不放。",
"注意火炬可通行,而且跳跃时会跳过火炬,不会跳到火炬上"
],
"9,1": [
"建议优先点出学习技能,对于特定场景将会非常有帮助",

View File

@ -92,7 +92,7 @@ main.floors.MT51=
[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, 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],
[ 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],

View File

@ -24,6 +24,13 @@ main.floors.MT52=
0,
8
]
},
"4,0": {
"floorId": "MT54",
"loc": [
4,
14
]
}
},
"beforeBattle": {},

View File

@ -24,6 +24,13 @@ main.floors.MT53=
7,
0
]
},
"0,7": {
"floorId": "MT54",
"loc": [
14,
7
]
}
},
"beforeBattle": {},
@ -34,20 +41,20 @@ main.floors.MT53=
"cannotMove": {},
"cannotMoveIn": {},
"map": [
[648,648,648,648,648,648,648,648,648,648,648,648,648,648,648],
[648,656, 0,219,648, 0, 0, 0,243, 0, 0,492,482,482,648],
[648, 0,648, 0,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,563,492, 0, 0, 0,648, 0, 0,240, 0, 0,648],
[648, 0,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],
[ 92, 0,648, 0,648, 0, 21, 0,648, 0, 0,220, 0, 0, 94],
[648,648,648, 0,648,376, 0,378,648, 0, 0,648, 0, 0,648],
[648, 0,648, 0,648,648,249,648,648,219,648,648,648,648,648],
[648, 0,648, 0, 0,596, 0, 0,648, 0, 0,539, 0, 0,648],
[648, 0,243, 0, 0,648, 0, 0,648, 0, 0,648, 0, 0,648],
[648,601,648,648,648,648,243,648,648,648,539,648, 0, 0,648],
[648, 0, 0, 0, 0,648, 0, 0, 0, 0, 0,656, 0, 0,648],
[648,648,648,648,648,648,648, 91,648,648,648,648,648,648,648],
[648,656, 34,219,648, 0,482, 0,243, 29, 33,492,482,482,648],
[648, 0,648,381,648,648,648,578,648,648,656,648,648,648,648],
[648, 0,648,482,648, 27,484, 28,648,381, 0,648,376,403,648],
[648, 0,648,563,492, 0,381, 0,648, 0, 34,240,484,378,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, 33,648, 33, 0,648],
[ 92, 0,648,482,648, 0, 21, 0,648,103, 0,220, 0, 0, 94],
[648,492,648, 0,648,376, 0,378,648, 0, 33,648, 33, 0,648],
[648,381,648,381,648,648,249,648,648,219,648,648,648,492,648],
[648,482,648, 0, 0,596, 33, 0,492, 0, 0,539, 27, 0,648],
[648, 0,243,378, 0,648, 0,103,648, 33, 0,648, 0, 28,648],
[648,601,648,492,648,648,243,648,648,648,539,648, 29, 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]
],
"bgmap": [

View File

@ -16,8 +16,42 @@ main.floors.MT54=
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {},
"events": {
"9,13": [
"注意,对于同时拥有二连击、三连击等连击属性时,各连击之间为乘算叠加",
"那个开关一定要试着去触发一下"
],
"7,9": [
{
"type": "function",
"async": true,
"function": "function(){\nMota.require('module', 'Mechanism').BluePalace.doorConvert(7, 9);\n}"
}
]
},
"changeFloor": {
"14,7": {
"floorId": "MT53",
"loc": [
0,
7
]
},
"4,14": {
"floorId": "MT52",
"loc": [
4,
0
]
},
"0,7": {
"floorId": "MT55",
"loc": [
14,
7
]
}
},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
@ -26,20 +60,32 @@ main.floors.MT54=
"cannotMove": {},
"cannotMoveIn": {},
"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]
[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": [
]
}

View File

@ -16,8 +16,24 @@ main.floors.MT55=
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {},
"events": {
"6,7": [
{
"type": "function",
"async": true,
"function": "function(){\nMota.require('module', 'Mechanism').BluePalace.doorConvert(6, 7);\n}"
}
]
},
"changeFloor": {
"14,7": {
"floorId": "MT54",
"loc": [
0,
7
]
}
},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
@ -26,20 +42,32 @@ main.floors.MT55=
"cannotMove": {},
"cannotMoveIn": {},
"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]
[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": [
]
}

View File

@ -40,8 +40,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "小绿宝石",
"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)",
"itemEffectTip": ",智慧+${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": ",智慧+${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",
"canUseItemEffect": "true"
},
@ -97,8 +97,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "红血瓶",
"text": ",生命+${core.values.redPotion}",
"itemEffect": "core.status.hero.hp += 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)}",
"itemEffect": "core.status.hero.hp += Math.round(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",
"canUseItemEffect": "true"
},
@ -106,8 +106,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "蓝血瓶",
"text": ",生命+${core.values.bluePotion}",
"itemEffect": "core.status.hero.hp += 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)}",
"itemEffect": "core.status.hero.hp += Math.round(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",
"canUseItemEffect": "true"
},
@ -115,8 +115,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "黄血瓶",
"text": ",生命+${core.values.yellowPotion}",
"itemEffect": "core.status.hero.hp += 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)}",
"itemEffect": "core.status.hero.hp += Math.round(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",
"canUseItemEffect": "true"
},
@ -124,8 +124,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "绿血瓶",
"text": ",生命+${core.values.greenPotion}",
"itemEffect": "core.status.hero.hp += 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)}",
"itemEffect": "core.status.hero.hp += Math.round(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",
"canUseItemEffect": "true"
},
@ -626,8 +626,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "中绿宝石",
"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)",
"itemEffectTip": ",智慧+${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": ",智慧+${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",
"canUseItemEffect": "true"
},
@ -729,8 +729,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "大绿宝石",
"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)",
"itemEffectTip": ",智慧+${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": ",智慧+${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",
"canUseItemEffect": "true"
},
@ -896,8 +896,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "超大绿宝石",
"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)",
"itemEffectTip": ",智慧+${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": ",智慧+${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",
"canUseItemEffect": "true"
},
@ -1019,8 +1019,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "璀璨绿宝石",
"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)",
"itemEffectTip": ",智慧+${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": ",智慧+${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",
"canUseItemEffect": "true"
},
@ -1050,8 +1050,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "新物品",
"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)",
"itemEffectTip": ",智慧+${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": ",智慧+${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",
"canUseItemEffect": "true"
},
@ -1071,8 +1071,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "史诗绿宝石",
"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)",
"itemEffectTip": ",智慧+${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": ",智慧+${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",
"canUseItemEffect": "true"
},
@ -1100,8 +1100,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "大红血瓶",
"text": ",生命+${core.values.redPotion}",
"itemEffect": "core.status.hero.hp += 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)}",
"itemEffect": "core.status.hero.hp += Math.round(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",
"canUseItemEffect": "true"
},
@ -1113,8 +1113,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "大蓝血瓶",
"text": ",生命+${core.values.redPotion}",
"itemEffect": "core.status.hero.hp += 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)}",
"itemEffect": "core.status.hero.hp += Math.round(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",
"canUseItemEffect": "true"
},
@ -1130,8 +1130,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "大绿血瓶",
"text": ",生命+${core.values.redPotion}",
"itemEffect": "core.status.hero.hp += 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)}",
"itemEffect": "core.status.hero.hp += Math.round(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",
"canUseItemEffect": "true"
},
@ -1151,8 +1151,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "大黄血瓶",
"text": ",生命+${core.values.redPotion}",
"itemEffect": "core.status.hero.hp += 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)}",
"itemEffect": "core.status.hero.hp += Math.round(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",
"canUseItemEffect": "true"
},

View File

@ -11,11 +11,12 @@ import { setCanvasFilterByFloorId } from '@/plugin/fx/gameCanvas';
*
* 10
*/
const MAX_LIGHT_NUM = 10;
const MAX_LIGHT_NUM = 5;
/** 阴影层的Z值 */
const Z_INDEX = 55;
// 我也不知道这个数怎么来的,试出来是这个,别动就行
const FOVY = Math.PI / 1.86;
const ignore: Set<AllNumbers> = new Set([660]);
interface LightConfig {
decay: number;
@ -76,7 +77,7 @@ Mota.require('var', 'loading').once('coreInit', () => {
103,
{ decay: 50, r: 300, color: [0.9333, 0.6, 0.333, 0.3] },
{ 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(
['MT50'],
@ -97,7 +98,7 @@ Mota.require('var', 'loading').once('coreInit', () => {
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 (
!used.has(x + y * width) &&
requiredCls.includes(block.event.cls) &&
block.event.noPass
block.event.noPass &&
!ignore.has(block.id)
) {
const queue: Block[] = [block];
const arr: [number, number][] = [];
@ -1233,7 +1235,8 @@ export function calMapWalls(floor: FloorIds, nocache: boolean = false) {
if (
requiredCls.includes(blk.event.cls) &&
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);
queue.push(blk);

View File

@ -236,6 +236,11 @@ gameKey
name: '评论区',
defaults: KeyCode.KeyP
})
.register({
id: 'debug',
name: '调试模式',
defaults: KeyCode.F8
})
// --------------------
.group('general', '通用按键')
.register({
@ -557,6 +562,9 @@ gameKey
if (flags.shield) flags.shield = false;
else flags.shield = true;
core.updateStatusBar();
})
.realize('debug', () => {
core.debug();
});
// ----- Storage

View File

@ -7,6 +7,7 @@ import { specials } from './enemy/special';
import { gameListener, hook, loading } from './game';
import * as battle from './enemy/battle';
import * as hero from './hero';
import * as miscMechanism from './mechanism/misc';
// ----- 类注册
Mota.register('class', 'DamageEnemy', damage.DamageEnemy);
@ -25,6 +26,9 @@ Mota.register('var', 'hook', hook);
Mota.register('var', 'gameListener', gameListener);
Mota.register('var', 'loading', loading);
// ----- 模块注册
Mota.register('module', 'Mechanism', {
BluePalace: miscMechanism.BluePalace
});
main.loading = loading;

View 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);
});
});
}
}

View File

@ -24,6 +24,7 @@ import type * as hero from './hero';
import type * as damage from './enemy/damage';
import type { Logger } from '@/core/common/logger';
import type { Danmaku } from '@/core/main/custom/danmaku';
import type * as misc from './mechanism/misc';
interface ClassInterface {
// 渲染进程与游戏进程通用
@ -85,7 +86,11 @@ interface VariableInterface {
logger: Logger;
}
interface ModuleInterface {}
interface ModuleInterface {
Mechanism: {
BluePalace: typeof misc.BluePalace;
};
}
interface SystemInterfaceMap {
class: ClassInterface;

View File

@ -132,7 +132,8 @@ function checkMockery(loc: string, force: boolean = false) {
'npcs',
'npc48',
'terrains'
].includes(block.event.cls)
].includes(block.event.cls) &&
block.event.noPass
) {
action.push(
{