Пример #1
0
 private static void CheckForFinish()
 {
     if (Roster.AllManuversAreAssigned(Phases.CurrentPhasePlayer))
     {
         UI.ShowNextButton();
         UI.HighlightNextButton();
     }
 }
Пример #2
0
        public static void CheckForFinish()
        {
            Roster.HighlightShipOff(Selection.ThisShip);

            if (Roster.AllManuversAreAssigned(Phases.CurrentPhasePlayer))
            {
                UI.ShowNextButton();
                UI.HighlightNextButton();
            }
        }
Пример #3
0
        private void PlayerAssignsManeuvers()
        {
            UpdateHelpInfo();
            Roster.HighlightShipsFiltered(FilterShipsToAssignManeuver);

            if (Roster.AllManuversAreAssigned(Phases.CurrentPhasePlayer))
            {
                UI.ShowNextButton();
                UI.HighlightNextButton();
            }

            Roster.GetPlayer(RequiredPlayer).AssignManeuver();
        }
Пример #4
0
    public static void SetManeuver(string maneuverCode)
    {
        foreach (var shipHolder in Roster.GetPlayer(Phases.CurrentSubPhase.RequiredPlayer).Ships)
        {
            if (shipHolder.Value.HasManeuver(maneuverCode) && !RulesList.IonizationRule.IsIonized(shipHolder.Value))
            {
                shipHolder.Value.SetAssignedManeuver(ShipMovementScript.MovementFromString(maneuverCode, shipHolder.Value));
                Roster.HighlightShipOff(shipHolder.Value);
            }
        }

        if (Roster.AllManuversAreAssigned(Phases.CurrentPhasePlayer))
        {
            UI.ShowNextButton();
            UI.HighlightNextButton();
        }
    }
Пример #5
0
        public override void Next()
        {
            if (Roster.AllManuversAreAssigned(RequiredPlayer))
            {
                HideAssignedManeuversInHotSeatGame();

                if (RequiredPlayer == Phases.PlayerWithInitiative)
                {
                    RequiredPlayer = Roster.AnotherPlayer(RequiredPlayer);
                    PlayerAssignsManeuvers();
                }
                else
                {
                    FinishPhase();
                }
            }
        }
Пример #6
0
        private void PlayerAssignsManeuvers()
        {
            UpdateHelpInfo();
            if (!(Roster.GetPlayer(RequiredPlayer) is Players.GenericAiPlayer))
            {
                Roster.HighlightShipsFiltered(FilterShipsToAssignManeuver);
            }

            if (Roster.AllManuversAreAssigned(Phases.CurrentPhasePlayer))
            {
                UI.ShowNextButton();
                UI.HighlightNextButton();
            }

            IsReadyForCommands = true;
            Roster.GetPlayer(RequiredPlayer).AssignManeuver();
        }
Пример #7
0
        public override void Next()
        {
            if (Roster.AllManuversAreAssigned(RequiredPlayer))
            {
                HideAssignedManeuversInHotSeatGame();

                if (RequiredPlayer == Phases.PlayerWithInitiative)
                {
                    RequiredPlayer = Roster.AnotherPlayer(RequiredPlayer);

                    UpdateHelpInfo();
                    HighlightShips();
                    Roster.GetPlayer(RequiredPlayer).AssignManeuver();
                }
                else
                {
                    FinishPhase();
                }
            }
        }
Пример #8
0
    //Assignment and launch of execution of meneuver

    public static void AssignManeuver(int shipId, string maneuverCode)
    {
        Selection.ChangeActiveShip("ShipId:" + shipId);
        UI.HideContextMenu();

        Selection.ThisShip.SetAssignedManeuver(MovementFromString(maneuverCode));

        if (Phases.CurrentSubPhase.GetType() == typeof(SubPhases.PlanningSubPhase))
        {
            Roster.HighlightShipOff(Selection.ThisShip);

            if (Roster.AllManuversAreAssigned(Phases.CurrentPhasePlayer))
            {
                UI.ShowNextButton();
                UI.HighlightNextButton();
            }
        }
        else
        {
            Triggers.FinishTrigger();
        }
    }