public static List <int> GetTLineCells(Map Map, int Cell, int Direction, int Length) { var LineDirection = Direction <= 5 ? Direction + 2 : Direction - 6; var Cells = new List <int>(); Cells.AddRange(GetLineCells(Map, Cell, LineDirection, Length)); Cells.AddRange(GetLineCells(Map, Cell, Pathfinder.OppositeDirection(LineDirection), Length)); return(Cells); }
public static bool CellsInSameLineFight(Map Map, int BeginCell, int EndCell, int BaseDirection) { int BaseDirectionOpp = Pathfinder.OppositeDirection(BaseDirection); int dir = Pathfinder.GetDirection(Map, BeginCell, EndCell); if (dir > 3) { Logger.Info("Dir > 3!!"); return(false); } return(dir == BaseDirection || dir == BaseDirectionOpp); }