diff --git a/Unity/Assets/Scripts/TH1_Logic/Action/ActionLogic.cs b/Unity/Assets/Scripts/TH1_Logic/Action/ActionLogic.cs index 797b43ed9..22b3b24b0 100644 --- a/Unity/Assets/Scripts/TH1_Logic/Action/ActionLogic.cs +++ b/Unity/Assets/Scripts/TH1_Logic/Action/ActionLogic.cs @@ -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 }; diff --git a/Unity/Assets/Scripts/TH1_Logic/Unit/UnitLogic.cs b/Unity/Assets/Scripts/TH1_Logic/Unit/UnitLogic.cs index 1c3f691e4..76605cdac 100644 --- a/Unity/Assets/Scripts/TH1_Logic/Unit/UnitLogic.cs +++ b/Unity/Assets/Scripts/TH1_Logic/Unit/UnitLogic.cs @@ -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 { start, end }; - return MoveAttackType.Move; + return MoveAttackType.MoveTeleport; } if (TransMap[end.x, end.y])