diff --git a/assets/script/game/hero/MoveComp.ts b/assets/script/game/hero/MoveComp.ts index f210bf21..8220f657 100644 --- a/assets/script/game/hero/MoveComp.ts +++ b/assets/script/game/hero/MoveComp.ts @@ -52,7 +52,7 @@ export class MoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate private readonly heroFrontAnchorX = -50; private readonly monFrontAnchorX = 50; /** 常规同阵营横向最小间距 */ - private readonly allySpacingX = 60; + private readonly allySpacingX = 65; /** 纵向判定为同排的最大 Y 差 */ private readonly minSpacingY = 30; /** 渲染层级重排节流,避免每帧排序 */ @@ -246,7 +246,18 @@ export class MoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate }); const slotIndex = Math.max(0, laneAllies.findIndex(entity => entity === self)); const frontAnchorX = model.fac === FacSet.MON ? this.monFrontAnchorX : this.heroFrontAnchorX; - const targetX = frontAnchorX - forwardDir * slotIndex * this.allySpacingX; + + let totalSpacing = 0; + for (let i = 1; i <= slotIndex; i++) { + const prevAttrs = laneAllies[i - 1].get(HeroAttrsComp); + const currAttrs = laneAllies[i].get(HeroAttrsComp); + const isPrevBoss = prevAttrs?.is_boss; + const isCurrBoss = currAttrs?.is_boss; + const spacing = (isPrevBoss || isCurrBoss) ? 100 : this.allySpacingX; + totalSpacing += spacing; + } + + const targetX = frontAnchorX - forwardDir * totalSpacing; return Math.max(moveMinX, Math.min(moveMaxX, targetX)); } diff --git a/assets/script/game/map/MissionMonComp.ts b/assets/script/game/map/MissionMonComp.ts index 19660619..69986e82 100644 --- a/assets/script/game/map/MissionMonComp.ts +++ b/assets/script/game/map/MissionMonComp.ts @@ -59,7 +59,7 @@ export class MissionMonCompComp extends CCComp { /** 第一个槽位的 X 坐标起点 */ private static readonly MON_SLOT_START_X = 50; /** 槽位间的 X 间距 */ - private static readonly MON_SLOT_X_INTERVAL = 60; + private static readonly MON_SLOT_X_INTERVAL = 65; /** 怪物出生掉落高度 */ private static readonly MON_DROP_HEIGHT = 280; /** 最大槽位数 */ diff --git a/assets/script/game/map/RogueConfig.ts b/assets/script/game/map/RogueConfig.ts index 3e6c41b2..adf8c35e 100644 --- a/assets/script/game/map/RogueConfig.ts +++ b/assets/script/game/map/RogueConfig.ts @@ -122,8 +122,8 @@ export const WaveSlotConfig: { [wave: number]: IWaveSlot[] } = { /** 第 1 波:2 近战 + 1 近战Boss(默认占3格) */ 1: [ - { type: MonType.Melee, count: 2 }, - { type: MonType.MeleeBoss, count: 1 } + { type: MonType.MeleeBoss, count: 1 }, + { type: MonType.Long, count: 2 }, ], /** 第 2波:2 近战 + 1 远程Boss(默认占3格) */ 2: [