예제 #1
0
        protected int GetAiPriorityOfTarget(GenericShip ship)
        {
            int priority = 50;

            priority += (ship.Tokens.CountTokensByType(typeof(StressToken)) * 25);
            priority += (ship.State.Agility * 5);

            if (ship.CallCheckCanPerformActionsWhileStressed() && ship.CanPerformRedManeuverWhileStressed())
            {
                priority = 10;
            }

            return(priority);
        }
예제 #2
0
        public static bool HasPerformActionStep(GenericShip ship)
        {
            if (ship.IsDestroyed)
            {
                return(false);
            }
            if (ship.IsSkipsActionSubPhase)
            {
                return(false);
            }

            if (ship.Tokens.HasToken(typeof(StressToken)))
            {
                if ((!ship.CallCheckCanPerformActionsWhileStressed()) && (!ship.GetAvailableActions().Any(n => n.CanBePerformedWhileStressed)) && (ship.ActionBar.ActionsThatCanbePreformedwhileStressed.Count == 0))
                {
                    return(false);
                }
            }

            return(true);
        }