diff --git a/src/plugin/game/damage.ts b/src/plugin/game/damage.ts index 4fd46da..c8e367c 100644 --- a/src/plugin/game/damage.ts +++ b/src/plugin/game/damage.ts @@ -226,8 +226,8 @@ export class EnemyCollection implements RangeCollection { }); // 然后根据位置依次绘制对应位置的伤害 for (const dam of v.damage) { - const d = (dam.damage - min) / delta; - const color = core.arrayToRGB([d * 255, 255 - d * 255, 0]); + const d = ((dam.damage - min) / delta) * 255; + const color = core.arrayToRGB([d, 255 - d, 0]); if (dam.dir === 'down' || dam.dir === 'up') { const dir = dam.dir === 'down' ? '↑' : '↓'; core.status.damage.extraData.push({ diff --git a/src/plugin/ui/fly.ts b/src/plugin/ui/fly.ts index a5deb41..5bd5d24 100644 --- a/src/plugin/ui/fly.ts +++ b/src/plugin/ui/fly.ts @@ -27,11 +27,11 @@ const bfsCache: Partial> = {}; */ const drawCache: Record = {}; -const arrow: Partial> = { - leftPortal: 'left', - rightPortal: 'right', - upPortal: 'up', - downPortal: 'down' +const arrow: Partial> = { + 92: 'left', + 94: 'right', + 91: 'up', + 93: 'down' }; /** @@ -175,13 +175,13 @@ export function getMapData( while (queue.length > 0) { const now = queue.shift()!; - const change = core.floors[now].changeFloor; - const blocks = core.getMapBlocksObj(now, noCache); + const floor = core.floors[now]; + const change = floor.changeFloor; for (const [loc, ev] of Object.entries(change)) { const target = ev.floorId as FloorIds; if (target.startsWith(':')) continue; - const block = blocks[loc as LocString]; - const id = block.event.id; + const [x, y] = loc.split(',').map(v => parseInt(v)); + const id = floor.map[y][x] as AllNumbers; if (id in arrow) { if (!used[target]) { const from = `${now},${loc},${arrow[id]}` as BFSFromString;