public bool CanTarget(Actor self, Target target, List<Actor> othersAtTarget, ref TargetModifiers modifiers, ref string cursor) { var type = target.Type; if (type != TargetType.Actor && type != TargetType.FrozenActor) return false; cursor = this.cursor; IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); if (ForceAttack != null && modifiers.HasModifier(TargetModifiers.ForceAttack) != ForceAttack) return false; var owner = type == TargetType.FrozenActor ? target.FrozenActor.Owner : target.Actor.Owner; var playerRelationship = self.Owner.Stances[owner]; if (!modifiers.HasModifier(TargetModifiers.ForceAttack) && playerRelationship == Stance.Ally && !targetAllyUnits) return false; if (!modifiers.HasModifier(TargetModifiers.ForceAttack) && playerRelationship == Stance.Enemy && !targetEnemyUnits) return false; return type == TargetType.FrozenActor ? CanTargetFrozenActor(self, target.FrozenActor, modifiers, ref cursor) : CanTargetActor(self, target.Actor, modifiers, ref cursor); }
public override bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor) { // Obey force moving onto bridges if (modifiers.HasModifier(TargetModifiers.ForceMove)) return false; return target.TraitsImplementing<IDemolishable>().Any(i => i.IsValidTarget(target, self)); }
public override bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor) { var c = target.TraitOrDefault<ExternalCapturable>(); var canTargetActor = c != null && !c.CaptureInProgress && c.Info.CanBeTargetedBy(self, target.Owner); cursor = canTargetActor ? "ability" : "move-blocked"; return canTargetActor; }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { var c = target.Info.Traits.GetOrDefault<CapturableInfo>(); var canTargetActor = c != null && c.CanBeTargetedBy(self, target.Owner); cursor = canTargetActor ? "ability" : "move-blocked"; return canTargetActor; }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { var c = target.Info.TraitInfoOrDefault<ExternalCapturableInfo>(); var canTargetActor = c != null && c.CanBeTargetedBy(self, target.Owner); var capturesInfo = self.Trait<ExternalCaptures>().Info; cursor = canTargetActor ? capturesInfo.CaptureCursor : capturesInfo.CaptureBlockedCursor; return canTargetActor; }
public bool CanTarget(Actor self, Target target, List<Actor> othersAtTarget, TargetModifiers modifiers, ref string cursor) { if (target.Type != TargetType.Actor) return false; IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); cursor = useDeployCursor() ? "deploy" : "deploy-blocked"; return self == target.Actor; }
public bool CanTarget(Actor self, Target target, List<Actor> othersAtTarget, ref TargetModifiers modifiers, ref string cursor) { if (target.Type != TargetType.Actor) return false; IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); cursor = this.cursor(); return self == target.Actor; }
public bool CanTarget(Actor self, Target target, List<Actor> othersAtTarget, TargetModifiers modifiers, ref string cursor) { if (target.Type != TargetType.Terrain) return false; var location = self.World.Map.CellContaining(target.CenterPosition); if (self.World.Map.Contains(location)) { cursor = "ability"; return true; } return false; }
public bool CanTarget(Actor self, Target target, List<Actor> othersAtTarget, ref TargetModifiers modifiers, ref string cursor) { if (target.Type != TargetType.Terrain) return false; var location = self.World.Map.CellContaining(target.CenterPosition); var explored = self.Owner.Shroud.IsExplored(location); cursor = self.World.Map.Contains(location) ? (self.World.Map.GetTerrainInfo(location).CustomCursor ?? "move") : "move-blocked"; IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); if (!explored && !info.MoveIntoShroud) cursor = "move-blocked"; return true; }
public override bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor) { var hut = target.TraitOrDefault<BridgeHut>(); if (hut == null) return false; // Require force attack to heal partially damaged bridges to avoid unnecessary cursor noise var damage = hut.BridgeDamageState; if (!modifiers.HasModifier(TargetModifiers.ForceAttack) && damage != DamageState.Dead) return false; // Obey force moving onto bridges if (modifiers.HasModifier(TargetModifiers.ForceMove)) return false; // Can't repair a bridge that is undamaged, already under repair, or dangling if (damage == DamageState.Undamaged || hut.Repairing || hut.Bridge.IsDangling) cursor = "goldwrench-blocked"; return true; }
public bool CanTarget(Actor self, Target target, List <Actor> othersAtTarget, ref TargetModifiers modifiers, ref string cursor) { if (target.Type != TargetType.Terrain) { return(false); } var location = self.World.Map.CellContaining(target.CenterPosition); if (self.World.Map.Contains(location)) { cursor = this.cursor; // Notify force-set 'RallyPoint' order watchers with Ctrl and only if this is the only building of its type selected if (modifiers.HasModifier(TargetModifiers.ForceAttack)) { var selfName = self.Info.Name; if (!self.World.Selection.Actors.Any(a => a.Info.Name == selfName && a.ActorID != self.ActorID)) { ForceSet = true; } } return(true); } return(false); }
public override bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor) { return(targetTypes.Overlaps(target.GetEnabledTargetTypes())); }
public abstract bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor);
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { return(target.TargetTypes.Overlaps(targetTypes)); }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { return target.TargetTypes.Overlaps(targetTypes); }
public bool CanTarget(Actor self, Target target, List <Actor> othersAtTarget, ref TargetModifiers modifiers, ref string cursor) { if (modifiers.HasModifier(TargetModifiers.ForceMove)) { var xy = self.World.Map.CellContaining(target.CenterPosition); IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); if (self.IsInWorld && self.Owner.Shroud.IsExplored(xy)) { cursor = targetCursor; return(true); } return(false); } return(false); }
public bool TargetOverridesSelection(TargetModifiers modifiers) { return(modifiers.HasModifier(TargetModifiers.ForceMove)); }
bool CanTargetLocation(Actor self, CPos location, List <Actor> actorsAtLocation, TargetModifiers modifiers, ref string cursor) { if (!self.World.Map.Contains(location)) { return(false); } IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); // Targeting the terrain is only possible with force-attack modifier if (modifiers.HasModifier(TargetModifiers.ForceMove) || !modifiers.HasModifier(TargetModifiers.ForceAttack)) { return(false); } var target = Target.FromCell(self.World, location); var armaments = ab.ChooseArmamentsForTarget(target, true); if (!armaments.Any()) { return(false); } // Use valid armament with highest range out of those that have ammo // If all are out of ammo, just use valid armament with highest range armaments = armaments.OrderByDescending(x => x.MaxRange()); var a = armaments.FirstOrDefault(x => !x.IsTraitPaused); if (a == null) { a = armaments.First(); } cursor = !target.IsInRange(self.CenterPosition, a.MaxRange()) ? ab.Info.OutsideRangeCursor ?? a.Info.OutsideRangeCursor : ab.Info.Cursor ?? a.Info.Cursor; OrderID = ab.forceAttackOrderName; return(true); }
public bool CanTarget(Actor self, Target target, List <Actor> othersAtTarget, ref TargetModifiers modifiers, ref string cursor) { switch (target.Type) { case TargetType.Actor: case TargetType.FrozenActor: return(CanTargetActor(self, target, ref modifiers, ref cursor)); case TargetType.Terrain: return(CanTargetLocation(self, self.World.Map.CellContaining(target.CenterPosition), othersAtTarget, modifiers, ref cursor)); default: return(false); } }
public bool CanTarget(Actor self, Target target, List <Actor> othersAtTarget, ref TargetModifiers modifiers, ref string cursor) { if (target.Type != TargetType.Terrain) { return(false); } var location = self.World.Map.CellContaining(target.CenterPosition); if (!self.World.Map.Contains(location)) { return(false); } cursor = "ability"; IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); return(!othersAtTarget.Any() && modifiers.HasModifier(TargetModifiers.ForceAttack)); }
bool CanTargetLocation(Actor self, CPos location, List <Actor> actorsAtLocation, TargetModifiers modifiers, ref string cursor) { if (!self.World.Map.Contains(location)) { return(false); } IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); cursor = ab.info.Cursor; if (negativeDamage) { return(false); } if (!ab.HasAnyValidWeapons(Target.FromCell(self.World, location))) { return(false); } if (modifiers.HasModifier(TargetModifiers.ForceAttack)) { var maxRange = ab.GetMaximumRange().Range; var targetRange = (self.World.Map.CenterOfCell(location) - self.CenterPosition).HorizontalLengthSquared; if (targetRange > maxRange * maxRange) { cursor = ab.info.OutsideRangeCursor; } return(true); } return(false); }
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 && !mobile.Info.MoveIntoShroud) || (explored && mobile.Info.MovementCostForCell(self.World, location) == int.MaxValue)) { cursor = mobile.Info.BlockedCursor; } return(true); }
public bool CanTarget(Actor self, Target target, List<Actor> othersAtTarget, ref TargetModifiers modifiers, ref string cursor) { // TODO: When target modifiers are configurable this needs to be revisited if (modifiers.HasModifier(TargetModifiers.ForceMove) || modifiers.HasModifier(TargetModifiers.ForceQueue)) { var xy = self.World.Map.CellContaining(target.CenterPosition); IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); if (self.IsInWorld && self.Owner.Shroud.IsExplored(xy)) { cursor = targetCursor; return true; } return false; } return false; }
public bool TargetOverridesSelection(Actor self, Target target, List <Actor> actorsAt, CPos xy, TargetModifiers modifiers) { // Always prioritise orders over selecting other peoples actors or own actors that are already selected if (target.Type == TargetType.Actor && (target.Actor.Owner != self.Owner || self.World.Selection.Contains(target.Actor))) { return(true); } return(modifiers.HasModifier(TargetModifiers.ForceMove)); }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { return target.Info.Traits.WithInterface<ITargetableInfo>().Any(t => t.GetTargetTypes().Contains(targetType)); }
public bool CanTarget(Actor self, Target target, List <Actor> othersAtTarget, ref TargetModifiers modifiers, ref string cursor) { if (target.Type != TargetType.Terrain || (aircraft.Info.RequiresForceMove && !modifiers.HasModifier(TargetModifiers.ForceMove))) { return(false); } var location = self.World.Map.CellContaining(target.CenterPosition); var explored = self.Owner.Shroud.IsExplored(location); cursor = self.World.Map.Contains(location) ? self.World.Map.GetTerrainInfo(location).CustomCursor ?? "move" : "move-blocked"; IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); if (!(self.CurrentActivity is Transform || aircraft.transforms.Any(t => !t.IsTraitDisabled && !t.IsTraitPaused)) || (!explored && !aircraft.Info.MoveIntoShroud)) { cursor = "move-blocked"; } return(true); }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { // You can't enter frozen actor. return(false); }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { var targetInfo = target.Info.TraitInfoOrDefault <AcceptsDeliveredCashInfo>(); if (targetInfo == null || !targetInfo.ValidRelationships.HasRelationship(target.Owner.RelationshipWith(self.Owner))) { return(false); } if (targetInfo.ValidTypes.Count == 0) { return(true); } var type = self.Info.TraitInfo <DeliversCashInfo>().Type; return(!string.IsNullOrEmpty(type) && targetInfo.ValidTypes.Contains(type)); }
public bool TargetOverridesSelection(TargetModifiers modifiers) { return modifiers.HasModifier(TargetModifiers.ForceMove); }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { var captureManagerInfo = target.Info.TraitInfoOrDefault <CaptureManagerInfo>(); if (captureManagerInfo == null || !captureManagerInfo.CanBeTargetedBy(target, self, captures)) { cursor = captures.Info.EnterBlockedCursor; return(false); } cursor = captures.Info.EnterCursor; if (captures.Info.SabotageThreshold > 0 && !target.Owner.NonCombatant) { var healthInfo = target.Info.TraitInfoOrDefault <IHealthInfo>(); // Sabotage instead of capture if ((long)target.HP * 100 > captures.Info.SabotageThreshold * (long)healthInfo.MaxHP) { cursor = captures.Info.SabotageCursor; } } return(true); }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { if (!target.Info.Traits.Contains <EngineerRepairable>()) { return(false); } if (self.Owner.Stances[target.Owner] != Stance.Ally) { return(false); } if (target.DamageState == DamageState.Undamaged) { cursor = "goldwrench-blocked"; } return(true); }
public bool TargetOverridesSelection(Actor self, Target target, List <Actor> actorsAt, CPos xy, TargetModifiers modifiers) { return(true); }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { var stance = self.Owner.Stances[target.Owner]; if (!info.ValidStances.HasStance(stance)) return false; return target.Info.Traits.WithInterface<ITargetableInfo>().Any(t => t.GetTargetTypes().Intersect(info.Types).Any()); }
public bool CanTarget(Actor self, Target target, List <Actor> othersAtTarget, ref TargetModifiers modifiers, ref string cursor) { var type = target.Type; if (type != TargetType.Actor && type != TargetType.FrozenActor) { return(false); } cursor = this.cursor; IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); if (ForceAttack != null && modifiers.HasModifier(TargetModifiers.ForceAttack) != ForceAttack) { return(false); } var owner = type == TargetType.FrozenActor ? target.FrozenActor.Owner : target.Actor.Owner; var playerRelationship = self.Owner.Stances[owner]; if (!modifiers.HasModifier(TargetModifiers.ForceAttack) && playerRelationship == Stance.Ally && !targetAllyUnits) { return(false); } if (!modifiers.HasModifier(TargetModifiers.ForceAttack) && playerRelationship == Stance.Enemy && !targetEnemyUnits) { return(false); } return(type == TargetType.FrozenActor ? CanTargetFrozenActor(self, target.FrozenActor, modifiers, ref cursor) : CanTargetActor(self, target.Actor, modifiers, ref cursor)); }
public override bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor) { return target.TraitsImplementing<ITargetable>().Any(t => t.IsTraitEnabled() && t.TargetTypes.Overlaps(targetTypes)); }
public bool TargetOverridesSelection(TargetModifiers modifiers) { return(true); }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { // TODO: Bridges don't yet support FrozenUnderFog. return(false); }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { var trait = self.Info.TraitInfo <AcolytePreyInfo>(); if (!trait.TargetActors.Contains(target.Info.Name)) { return(false); } if (target.Info.HasTraitInfo <ValidPreyTargetInfo>() && !target.Actor.TraitOrDefault <ValidPreyTarget>().Actors.Any()) { return(false); } return(true); }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { return target.Info.Traits.WithInterface<IDemolishableInfo>().Any(i => i.IsValidTarget(target.Info, self)); }
public override bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor) { return target.TraitsImplementing<ITargetable>().Any(t => t.TargetTypes.Contains(targetType)); }
bool CanTargetLocation(Actor self, CPos location, List<Actor> actorsAtLocation, TargetModifiers modifiers, ref string cursor) { if (!self.World.Map.Contains(location)) return false; IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); cursor = ab.info.Cursor; if (negativeDamage) return false; if (!ab.HasAnyValidWeapons(Target.FromCell(self.World, location))) return false; if (modifiers.HasModifier(TargetModifiers.ForceAttack)) { var maxRange = ab.GetMaximumRange().Range; var targetRange = (self.World.Map.CenterOfCell(location) - self.CenterPosition).HorizontalLengthSquared; if (targetRange > maxRange * maxRange) cursor = ab.info.OutsideRangeCursor; return true; } return false; }
public bool CanTarget(Actor self, Target target, List <Actor> othersAtTarget, TargetModifiers modifiers, ref string cursor) { if (rejectMove || !target.IsValidFor(self)) { return(false); } var location = self.World.Map.CellContaining(target.CenterPosition); IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); cursor = "move"; if (self.Owner.Shroud.IsExplored(location)) { cursor = self.World.Map.GetTerrainInfo(location).CustomCursor ?? cursor; } if (!self.World.Map.Contains(location) || (self.Owner.Shroud.IsExplored(location) && unitType.MovementCostForCell(self.World, location) == int.MaxValue)) { cursor = "move-blocked"; } return(true); }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { // TODO: FrozenActors don't yet have a way of caching conditions, so we can't filter disabled traits // This therefore assumes that all EngineerRepairable traits are enabled, which is probably wrong. // Actors with FrozenUnderFog should therefore not disable the EngineerRepairable trait if // ValidStances includes Enemy actors. var engineerRepairable = target.Info.TraitInfoOrDefault <EngineerRepairableInfo>(); if (engineerRepairable == null) { return(false); } if (!engineerRepairable.Types.IsEmpty && !engineerRepairable.Types.Overlaps(info.Types)) { return(false); } if (!info.ValidRelationships.HasRelationship(target.Owner.RelationshipWith(self.Owner))) { return(false); } if (target.DamageState == DamageState.Undamaged) { cursor = info.RepairBlockedCursor; } return(true); }
bool CanTargetActor(Actor self, Target target, TargetModifiers modifiers, ref string cursor) { IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); var a = ab.ChooseArmamentForTarget(target); cursor = a != null && !target.IsInRange(self.CenterPosition, a.Weapon.Range) ? ab.info.OutsideRangeCursor : ab.info.Cursor; if (target.Type == TargetType.Actor && target.Actor == self) return false; if (!ab.HasAnyValidWeapons(target)) return false; if (modifiers.HasModifier(TargetModifiers.ForceAttack)) return true; if (modifiers.HasModifier(TargetModifiers.ForceMove)) return false; if (target.RequiresForceFire) return false; var targetableRelationship = negativeDamage ? Stance.Ally : Stance.Enemy; var owner = target.Type == TargetType.FrozenActor ? target.FrozenActor.Owner : target.Actor.Owner; return self.Owner.Stances[owner] == targetableRelationship; }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { return target.Info.Traits.Contains<AcceptsSuppliesInfo>(); }
public bool CanTarget(Actor self, Target target, List<Actor> othersAtTarget, TargetModifiers modifiers, ref string cursor) { switch (target.Type) { case TargetType.Actor: case TargetType.FrozenActor: return CanTargetActor(self, target, modifiers, ref cursor); case TargetType.Terrain: return CanTargetLocation(self, self.World.Map.CellContaining(target.CenterPosition), othersAtTarget, modifiers, ref cursor); default: return false; } }
public override bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor) { var c = target.Info.Traits.GetOrDefault<CapturableInfo>(); if (c == null || !c.CanBeTargetedBy(self, target.Owner)) { cursor = "enter-blocked"; return false; } var health = target.Trait<Health>(); var lowEnoughHealth = health.HP <= c.CaptureThreshold * health.MaxHP; cursor = !sabotage || lowEnoughHealth || target.Owner.NonCombatant ? "enter" : "capture"; return true; }
public override bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor) { return targetTypes.Overlaps(target.GetEnabledTargetTypes()); }
public bool TargetOverridesSelection(TargetModifiers modifiers) { return true; }
public static bool HasModifier(this TargetModifiers self, TargetModifiers m) { // PERF: Enum.HasFlag is slower and requires allocations. return((self & m) == m); }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { return(target.Info.TraitInfos <IDemolishableInfo>().Any(i => i.IsValidTarget(target.Info, self))); }
public override bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor) { return target.HasTrait<AcceptsSupplies>(); }
public bool CanTarget(Actor self, Target target, List <Actor> othersAtTarget, ref TargetModifiers modifiers, ref string cursor) { if (target.Type != TargetType.Actor) { return(false); } IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); cursor = this.cursor(); return(self == target.Actor); }
public bool CanTarget(Actor self, Target target, List<Actor> othersAtTarget, TargetModifiers modifiers, ref string cursor) { if (target.Type != TargetType.Terrain) return false; if (modifiers.HasModifier(TargetModifiers.ForceMove)) return false; var location = self.World.Map.CellContaining(target.CenterPosition); // Don't leak info about resources under the shroud if (!self.Owner.Shroud.IsExplored(location)) return false; var res = self.World.WorldActor.Trait<ResourceLayer>().GetRenderedResource(location); var info = self.Info.Traits.Get<HarvesterInfo>(); if (res == null || !info.Resources.Contains(res.Info.Name)) return false; cursor = "harvest"; IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); return true; }
public bool CanTarget(Actor self, Target target, List <Actor> othersAtTarget, ref TargetModifiers modifiers, ref string cursor) { if (target.Type != TargetType.Terrain) { return(false); } if (modifiers.HasModifier(TargetModifiers.ForceMove)) { return(false); } var location = self.World.Map.CellContaining(target.CenterPosition); // Don't leak info about resources under the shroud if (!self.Owner.Shroud.IsExplored(location)) { return(false); } var res = self.World.WorldActor.Trait <ResourceLayer>().GetRenderedResource(location); var info = self.Info.TraitInfo <T>(); if (res == null || !info.Resources.Contains(res.Info.Type)) { return(false); } cursor = "harvest"; IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); return(true); }
public bool CanTarget(Actor self, Target target, List<Actor> othersAtTarget, ref TargetModifiers modifiers, ref string cursor) { if (target.Type != TargetType.Terrain) return false; var location = self.World.Map.CellContaining(target.CenterPosition); if (!self.World.Map.Contains(location)) return false; cursor = "ability"; IsQueued = modifiers.HasModifier(TargetModifiers.ForceQueue); return !othersAtTarget.Any() && modifiers.HasModifier(TargetModifiers.ForceAttack); }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { return(false); }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { // TODO: Bridges don't yet support FrozenUnderFog. return false; }
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { return(self.Info.TraitInfo <AcolytePreyInfo>().TargetActors.Contains(target.Info.Name)); }