diff --git a/Unity/Assets/Scripts/TH1_Logic/Unit/UnitLogic.cs b/Unity/Assets/Scripts/TH1_Logic/Unit/UnitLogic.cs index 0a3798280..1c3f691e4 100644 --- a/Unity/Assets/Scripts/TH1_Logic/Unit/UnitLogic.cs +++ b/Unity/Assets/Scripts/TH1_Logic/Unit/UnitLogic.cs @@ -133,6 +133,7 @@ namespace Logic bool[,] TransMap;//在常规移动之外,额外赋予的特殊可传送格子 + bool[,] KasenBeastGuideActiveMoveMap;//兽引额外赋予的可抵达格子,按普通主动移动结算 bool[,] SanaeMap;//在常规移动之外,额外赋予的特殊可抵达格子 bool[,] EnemyControlMap;//敌方控制区标记,仅用于移动高亮表现 bool[,] MoveAttackCandidateMap;//移动/攻击高亮候选去重用,避免展示入口重复分配HashSet @@ -157,6 +158,7 @@ namespace Logic YuugiMap = new bool[Table.Instance.MaxMapSize,Table.Instance.MaxMapSize]; TransMap = new bool[Table.Instance.MaxMapSize,Table.Instance.MaxMapSize]; + KasenBeastGuideActiveMoveMap = new bool[Table.Instance.MaxMapSize,Table.Instance.MaxMapSize]; SanaeMap = new bool[Table.Instance.MaxMapSize,Table.Instance.MaxMapSize]; EnemyControlMap = new bool[Table.Instance.MaxMapSize,Table.Instance.MaxMapSize]; MoveAttackCandidateMap = new bool[Table.Instance.MaxMapSize,Table.Instance.MaxMapSize]; @@ -1295,6 +1297,7 @@ namespace Logic MomijiMap[i, j] = false; YuugiMap[i, j] = false; TransMap[i, j] = false; + KasenBeastGuideActiveMoveMap[i, j] = false; SanaeMap[i, j] = false; MomijiHunterReachMap[i, j] = false; } @@ -1487,7 +1490,7 @@ namespace Logic { if (!CheckUnitAbleForGrid_RealTimeStatus(mapData, unitData, targetGrid)) continue; if (targetGrid.VisibleUnit(mapData, playerData, out _)) continue; - TransMap[targetGrid.Pos.X, targetGrid.Pos.Y] = true; + KasenBeastGuideActiveMoveMap[targetGrid.Pos.X, targetGrid.Pos.Y] = true; } //接入CITYTRANSPORT,在首都联通的城市之间传送 @@ -1756,6 +1759,7 @@ namespace Logic //如果是传送或者sanae,最优先判断 + if (KasenBeastGuideActiveMoveMap[gridDataB.Pos.X, gridDataB.Pos.Y]) return MoveAttackType.Move; if (TransMap[gridDataB.Pos.X, gridDataB.Pos.Y]) return MoveAttackType.MoveTeleport; if (SanaeMap[gridDataB.Pos.X, gridDataB.Pos.Y]) return MoveAttackType.Move; @@ -1829,7 +1833,7 @@ namespace Logic foreach (var gridData in mapData.GridMap.GridList) { int x = gridData.Pos.X, y = gridData.Pos.Y; - if (!FinalReachMap[x, y] && !TransMap[x, y] && !SanaeMap[x, y]) continue; + if (!FinalReachMap[x, y] && !KasenBeastGuideActiveMoveMap[x, y] && !TransMap[x, y] && !SanaeMap[x, y]) continue; AddMoveAttackCandidateGrid(mapData, originGrid, gridData, buffer); } } @@ -1873,7 +1877,7 @@ namespace Logic if (!hasUtsuhoBase && !playerData.Sight.CheckIsInSight(targetGridData.Id)) continue; int x = targetGridData.Pos.X, y = targetGridData.Pos.Y; - if (!FinalReachMap[x, y] && !TransMap[x, y] && !SanaeMap[x, y]) continue; + if (!FinalReachMap[x, y] && !KasenBeastGuideActiveMoveMap[x, y] && !TransMap[x, y] && !SanaeMap[x, y]) continue; var sig = CheckUnitCanMoveOrAttack(mapData, unitData, targetGridData); if (sig is MoveAttackType.Move or MoveAttackType.MoveToPort or MoveAttackType.MoveAshore or MoveAttackType.MoveTeleport) @@ -1978,6 +1982,12 @@ namespace Logic //默认在调用这个函数前已经调用了 CalcUnitMoveInfo(A),计算好了。不组合使用是不行的 public MoveAttackType GetMovePath(MapData map, Vector2Int start, Vector2Int end,out List path) { + if (KasenBeastGuideActiveMoveMap[end.x, end.y]) + { + path = new List { start, end }; + return MoveAttackType.Move; + } + if (TransMap[end.x, end.y]) { path = new List { start, end };