diff --git a/_server/config.json b/_server/config.json index dfacc36..fc78237 100644 --- a/_server/config.json +++ b/_server/config.json @@ -1 +1 @@ -{"viewportLoc":[0,0],"lastUsed":[{"idnum":46,"id":"fly","images":"items","y":12,"recent":1732768196310,"frequent":2},{"idnum":89,"id":"portal","images":"animates","y":17,"recent":1732590284009,"frequent":4},{"idnum":92,"id":"leftPortal","images":"animates","y":24,"recent":1732590243601,"frequent":4},{"idnum":94,"id":"rightPortal","images":"animates","y":25,"recent":1732590229450,"frequent":6},{"idnum":206,"id":"bigBat","images":"enemys","y":5,"recent":1732518600961,"frequent":1},{"idnum":211,"id":"skeletonCaptain","images":"enemys","y":10,"recent":1732518593961,"frequent":3},{"idnum":205,"id":"bat","images":"enemys","y":4,"recent":1732518591433,"frequent":1},{"idnum":88,"id":"downFloor","images":"terrains","y":5,"recent":1732510497803,"frequent":1},{"idnum":87,"id":"upFloor","images":"terrains","y":6,"recent":1732510482564,"frequent":3},{"idnum":93,"id":"downPortal","images":"animates","y":23,"recent":1732510408539,"frequent":3},{"idnum":91,"id":"upPortal","images":"animates","y":26,"recent":1732510340731,"frequent":3},{"idnum":257,"id":"dragon","images":"enemys","y":56,"recent":1732431861421,"frequent":4},{"idnum":130,"id":"expShop","images":"npcs","y":9,"recent":1732092503297,"frequent":1},{"idnum":27,"id":"redGem","images":"items","y":16,"recent":1732092498097,"frequent":1},{"idnum":246,"id":"blueKing","images":"enemys","y":45,"recent":1731057412587,"frequent":9},{"idnum":43,"id":"sword5","images":"items","y":54,"recent":1730963163489,"frequent":1},{"idnum":36,"id":"shield1","images":"items","y":55,"recent":1730963160769,"frequent":1},{"idnum":1,"id":"yellowWall","images":"animates","y":10,"recent":1673440212744,"frequent":2},{"idnum":45,"id":"book","images":"items","y":9,"recent":1732787462314,"frequent":1}],"editor_multi.fontSize":14,"editorLastFloorId":"MT7"} \ No newline at end of file +{"viewportLoc":[0,0],"lastUsed":[{"idnum":91,"id":"upPortal","images":"animates","y":26,"recent":1732868104690,"frequent":7},{"idnum":93,"id":"downPortal","images":"animates","y":23,"recent":1732867884540,"frequent":6},{"idnum":45,"id":"book","images":"items","y":9,"recent":1732787462314,"frequent":1},{"idnum":46,"id":"fly","images":"items","y":12,"recent":1732768196310,"frequent":2},{"idnum":89,"id":"portal","images":"animates","y":17,"recent":1732590284009,"frequent":4},{"idnum":92,"id":"leftPortal","images":"animates","y":24,"recent":1732590243601,"frequent":4},{"idnum":94,"id":"rightPortal","images":"animates","y":25,"recent":1732590229450,"frequent":6},{"idnum":206,"id":"bigBat","images":"enemys","y":5,"recent":1732518600961,"frequent":1},{"idnum":211,"id":"skeletonCaptain","images":"enemys","y":10,"recent":1732518593961,"frequent":3},{"idnum":205,"id":"bat","images":"enemys","y":4,"recent":1732518591433,"frequent":1},{"idnum":88,"id":"downFloor","images":"terrains","y":5,"recent":1732510497803,"frequent":1},{"idnum":87,"id":"upFloor","images":"terrains","y":6,"recent":1732510482564,"frequent":3},{"idnum":257,"id":"dragon","images":"enemys","y":56,"recent":1732431861421,"frequent":4},{"idnum":130,"id":"expShop","images":"npcs","y":9,"recent":1732092503297,"frequent":1},{"idnum":27,"id":"redGem","images":"items","y":16,"recent":1732092498097,"frequent":1},{"idnum":246,"id":"blueKing","images":"enemys","y":45,"recent":1731057412587,"frequent":9},{"idnum":43,"id":"sword5","images":"items","y":54,"recent":1730963163489,"frequent":1},{"idnum":36,"id":"shield1","images":"items","y":55,"recent":1730963160769,"frequent":1},{"idnum":1,"id":"yellowWall","images":"animates","y":10,"recent":1673440212744,"frequent":2}],"editor_multi.fontSize":14,"editorLastFloorId":"MT10"} \ No newline at end of file diff --git a/project/floors/MT10.js b/project/floors/MT10.js index f3f0cf4..3176b66 100644 --- a/project/floors/MT10.js +++ b/project/floors/MT10.js @@ -1,45 +1,67 @@ main.floors.MT10= { -"floorId": "MT10", -"title": "主塔 10 层", -"name": "10", -"width": 13, -"height": 13, -"canFlyTo": true, -"canFlyFrom": true, -"canUseQuickShop": true, -"images": [], -"ratio": 1, -"defaultGround": "grass", -"weather": [ - "snow", - 6 + "floorId": "MT10", + "title": "主塔 10 层", + "name": "10", + "width": 13, + "height": 13, + "canFlyTo": true, + "canFlyFrom": true, + "canUseQuickShop": true, + "images": [], + "ratio": 1, + "defaultGround": "grass", + "weather": [ + "snow", + 6 + ], + "firstArrive": [], + "eachArrive": [], + "parallelDo": "", + "events": {}, + "changeFloor": { + "6,12": { + "floorId": "MT9", + "loc": [ + 6, + 0 + ] + }, + "6,0": { + "floorId": "MT11", + "loc": [ + 6, + 12 + ] + } + }, + "beforeBattle": {}, + "afterBattle": {}, + "afterGetItem": {}, + "afterOpenDoor": {}, + "autoEvent": {}, + "cannotMove": {}, + "cannotMoveIn": {}, + "map": [ + [ 0, 0, 0, 0, 0, 0, 91, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 93, 0, 0, 0, 0, 0, 0] ], -"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] + "bgmap": [ + ], + "fgmap": [ + +], + "areas": "下层" } \ No newline at end of file diff --git a/project/floors/MT11.js b/project/floors/MT11.js index ba2df39..6e8f75e 100644 --- a/project/floors/MT11.js +++ b/project/floors/MT11.js @@ -1,45 +1,60 @@ main.floors.MT11= { -"floorId": "MT11", -"title": "主塔 11 层", -"name": "11", -"width": 13, -"height": 13, -"canFlyTo": true, -"canFlyFrom": true, -"canUseQuickShop": true, -"images": [], -"ratio": 1, -"defaultGround": "grass", -"weather": [ - "snow", - 6 + "floorId": "MT11", + "title": "主塔 11 层", + "name": "11", + "width": 13, + "height": 13, + "canFlyTo": true, + "canFlyFrom": true, + "canUseQuickShop": true, + "images": [], + "ratio": 1, + "defaultGround": "grass", + "weather": [ + "snow", + 6 + ], + "firstArrive": [], + "eachArrive": [], + "parallelDo": "", + "events": {}, + "changeFloor": { + "6,12": { + "floorId": "MT10", + "loc": [ + 6, + 0 + ] + } + }, + "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, 93, 0, 0, 0, 0, 0, 0] ], -"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] + "bgmap": [ + ], + "fgmap": [ + +], + "areas": "下层" } \ No newline at end of file diff --git a/project/floors/MT6.js b/project/floors/MT6.js index f56e1ef..5d015b9 100644 --- a/project/floors/MT6.js +++ b/project/floors/MT6.js @@ -59,5 +59,5 @@ main.floors.MT6= "fgmap": [ ], - "areas": "牢狱" + "areas": "研究所" } \ No newline at end of file diff --git a/project/floors/MT7.js b/project/floors/MT7.js index 280623f..5ea3190 100644 --- a/project/floors/MT7.js +++ b/project/floors/MT7.js @@ -56,5 +56,5 @@ main.floors.MT7= "fgmap": [ ], - "areas": "牢狱" + "areas": "下层" } \ No newline at end of file diff --git a/project/floors/MT8.js b/project/floors/MT8.js index 17fbc43..74a83c3 100644 --- a/project/floors/MT8.js +++ b/project/floors/MT8.js @@ -37,6 +37,13 @@ main.floors.MT8= 12, 6 ] + }, + "6,0": { + "floorId": "MT9", + "loc": [ + 6, + 12 + ] } }, "beforeBattle": {}, @@ -47,7 +54,7 @@ main.floors.MT8= "cannotMove": {}, "cannotMoveIn": {}, "map": [ - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 91, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], @@ -67,5 +74,5 @@ main.floors.MT8= "fgmap": [ ], - "areas": "牢狱" + "areas": "下层" } \ No newline at end of file diff --git a/project/floors/MT9.js b/project/floors/MT9.js index da01915..9ba26d2 100644 --- a/project/floors/MT9.js +++ b/project/floors/MT9.js @@ -1,45 +1,67 @@ main.floors.MT9= { -"floorId": "MT9", -"title": "主塔 9 层", -"name": "9", -"width": 13, -"height": 13, -"canFlyTo": true, -"canFlyFrom": true, -"canUseQuickShop": true, -"images": [], -"ratio": 1, -"defaultGround": "grass", -"weather": [ - "snow", - 6 + "floorId": "MT9", + "title": "主塔 9 层", + "name": "9", + "width": 13, + "height": 13, + "canFlyTo": true, + "canFlyFrom": true, + "canUseQuickShop": true, + "images": [], + "ratio": 1, + "defaultGround": "grass", + "weather": [ + "snow", + 6 + ], + "firstArrive": [], + "eachArrive": [], + "parallelDo": "", + "events": {}, + "changeFloor": { + "6,0": { + "floorId": "MT10", + "loc": [ + 6, + 12 + ] + }, + "6,12": { + "floorId": "MT8", + "loc": [ + 6, + 0 + ] + } + }, + "beforeBattle": {}, + "afterBattle": {}, + "afterGetItem": {}, + "afterOpenDoor": {}, + "autoEvent": {}, + "cannotMove": {}, + "cannotMoveIn": {}, + "map": [ + [ 0, 0, 0, 0, 0, 0, 91, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 93, 0, 0, 0, 0, 0, 0] ], -"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] + "bgmap": [ + ], + "fgmap": [ + +], + "areas": "下层" } \ No newline at end of file diff --git a/project/plugins.js b/project/plugins.js index e9e5dbf..93a535c 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -8042,7 +8042,7 @@ core.plugin.animate = { core.fillRect(ctx, sx, sy, sw, sh, '#000') core.strokeRect(ctx, sx, sy, sw, sh, '#fff', 5) core.setTextAlign('outerUI', 'center') - core.fillText(ctx, core.status.maps[center].areas, sx + sw * 3 / 8, sy - 10, '#FFFFFF', 'bold 42px Verdana') + core.fillText(ctx, core.status.maps[center].areas, sx + sw / 2, sy - 20, '#FFFFFF', 'bold 42px Verdana') const locs = info.locs for (const id in locs) { const loc = locs[id]; @@ -8116,10 +8116,11 @@ core.plugin.animate = { core.drawWindowSkin('winskin1.png', 'ui', 0, 0, 416, 416); let page = core.status.event.data.index; let floorId = core.status.event.data.floorId; + core.ui.statusBar._update_map(floorId); const bfs = core.plugin.bfsSearch(floorId, 1, true); const mapdir = bfs.mapdir[floorId]; core.setTextAlign('ui', 'center'); - let size = core.__PIXELS__ * 3 / 4; + let size = core.__PIXELS__ * 3 / 4; //312 core.fillRoundRect('ui', 15 - 2, 15 - 2, 35 + 4, 35 + 4, 4, '#444444'); core.strokeRoundRect('ui', 15 - 4, 15 - 4, 35 + 8, 35 + 8, 4, "#444444", 1) @@ -8287,7 +8288,6 @@ core.plugin.animate = { } context.fillText(letter, sx, sy); - console.log(1) // 旋转坐标系还原成初始态 context.setTransform(1, 0, 0, 1, 0, 0); @@ -8408,17 +8408,46 @@ core.plugin.animate = { core.ui._drawViewMaps(core.floorIds.indexOf(core.status.floorId)); return; } - var now = core.floorIds.indexOf(core.status.floorId); - var index = core.status.event.data.index; - var cx = core.status.event.data.x, + let now = core.floorIds.indexOf(core.status.floorId); + let index = core.status.event.data.index; + let cx = core.status.event.data.x, cy = core.status.event.data.y; - var floorId = core.floorIds[index], + let floorId = core.floorIds[index], mw = core.floors[floorId].width, mh = core.floors[floorId].height; - var perpx = core.__PIXELS__ / 5, + let perpx = core.__PIXELS__ / 5, cornerpx = perpx * 3 / 4; + const bfs = core.plugin.bfsSearch(floorId, 1, true) + const mapdir = bfs.mapdir[floorId] + const res = bfs.res; + const formto = {} + for (let from in res) { + const to = res[from] + const [fromfloorId, fromsx, fromsy, dir] = from.split('_') + const [tofloorId, tosx, tosy] = to.split('_') + if (!formto[fromfloorId]) formto[fromfloorId] = {} + if (!formto[fromfloorId][dir]) formto[fromfloorId][dir] = tofloorId - if (px >= 338 && px <= 338 + 58) { + } + if (px >= 11 && px <= 54 && py >= 11 && py <= 54) { + core.ui._drawViewMaps(core.floorIds.indexOf(core.status.floorId)) + } else if (px >= 362 && px <= 407 && py >= 191 && py <= 318) { + flags.showEnemy = !flags.showEnemy + core.ui._drawViewMaps(index) + } else if (px >= 364 && px <= 407 && py >= 364 && py <= 407) { + core.clearMap('data'); + core.playSound('取消'); + core.ui.closePanel(); + core.getItemDetail(); + core.redrawMap(); + return; + } else if (px >= 55 && px <= 317 && py >= 11 && py <= 54) { + if (formto[floorId].up) { + if (mapdir.includes("up")) core.ui._drawViewMaps(core.floorIds.indexOf(formto[floorId].up)) + } + } + + /*if (px >= 338 && px <= 338 + 58) { if (py >= 11 && py <= 11 + 58) { core.playSound('光标移动'); if (!core.hasVisitedFloor(core.floorIds[core.status.event.data.index + 1])) { @@ -8495,7 +8524,7 @@ core.plugin.animate = { } else if (px >= 11 && px <= 330 && py >= 11 && py <= 330 && !core.isReplaying()) { core.useFly(false); return; - } + }*/ } ////// 查看地图界面时,放开某个键的操作 ////// actions.prototype._keyUpViewMaps = function (keycode) {