diff --git a/public/project/floors/MT52.js b/public/project/floors/MT52.js index 1a02613..3d6c08d 100644 --- a/public/project/floors/MT52.js +++ b/public/project/floors/MT52.js @@ -27,27 +27,101 @@ main.floors.MT52= } }, "beforeBattle": {}, - "afterBattle": {}, + "afterBattle": { + "12,1": [ + { + "type": "setValue", + "name": "flag:door_MT52_11_2", + "operator": "+=", + "value": "1" + } + ], + "12,3": [ + { + "type": "setValue", + "name": "flag:door_MT52_11_2", + "operator": "+=", + "value": "1" + } + ], + "9,1": [ + { + "type": "setValue", + "name": "flag:door_MT52_8_2", + "operator": "+=", + "value": "1" + } + ], + "9,3": [ + { + "type": "setValue", + "name": "flag:door_MT52_8_2", + "operator": "+=", + "value": "1" + } + ] + }, "afterGetItem": {}, "afterOpenDoor": {}, - "autoEvent": {}, + "autoEvent": { + "11,2": { + "0": { + "condition": "flag:door_MT52_11_2==2", + "currentFloor": true, + "priority": 0, + "delayExecute": false, + "multiExecute": false, + "data": [ + { + "type": "openDoor" + }, + { + "type": "setValue", + "name": "flag:door_MT52_11_2", + "operator": "=", + "value": "null" + } + ] + } + }, + "8,2": { + "0": { + "condition": "flag:door_MT52_8_2==2", + "currentFloor": true, + "priority": 0, + "delayExecute": false, + "multiExecute": false, + "data": [ + { + "type": "openDoor" + }, + { + "type": "setValue", + "name": "flag:door_MT52_8_2", + "operator": "=", + "value": "null" + } + ] + } + } + }, "cannotMove": {}, "cannotMoveIn": {}, "map": [ [648,648,648,648, 91,648,648,648,648,648,648,648,648,648,648], - [648, 0, 0,648, 0,648,376,491,648,249,376,648,578, 0,648], - [648, 0, 0,648,243,648, 22,403, 85,403,491, 85, 0, 0,648], - [648, 0, 0,220, 0,648,378,491,648,249,378,648,578, 0,648], + [648, 27, 0,648, 0,648,376,491,648,249,376,648,578, 0,648], + [648, 0,482,648,243,497, 22,403, 85,403,491, 85, 0,484,648], + [648, 28, 0,220, 0,648,378,491,648,249,378,648,578, 0,648], [648,648,648,648, 0,648,648,648,648,648,648,648,648, 0,648], - [648, 0, 0,648, 0,648, 0, 0,648, 0, 0,648, 0, 0,648], - [648, 0, 0,492, 0,648, 0, 0, 0, 0, 0, 0, 0, 0,648], - [648, 0, 0,648, 0,648,648,219,648,648,648,648,648,648,648], - [648,601,648,648,656, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94], - [648, 0, 0,648,648,648,648,494,648,648,648,648,497,648,648], - [648, 0, 0,648, 0,539, 0, 0, 0,648, 0, 0, 0, 0,648], - [648,596,648,648,648,648,648,243,648,648,648, 0,648,648,648], - [648, 0, 0,648, 0, 0,648, 0, 0,648, 0, 0, 0, 0,648], - [648, 0, 0, 0, 0, 0, 0, 0, 0,240, 0, 0, 0, 0,648], + [648, 33, 0,648,482,648, 29, 0,648,381, 0,648, 28, 0,648], + [648, 0,381,492, 0,648, 0, 27,539, 0, 34,596, 0,103,648], + [648, 33, 0,648, 0,648,648,219,648,648,648,648,648,648,648], + [648,596,648,648,656, 0, 0, 0, 0,482, 0, 0, 0, 0, 94], + [648,376, 0,648,648,648,648,494,648,648,648,648,497,648,648], + [648, 33,381,492,482,539, 33, 0, 28,494,376,381, 22,378,648], + [648,601,648,648,648,648,648,243,648,648,648,240,648,648,648], + [648, 34, 0,648, 34, 0,648, 0, 29, 27,648,484,396,484,648], + [648,103, 27,596, 0, 33,220, 0, 33, 28,249,403, 21,390,648], [648,648,648,648,648,648,648,648,648,648,648,648,648,648,648] ], "bgmap": [ diff --git a/src/plugin/fx/gameCanvas.ts b/src/plugin/fx/gameCanvas.ts index 8d454cc..2f83977 100644 --- a/src/plugin/fx/gameCanvas.ts +++ b/src/plugin/fx/gameCanvas.ts @@ -28,6 +28,7 @@ export function setCanvasFilterByFloorId( Mota.require('var', 'loading').once('coreInit', () => { filterMap.push( - [core.floorIds.slice(60), 'brightness(80%)contrast(120%)'] // 童心佬的滤镜( + [['MT50'], 'brightness(80%)contrast(120%)'], // 童心佬的滤镜( + [core.floorIds.slice(61), 'brightness(90%)contrast(120%)'] // 童心佬的滤镜( ); }); diff --git a/src/plugin/shadow/gameShadow.ts b/src/plugin/shadow/gameShadow.ts index e675502..57eaa46 100644 --- a/src/plugin/shadow/gameShadow.ts +++ b/src/plugin/shadow/gameShadow.ts @@ -85,26 +85,22 @@ const shadowInfo: Partial> = { noShelter: true } ], - MT51: [ - { - id: 'mt51_hero', - x: 0, - y: 0, - decay: 50, - r: 250, - color: 'transparent', - followHero: true - } - ], MT52: [ { - id: 'mt52_hero', - x: 0, - y: 0, - decay: 50, + id: 'mt51_1', + x: 13 * 32 + 16, + y: 6 * 32 + 16, + decay: 20, r: 250, - color: 'transparent', - followHero: true + color: pColor('#e953') + }, + { + id: 'mt51_2', + x: 1 * 32 + 16, + y: 13 * 32 + 16, + decay: 20, + r: 350, + color: pColor('#e953') } ] }; @@ -119,6 +115,35 @@ const shadowCache: Partial> = {}; let calMapShadow = true; +Mota.require('var', 'loading').once('coreInit', () => { + core.floorIds.slice(61).forEach(v => { + shadowInfo[v] ??= []; + shadowInfo[v]?.push({ + id: `${v}_hero`, + x: 0, + y: 0, + decay: 50, + r: 300, + color: 'transparent', + followHero: true + }); + core.floors[v].map.forEach((arr, y) => { + arr.forEach((num, x) => { + if (num === 103) { + shadowInfo[v]?.push({ + id: `${v}_${x}_${y}`, + x: x * 32 + 16, + y: y * 32 + 16, + decay: 20, + r: 350, + color: pColor('#e953') + }); + } + }); + }); + }); +}); + export function updateShadow(nocache: boolean = false) { // todo: 需要优化,优化成bfs const floor = core.status.floorId;