public bool CanTarget(Actor self, Target target, List <Actor> othersAtTarget, ref TargetModifiers modifiers, ref string cursor) { if (rejectMove || target.Type != TargetType.Terrain) { return(false); } var location = self.World.Map.CellContaining(target.CenterPosition); IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); var explored = self.Owner.Shroud.IsExplored(location); cursor = self.World.Map.Contains(location) ? (self.World.Map.GetTerrainInfo(location).CustomCursor ?? mobile.Info.Cursor) : mobile.Info.BlockedCursor; if (mobile.IsTraitDisabled || (!explored && !locomotorInfo.MoveIntoShroud) || (explored && locomotorInfo.MovementCostForCell(self.World, location) == int.MaxValue)) { cursor = mobile.Info.BlockedCursor; } return(true); }
public bool CanEnterCell(World world, Actor self, CPos cell, Actor ignoreActor = null, bool checkTransientActors = true) { if (LocomotorInfo.MovementCostForCell(world, cell) == int.MaxValue) { return(false); } var check = checkTransientActors ? CellConditions.All : CellConditions.BlockedByMovers; return(LocomotorInfo.CanMoveFreelyInto(world, self, cell, ignoreActor, check)); }