Example #1
0
        public Status Validate(ForefrontCard target)
        {
            if (!Chief.IsTurnOwner())
            {
                return(Status.NotTurnOfSource);
            }

            if (!Card.GetLocation().IsReserve())
            {
                return(Status.NotAtReserve);
            }

            if (!Card.Abilities.Has <SpecificAbility>())
            {
                return(Status.NoSpecificAbility);
            }

            var ability = GetSpecificAbility();

            if (target == null && NoValidTargets())
            {
                return(Status.NoValidTargets);
            }

            if (target != null && !CanActivateOn(target))
            {
                return(Status.TargetIsInvalid);
            }

            return(PayResources.ForCard(Card).Validation());
        }
Example #2
0
        public Status Validate(Cell cell)
        {
            if (!Chief.IsTurnOwner())
            {
                return(Status.NotTurnOfSource);
            }

            if (!Card.GetLocation().IsReserve())
            {
                return(Status.NotAtReserve);
            }

            if (cell != null && !IsAllowedCell(cell))
            {
                return(Status.CellIsNotAllowed);
            }

            return(PayResources.ForCard(Card).Validation());
        }