DungeonMasterEngine.DungeonContent.Actuators.Floor.PartyPossesionActuator.TriggerCondition C# (CSharp) Method

TriggerCondition() protected method

protected TriggerCondition ( ) : bool
return bool
        protected override bool TriggerCondition()
        {
            var theron = CurrentTile.SubItems.FirstOrDefault(x => x is Theron) as Theron;
            if (theron != null)
            {
                var items = new[] { theron.Hand }
                    .Concat(theron.PartyGroup.SelectMany(x => x.Body.Storages.SelectMany(s => s.Storage)))
                    .Concat(CurrentTile.SubItems.OfType<GrabableItem>());

                return items.Any(Constrain.IsAcceptable);
            }
            else
            {
                return false;
            }
        }
    }