Example #1
0
        public override void ActionTake()
        {
            CoordinateActionData = HostShip.CallCheckCoordinateModeModification();

            if (CoordinateActionData.MaxTargets == 1)
            {
                CoordinateTargetSubPhase subphase = Phases.StartTemporarySubPhaseNew <CoordinateTargetSubPhase>(
                    "Select target for Coordinate",
                    Phases.CurrentSubPhase.CallBack
                    );
                subphase.HostAction = this;
                subphase.Start();
            }
            else
            {
                CoordinateMultiTargetSubPhase subphase = Phases.StartTemporarySubPhaseNew <CoordinateMultiTargetSubPhase>(
                    "Select targets for Coordinate",
                    Phases.CurrentSubPhase.CallBack
                    );
                subphase.HostAction = this;

                subphase.RequiredPlayer = HostShip.Owner.PlayerNo;

                subphase.Filter               = FilterCoordinateTargets;
                subphase.MaxToSelect          = CoordinateActionData.MaxTargets;
                subphase.WhenDone             = CoordinateTargets;
                subphase.CoordinateActionData = CoordinateActionData;

                subphase.DescriptionShort = "Coordinate Action";
                subphase.DescriptionLong  = "Select one or more other ships.\nThey will each perform an action.";

                subphase.Start();
            }
        }