fix: keep Kasen beast guide teleport visuals

This commit is contained in:
daixiawu 2026-06-26 23:29:11 +08:00
parent ac6bc841a8
commit 0ebc3e5724
2 changed files with 13 additions and 3 deletions

View File

@ -2464,9 +2464,12 @@ namespace Logic.Action
//TODO 这里有风险movepath依赖一个在时序上完全无关的 movecostinfo的计算
Main.UnitLogic.CalcUnitMoveInfo(actionParams.MapData, unit.Id);
MoveAttackType moveAttackType = Main.UnitLogic.GetMovePath(actionParams.MapData, originGrid.Pos.V2(), targetGrid.Pos.V2(), out path1);
bool isKasenBeastGuideActiveMove = moveAttackType == MoveAttackType.MoveTeleport &&
Main.UnitLogic.IsKasenBeastGuideActiveMoveTarget(
targetGrid.Pos.X, targetGrid.Pos.Y);
MoveType moveType = moveAttackType switch
{
MoveAttackType.MoveTeleport => MoveType.SkillMove,
MoveAttackType.MoveTeleport when !isKasenBeastGuideActiveMove => MoveType.SkillMove,
_ => MoveType.ActiveMove
};

View File

@ -130,6 +130,13 @@ namespace Logic
// 供外部查询FinalReachMap需在CalcUnitMoveInfo之后调用
public bool IsFinalReachable(int x, int y) => FinalReachMap[x, y];
public bool IsKasenBeastGuideActiveMoveTarget(int x, int y)
{
return x >= 0 && y >= 0
&& x < Table.Instance.MaxMapSize
&& y < Table.Instance.MaxMapSize
&& KasenBeastGuideActiveMoveMap[x, y];
}
bool[,] TransMap;//在常规移动之外,额外赋予的特殊可传送格子
@ -1759,7 +1766,7 @@ namespace Logic
//如果是传送或者sanae最优先判断
if (KasenBeastGuideActiveMoveMap[gridDataB.Pos.X, gridDataB.Pos.Y]) return MoveAttackType.Move;
if (KasenBeastGuideActiveMoveMap[gridDataB.Pos.X, gridDataB.Pos.Y]) return MoveAttackType.MoveTeleport;
if (TransMap[gridDataB.Pos.X, gridDataB.Pos.Y]) return MoveAttackType.MoveTeleport;
if (SanaeMap[gridDataB.Pos.X, gridDataB.Pos.Y]) return MoveAttackType.Move;
@ -1985,7 +1992,7 @@ namespace Logic
if (KasenBeastGuideActiveMoveMap[end.x, end.y])
{
path = new List<Vector2Int> { start, end };
return MoveAttackType.Move;
return MoveAttackType.MoveTeleport;
}
if (TransMap[end.x, end.y])