From c7f7cf280bfc66af6dd0bc4a8b2ccc5df74cd4a0 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Fri, 27 Sep 2024 22:04:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=87=A0=E4=B8=AA=E6=96=B0=E6=A5=BC?= =?UTF-8?q?=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/libs/events.js | 2 + public/project/enemys.js | 4 +- public/project/floors/MT73.js | 7 ++ public/project/floors/MT74.js | 7 ++ public/project/floors/MT75.js | 13 ++- public/project/floors/MT85.js | 54 ++++++++---- public/project/floors/MT86.js | 114 ++++++++++++++++--------- public/project/floors/MT87.js | 128 +++++++++++++++++++--------- public/project/floors/MT88.js | 109 ++++++++++++++--------- public/project/floors/MT89.js | 109 ++++++++++++++--------- src/game/enemy/damage.ts | 116 ------------------------- src/plugin/game/dev/hotReload.js | 1 + src/plugin/game/enemy/checkblock.ts | 7 +- src/plugin/game/fallback.ts | 4 + src/plugin/game/skill.ts | 1 + 15 files changed, 373 insertions(+), 303 deletions(-) diff --git a/public/libs/events.js b/public/libs/events.js index f06d6cd..d731916 100644 --- a/public/libs/events.js +++ b/public/libs/events.js @@ -1833,6 +1833,8 @@ events.prototype._action_jumpHero = function (data, x, y, prefix) { } else { loc = this.__action_getHeroLoc(data.loc, prefix); } + console.log(1); + this.__action_doAsyncFunc( data.async, core.jumpHero, diff --git a/public/project/enemys.js b/public/project/enemys.js index 4d16f63..f7c543a 100644 --- a/public/project/enemys.js +++ b/public/project/enemys.js @@ -168,7 +168,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = "E617": {"name":"冰封雕像","hp":12500,"atk":2750,"def":2000,"money":2,"exp":150,"point":0,"special":[]}, "E618": {"name":"圣殿守卫","hp":30000,"atk":12500,"def":7500,"money":10,"exp":1000,"point":0,"special":[]}, "E643": {"name":"苍蓝史莱姆","hp":17500,"atk":2800,"def":2000,"money":3,"exp":175,"point":0,"special":[28],"paleShield":30}, - "E644": {"name":"苍蓝融合怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[32],"assimilateRange":2}, + "E644": {"name":"苍蓝融合怪","hp":40000,"atk":7500,"def":5000,"money":8,"exp":1000,"point":0,"special":[32],"assimilateRange":2}, "E645": {"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}, @@ -186,7 +186,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = "E673": {"name":"苍蓝之灵-域","hp":250000,"atk":12000,"def":3000,"money":10,"exp":2500,"point":0,"special":[]}, "E674": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E675": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, - "E676": {"name":"冲锋骷髅","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[12]}, + "E676": {"name":"冲锋骷髅","hp":50000,"atk":8000,"def":4000,"money":6,"exp":500,"point":0,"special":[12]}, "E677": {"name":"骷髅巫师","hp":150000,"atk":2000,"def":5000,"money":5,"exp":600,"point":0,"special":[13],"crit":null}, "E678": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E679": {"name":"剑盾之卫","hp":30000,"atk":10000,"def":6000,"money":7,"exp":700,"point":0,"special":[1],"crit":600}, diff --git a/public/project/floors/MT73.js b/public/project/floors/MT73.js index d22271f..b470c1a 100644 --- a/public/project/floors/MT73.js +++ b/public/project/floors/MT73.js @@ -43,6 +43,13 @@ main.floors.MT73= 14, 7 ] + }, + "14,7": { + "floorId": "MT88", + "loc": [ + 0, + 7 + ] } }, "beforeBattle": {}, diff --git a/public/project/floors/MT74.js b/public/project/floors/MT74.js index 456a715..d3b46a2 100644 --- a/public/project/floors/MT74.js +++ b/public/project/floors/MT74.js @@ -38,6 +38,13 @@ main.floors.MT74= 14, 7 ] + }, + "14,7": { + "floorId": "MT87", + "loc": [ + 0, + 7 + ] } }, "beforeBattle": {}, diff --git a/public/project/floors/MT75.js b/public/project/floors/MT75.js index 5815237..e1392a3 100644 --- a/public/project/floors/MT75.js +++ b/public/project/floors/MT75.js @@ -31,6 +31,13 @@ main.floors.MT75= 14, 7 ] + }, + "14,7": { + "floorId": "MT85", + "loc": [ + 0, + 7 + ] } }, "beforeBattle": {}, @@ -42,14 +49,14 @@ main.floors.MT75= "cannotMoveIn": {}, "map": [ [648,648,648,648,648,648,648,648,648,648,648,648,648,648,648], - [648,491,491,494,491,494, 0, 0, 0,494,491,494,491,491,648], + [648,491,491,494,491,494,657,676, 0,494,491,494,491,491,648], [648,648,648,648,648,648,644,682,659,648,648,648,648,648,648], [648,484,484,492,484,492,578,677,679,492,484,492,484,484,648], [648,648,648,648,648,648,618,249,513,648,648,648,648,648,648], [648, 0, 0, 0, 0,103,232,658,671,103, 0, 0, 0, 0,648], - [648, 0, 0, 0, 0,676, 0, 0, 0, 0, 0, 0, 0, 0,648], + [648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,648], [ 92, 0, 0,672, 0, 0, 0, 0, 0, 0, 0,599, 0, 0, 94], - [648, 0, 0, 0, 0, 0, 0,657, 0, 0, 0, 0, 0, 0,648], + [648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,648], [648, 0, 0, 0, 0,103, 0, 0, 0,103, 0, 0, 0, 0,648], [648,648,648,648,648,648, 0, 0, 0,648,648,648,648,648,648], [648,484,484,492,484,492, 0, 0, 0,492,484,492,484,484,648], diff --git a/public/project/floors/MT85.js b/public/project/floors/MT85.js index 321255d..2a8c97d 100644 --- a/public/project/floors/MT85.js +++ b/public/project/floors/MT85.js @@ -17,7 +17,29 @@ main.floors.MT85= "eachArrive": [], "parallelDo": "", "events": {}, - "changeFloor": {}, + "changeFloor": { + "0,7": { + "floorId": "MT75", + "loc": [ + 14, + 7 + ] + }, + "14,3": { + "floorId": "MT86", + "loc": [ + 0, + 4 + ] + }, + "10,14": { + "floorId": "MT87", + "loc": [ + 10, + 0 + ] + } + }, "beforeBattle": {}, "afterBattle": {}, "afterGetItem": {}, @@ -26,21 +48,21 @@ main.floors.MT85= "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,648,648,648,648,648,648,648,648], + [648, 0, 0, 0, 0,484, 0, 0, 0, 0,676,648, 0, 0,648], + [648,679,648,648,513,648,648,648,648,648, 0,648, 0,484,648], + [648,491, 0,648, 27,484,648, 0, 28,648, 0,648,484, 0, 94], + [648, 0,378,648,381, 28,492,491, 0,492, 0,578, 0, 0,648], + [648,648,648,648,648,648,648,648,659,648, 0,648,648,513,648], + [648, 0,484,648, 0,578, 0,648, 0,648, 0,648, 28, 0,648], + [ 92, 0, 0,249,482,648, 29, 0,484,648, 0,648, 0, 27,648], + [648, 0,484,648, 0,648,648,648,648,648,484,648,648,618,648], + [648,648,648,648, 27, 0,492, 21,376,677, 0, 0,648,381,648], + [648,484, 0,682, 0, 0,648,648,648,648,648,658,648,491,648], + [648,658,648,648,648,682,648,378, 0,578, 29, 0,648,376,648], + [648, 0,491,648, 0, 28,648, 0, 0,648, 0, 0,648, 22,648], + [648, 27, 0,492,484, 0,682, 0,484,648, 0, 29,494,378,648], + [648,648,648,648,648,648,648,648,648,648, 93,648,648,648,648] ], "bgmap": [ diff --git a/public/project/floors/MT86.js b/public/project/floors/MT86.js index 0febebc..8d16a35 100644 --- a/public/project/floors/MT86.js +++ b/public/project/floors/MT86.js @@ -1,45 +1,77 @@ main.floors.MT86= { -"floorId": "MT86", -"title": "苍蓝之殿-右上", -"name": "86", -"width": 15, -"height": 15, -"canFlyTo": true, -"canFlyFrom": true, -"canUseQuickShop": true, -"cannotViewMap": false, -"images": [], -"ratio": 8, -"defaultGround": "T650", -"bgm": "palaceNorth.mp3", -"firstArrive": [], -"eachArrive": [], -"parallelDo": "", -"events": {}, -"changeFloor": {}, -"beforeBattle": {}, -"afterBattle": {}, -"afterGetItem": {}, -"afterOpenDoor": {}, -"autoEvent": {}, -"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] + "floorId": "MT86", + "title": "苍蓝之殿-右上", + "name": "86", + "width": 15, + "height": 15, + "canFlyTo": true, + "canFlyFrom": true, + "canUseQuickShop": true, + "cannotViewMap": false, + "images": [], + "ratio": 8, + "defaultGround": "T650", + "bgm": "palaceNorth.mp3", + "firstArrive": [], + "eachArrive": [], + "parallelDo": "", + "events": { + "3,4": [ + "同化怪加上追猎属性后,如果其移动一步后与勇士战斗,那么其特殊属性会继承自移动后的位置,而非移动前", + "例如本地图右边的同化怪,当其向下移动一步后,将不再会受到蓝骑士的二连击属性加成,战斗伤害会变低" + ] + }, + "changeFloor": { + "0,4": { + "floorId": "MT85", + "loc": [ + 14, + 3 + ] + }, + "7,14": { + "floorId": "MT89", + "loc": [ + 7, + 0 + ] + } + }, + "beforeBattle": {}, + "afterBattle": {}, + "afterGetItem": {}, + "afterOpenDoor": {}, + "autoEvent": {}, + "cannotMove": {}, + "cannotMoveIn": {}, + "map": [ + [648,648,648,648,648,648,648,648,648,648,648,648,648,648,648], + [648,491,376,491, 0,648, 0, 0,482, 0, 0,482, 0, 0,648], + [648,648,648,648,671,648,676,648,648,648,648,677,648,492,648], + [648, 0, 0,648, 0,648, 0, 0,232,487,648, 0, 27, 0,648], + [ 92, 0, 0,129,484, 0,378, 0,648,487,492,484, 0,484,648], + [648,249,648,648,648,494,648,648,648,644,648,648,648,249,648], + [648, 0,484,648,376, 21,378,648, 29, 0,648,484, 0,484,648], + [648, 0, 0,648,484,403,484,648, 0,484,578, 0, 28, 0, 94], + [648, 29, 0,648,648,618,648,648,657,648,648,648,648,494,648], + [648,648,657,648,682, 0, 0, 0,103,658, 28, 0,648,378,648], + [648, 0, 0,491, 0,648,648,682,648,648, 0,491,648, 0,648], + [648,648,648,648,513, 0,648,484,484,648, 27, 0,648,376,648], + [648,484,381,648,648, 0,648,648,538,648,648,648,648, 0,648], + [648,376,484,679, 0,491,492, 0, 0,484, 0, 0,232,491,648], + [648,648,648,648,648,648,648, 93,648,648,648,648,648,648,648] ], + "bgmap": [ + +], + "fgmap": [ + +], + "bg2map": [ + +], + "fg2map": [ + +] } \ No newline at end of file diff --git a/public/project/floors/MT87.js b/public/project/floors/MT87.js index 7c2c47b..5c8c4cd 100644 --- a/public/project/floors/MT87.js +++ b/public/project/floors/MT87.js @@ -1,45 +1,91 @@ main.floors.MT87= { -"floorId": "MT87", -"title": "苍蓝之殿-右上", -"name": "87", -"width": 15, -"height": 15, -"canFlyTo": true, -"canFlyFrom": true, -"canUseQuickShop": true, -"cannotViewMap": false, -"images": [], -"ratio": 8, -"defaultGround": "T650", -"bgm": "palaceNorth.mp3", -"firstArrive": [], -"eachArrive": [], -"parallelDo": "", -"events": {}, -"changeFloor": {}, -"beforeBattle": {}, -"afterBattle": {}, -"afterGetItem": {}, -"afterOpenDoor": {}, -"autoEvent": {}, -"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] + "floorId": "MT87", + "title": "苍蓝之殿-右上", + "name": "87", + "width": 15, + "height": 15, + "canFlyTo": true, + "canFlyFrom": true, + "canUseQuickShop": true, + "cannotViewMap": false, + "images": [], + "ratio": 8, + "defaultGround": "T650", + "bgm": "palaceNorth.mp3", + "firstArrive": [], + "eachArrive": [], + "parallelDo": "", + "events": { + "1,9": [ + "对于连击属性,如果一个同化怪同时拥有了“2连击”“3连击”或“n连击”,那么即使该同化怪的特殊属性是加算,不同连击属性之间依然会视为乘算,而“n连击”之间则为加算", + "例如,一个怪同时拥有3连击与6连击,那么怪物实际表现就是18连击" + ] + }, + "changeFloor": { + "0,7": { + "floorId": "MT74", + "loc": [ + 14, + 7 + ] + }, + "10,0": { + "floorId": "MT85", + "loc": [ + 10, + 14 + ] + }, + "7,14": { + "floorId": "MT88", + "loc": [ + 7, + 0 + ] + }, + "14,7": { + "floorId": "MT89", + "loc": [ + 0, + 7 + ] + } + }, + "beforeBattle": {}, + "afterBattle": {}, + "afterGetItem": {}, + "afterOpenDoor": {}, + "autoEvent": {}, + "cannotMove": {}, + "cannotMoveIn": {}, + "map": [ + [648,648,648,648,648,648,648,648,648,648, 91,648,648,648,648], + [648,484,376,484, 0,648, 0,249, 0,484, 0,513, 0,381,648], + [648,648,648,648,679,648,491,648, 28,103, 28,648,484, 0,648], + [648, 0,482,648, 0,648,494,648,648,644,648,648,648,492,648], + [648, 29, 0,578, 0,648,491,648, 27,103, 27,648,484, 0,648], + [648,648,249,648, 0,657, 0,578, 0,484, 0,657, 0, 29,648], + [648, 0,484,648,648,648,648,648,648,648,648,648,682,648,648], + [ 92, 0, 0,492, 0,491, 0,682, 0,484,658,484, 0, 0, 94], + [648, 0,484,648,648,648,648,648, 28, 0,648, 0, 27, 0,648], + [648,129,648,648, 27, 0, 29,648,648,648,648,648,648,677,648], + [648,378,487,232, 0,484, 0,648, 21, 0,484,648, 29, 0,648], + [648,648,648,648,648,648,677,648,648,648,682,648, 0,484,648], + [648,491, 27,671,491,648,482, 0,482,659, 0,648,657,648,648], + [648, 28,491,648, 0,513, 0, 0, 0,648, 0,682, 0, 0,648], + [648,648,648,648,648,648,648, 93,648,648,648,648,648,648,648] ], + "bgmap": [ + +], + "fgmap": [ + +], + "bg2map": [ + +], + "fg2map": [ + +] } \ No newline at end of file diff --git a/public/project/floors/MT88.js b/public/project/floors/MT88.js index 1724096..de39ef1 100644 --- a/public/project/floors/MT88.js +++ b/public/project/floors/MT88.js @@ -1,45 +1,72 @@ main.floors.MT88= { -"floorId": "MT88", -"title": "苍蓝之殿-右上", -"name": "88", -"width": 15, -"height": 15, -"canFlyTo": true, -"canFlyFrom": true, -"canUseQuickShop": true, -"cannotViewMap": false, -"images": [], -"ratio": 8, -"defaultGround": "T650", -"bgm": "palaceNorth.mp3", -"firstArrive": [], -"eachArrive": [], -"parallelDo": "", -"events": {}, -"changeFloor": {}, -"beforeBattle": {}, -"afterBattle": {}, -"afterGetItem": {}, -"afterOpenDoor": {}, -"autoEvent": {}, -"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] + "floorId": "MT88", + "title": "苍蓝之殿-右上", + "name": "88", + "width": 15, + "height": 15, + "canFlyTo": true, + "canFlyFrom": true, + "canUseQuickShop": true, + "cannotViewMap": false, + "images": [], + "ratio": 8, + "defaultGround": "T650", + "bgm": "palaceNorth.mp3", + "firstArrive": [], + "eachArrive": [], + "parallelDo": "", + "events": {}, + "changeFloor": { + "0,7": { + "floorId": "MT73", + "loc": [ + 14, + 7 + ] + }, + "7,0": { + "floorId": "MT87", + "loc": [ + 7, + 14 + ] + } + }, + "beforeBattle": {}, + "afterBattle": {}, + "afterGetItem": {}, + "afterOpenDoor": {}, + "autoEvent": {}, + "cannotMove": {}, + "cannotMoveIn": {}, + "map": [ + [648,648,648,648,648,648,648, 91,648,648,648,648,648,648,648], + [648, 0,677, 0,491,657, 0, 0, 0, 0,492, 0, 0,491,648], + [648,484,648,648,648,648,484, 0,484, 0,648,648,648, 0,648], + [648, 0,648, 0,484,648,492,648,648,243,648,482,648,682,648], + [648, 27,648, 29, 0,648, 0,682, 0,484,648, 0,682, 0,648], + [648,492,648,648,658,648,491,648, 29, 0,648, 0,648,491,648], + [648, 0,484,648, 0,657, 0,648,648,492,648,482,648,648,648], + [ 92, 0, 0,578, 0,648, 0,682, 0,381,578, 0,679,487,648], + [648, 0,484,648,491,648,538,648,648, 0,648, 0,648,487,648], + [648,648,648,648, 0,648, 0,491,648,249,648, 0,648,648,648], + [648, 28,682, 0,682,648, 27, 0,648, 27,648, 0,648,482,648], + [648, 0,648,648,648,648,648,492,648, 0,648, 0,648, 0, 94], + [648, 0,648,484, 27,679, 28,491,648, 0,648, 0,648, 0,648], + [648,484,513, 27,484,648,491, 28,232,491,492,676, 0,482,648], + [648,648,648,648,648,648,648,648,648,648,648,648,648,648,648] ], + "bgmap": [ + +], + "fgmap": [ + +], + "bg2map": [ + +], + "fg2map": [ + +] } \ No newline at end of file diff --git a/public/project/floors/MT89.js b/public/project/floors/MT89.js index 0c8d7d5..6c138e8 100644 --- a/public/project/floors/MT89.js +++ b/public/project/floors/MT89.js @@ -1,45 +1,72 @@ main.floors.MT89= { -"floorId": "MT89", -"title": "苍蓝之殿-右上", -"name": "89", -"width": 15, -"height": 15, -"canFlyTo": true, -"canFlyFrom": true, -"canUseQuickShop": true, -"cannotViewMap": false, -"images": [], -"ratio": 8, -"defaultGround": "T650", -"bgm": "palaceNorth.mp3", -"firstArrive": [], -"eachArrive": [], -"parallelDo": "", -"events": {}, -"changeFloor": {}, -"beforeBattle": {}, -"afterBattle": {}, -"afterGetItem": {}, -"afterOpenDoor": {}, -"autoEvent": {}, -"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] + "floorId": "MT89", + "title": "苍蓝之殿-右上", + "name": "89", + "width": 15, + "height": 15, + "canFlyTo": true, + "canFlyFrom": true, + "canUseQuickShop": true, + "cannotViewMap": false, + "images": [], + "ratio": 8, + "defaultGround": "T650", + "bgm": "palaceNorth.mp3", + "firstArrive": [], + "eachArrive": [], + "parallelDo": "", + "events": {}, + "changeFloor": { + "0,7": { + "floorId": "MT87", + "loc": [ + 14, + 7 + ] + }, + "7,0": { + "floorId": "MT86", + "loc": [ + 7, + 14 + ] + } + }, + "beforeBattle": {}, + "afterBattle": {}, + "afterGetItem": {}, + "afterOpenDoor": {}, + "autoEvent": {}, + "cannotMove": {}, + "cannotMoveIn": {}, + "map": [ + [648,648,648,648,648,648,648, 91,648,648,648,648,648,648,648], + [648,249, 29, 0,491,578, 0, 0,658, 0,381,648,484,484,648], + [648, 29,648,648,648,648, 0,648,648,648,648,648,492,648,648], + [648, 0,648,487,378,648,484,648, 0, 0,676,648,378,484,648], + [648,491,648,378, 21,618, 0,648, 0,648, 0,679,484, 27,648], + [648,578,648,648,648,648,679,648, 0,648,491,648,648,648,648], + [648, 0, 0, 0,484, 0, 0,648, 0,648, 0,513, 0, 0,648], + [ 92, 0,648,492,648,648, 0,648,494,648,648,648, 0, 0, 94], + [648, 0,682, 0,491,648, 0,644,420,249,482,648,648,682,648], + [648,682,648, 29, 0,648,648,648,578,648,482,648, 0,484,648], + [648, 0,648,648,657,648, 0,648,494,648,492,648,657,648,648], + [648, 0,648,484, 0,538, 0,676, 0,648,487,677,491, 0,648], + [648,648,648,648,677,648,648, 0,648,648,648,648,657,648,648], + [648, 27,484, 28, 0,648,491, 0, 0,232, 0,378, 0,484,648], + [648,648,648,648,648,648,648, 93,648,648,648,648,648,648,648] ], + "bgmap": [ + +], + "fgmap": [ + +], + "bg2map": [ + +], + "fg2map": [ + +] } \ No newline at end of file diff --git a/src/game/enemy/damage.ts b/src/game/enemy/damage.ts index 1cdaa57..b98eeb4 100644 --- a/src/game/enemy/damage.ts +++ b/src/game/enemy/damage.ts @@ -231,122 +231,6 @@ export class EnemyCollection v.preProvideHalo(); }); } - - // render(onMap: boolean = false, cal: boolean = false) { - // if (cal) { - // this.calMapDamage(); - // } - // core.status.damage.data = []; - // core.status.damage.extraData = []; - // core.status.damage.dir = []; - - // // 怪物伤害 - // this.list.forEach(v => { - // if (onMap && !checkV2(v.x, v.y)) return; - - // const { damage } = v.calDamage(); - - // // 伤害全部相等,绘制在怪物本身所在位置 - // const { damage: dam, color } = formatDamage(damage); - // const critical = v.calCritical(1)[0]; - // core.status.damage.data.push({ - // text: dam, - // px: 32 * v.x! + 1, - // py: 32 * (v.y! + 1) - 1, - // color: color - // }); - // const setting = Mota.require('var', 'mainSetting'); - // const criGem = setting.getValue('screen.criticalGem', false); - // const n = critical?.atkDelta ?? Infinity; - // const ratio = core.status.maps[this.floorId].ratio; - // const cri = criGem ? Math.ceil(n / ratio) : n; - - // core.status.damage.data.push({ - // text: isFinite(cri) ? cri.toString() : '?', - // px: 32 * v.x! + 1, - // py: 32 * (v.y! + 1) - 11, - // color: '#fff' - // }); - // }); - - // // 地图伤害 - // const floor = core.status.maps[this.floorId]; - // const width = floor.width; - // const height = floor.height; - // const objs = core.getMapBlocksObj(this.floorId); - - // const startX = - // onMap && core.bigmap.v2 - // ? Math.max(0, core.bigmap.posX - core.bigmap.extend) - // : 0; - // const endX = - // onMap && core.bigmap.v2 - // ? Math.min( - // width, - // core.bigmap.posX + core._WIDTH_ + core.bigmap.extend + 1 - // ) - // : width; - // const startY = - // onMap && core.bigmap.v2 - // ? Math.max(0, core.bigmap.posY - core.bigmap.extend) - // : 0; - // const endY = - // onMap && core.bigmap.v2 - // ? Math.min( - // height, - // core.bigmap.posY + core._HEIGHT_ + core.bigmap.extend + 1 - // ) - // : height; - - // for (let x = startX; x < endX; x++) { - // for (let y = startY; y < endY; y++) { - // const id = `${x},${y}` as LocString; - // const dam = this.mapDamage[id]; - // if (!dam || objs[id]?.event.noPass) continue; - - // // 地图伤害 - // if (dam.damage !== 0) { - // const damage = core.formatBigNumber(dam.damage, true); - // const color = dam.damage < 0 ? '#6eff6a' : '#fa3'; - // core.status.damage.extraData.push({ - // text: damage, - // px: 32 * x + 16, - // py: 32 * y + 16, - // color, - // alpha: 1 - // }); - // } - - // // 电摇嘲讽 - // if (dam.mockery) { - // dam.mockery.sort((a, b) => - // a[0] === b[0] ? a[1] - b[1] : a[0] - b[0] - // ); - // const [tx, ty] = dam.mockery[0]; - // const dir = - // x > tx ? '←' : x < tx ? '→' : y > ty ? '↑' : '↓'; - // core.status.damage.extraData.push({ - // text: '嘲' + dir, - // px: 32 * x + 16, - // py: 32 * (y + 1) - 14, - // color: '#fd4', - // alpha: 1 - // }); - // } - - // // 追猎 - // if (dam.hunt) { - // core.status.damage.extraData.push({ - // text: '猎', - // px: 32 * x + 16, - // py: 32 * (y + 1) - 14, - // color: '#fd4', - // alpha: 1 - // }); - // } - // } - // } - // } } export class DamageEnemy { diff --git a/src/plugin/game/dev/hotReload.js b/src/plugin/game/dev/hotReload.js index da20a8b..0a87723 100644 --- a/src/plugin/game/dev/hotReload.js +++ b/src/plugin/game/dev/hotReload.js @@ -44,6 +44,7 @@ export {}; delete core.status.mapBlockObjs[data]; core.extractBlocks(data); if (data === core.status.floorId) { + core.status.thisMap = core.status.maps[data]; let weather = core.getFlag('__weather__', null); if (!weather && core.status.thisMap.weather) weather = core.status.thisMap.weather; diff --git a/src/plugin/game/enemy/checkblock.ts b/src/plugin/game/enemy/checkblock.ts index fc00440..2ca4aef 100644 --- a/src/plugin/game/enemy/checkblock.ts +++ b/src/plugin/game/enemy/checkblock.ts @@ -110,8 +110,13 @@ function checkHunt(loc: string) { const { x: hx, y: hy } = core.status.hero.loc; const action: any = []; + hunt.sort((a, b) => { + return a[0] === b[0] ? a[1] - b[1] : a[0] - b[0]; + }); for (const [x, y, dir] of hunt) { + const [tx, ty] = ofDir(x, y, dir); + if (core.noPass(tx, ty)) continue; action.push( { type: 'move', @@ -124,8 +129,6 @@ function checkHunt(loc: string) { type: 'update' } ); - const [tx, ty] = ofDir(x, y, dir); - if (core.noPass(tx, ty)) return; if (has(hy) && x === hx) { if (Math.abs(y - hy) <= 2) { diff --git a/src/plugin/game/fallback.ts b/src/plugin/game/fallback.ts index 1f84be7..51a4913 100644 --- a/src/plugin/game/fallback.ts +++ b/src/plugin/game/fallback.ts @@ -514,7 +514,10 @@ export function init() { time: number = 500, callback?: () => void ) { + console.log(heroMover.moving); + if (heroMover.moving) return; + const sx = core.getHeroLoc('x'); const sy = core.getHeroLoc('y'); adapters.viewport?.all('mutateTo', ex, ey); @@ -539,6 +542,7 @@ export function init() { ); }) ); + console.log(ex, ey); if (!locked) core.unlockControl(); core.setHeroLoc('x', ex); diff --git a/src/plugin/game/skill.ts b/src/plugin/game/skill.ts index 1a0c005..1ed97c4 100644 --- a/src/plugin/game/skill.ts +++ b/src/plugin/game/skill.ts @@ -105,6 +105,7 @@ export function jumpSkill() { (bgId.startsWith('X') && !ignoreInJump.bg.includes(bgId)) ) return core.drawTip('当前无法使用技能'); + // debugger; // 不是怪物且不可以通行 if (noPass && !(cls == 'enemys' || cls == 'enemy48')) { var toLoc = checkNoPass(direction, checkLoc.x, checkLoc.y, true);