diff --git a/OpenRA.Mods.CA/Traits/SupportPowers/RecallPower.cs b/OpenRA.Mods.CA/Traits/SupportPowers/RecallPower.cs index 2b2fd7895d..673781c7ae 100644 --- a/OpenRA.Mods.CA/Traits/SupportPowers/RecallPower.cs +++ b/OpenRA.Mods.CA/Traits/SupportPowers/RecallPower.cs @@ -47,6 +47,9 @@ sealed class RecallPowerInfo : SupportPowerInfo [Desc("Target types that cannot be recalled.")] public readonly BitSet InvalidTargetTypes = default(BitSet); + [Desc("Player relationships that can be recalled.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Ally; + [CursorReference] [Desc("Cursor to display when the targeted area is blocked.")] public readonly string TargetBlockedCursor = "move-blocked"; @@ -178,6 +181,9 @@ public bool IsValidTarget(Actor a) if (a == null || !a.IsInWorld || a.IsDead) return false; + if (!info.ValidRelationships.HasRelationship(Self.Owner.RelationshipWith(a.Owner))) + return false; + var targetTypes = a.GetEnabledTargetTypes(); if (!targetTypes.Overlaps(info.ValidTargetTypes))