Example #1
0
        private void GrantAction()
        {
            TargetShip.BeforeActionIsPerformed += PayForceCost;

            SelectShipSubPhase.FinishSelectionNoCallback();
            Selection.ThisShip = TargetShip;

            var oldValue = TargetShip.CanPerformActionsWhileStressed;

            TargetShip.CanPerformActionsWhileStressed = true;
            var actions = TargetShip.GetAvailableActions();

            TargetShip.AskPerformFreeAction(
                actions,
                delegate {
                TargetShip.CanPerformActionsWhileStressed = oldValue;
                Selection.ThisShip = HostShip;
                TargetShip.BeforeActionIsPerformed -= PayForceCost;
                Triggers.FinishTrigger();
            },
                HostShip.PilotInfo.PilotName,
                "You may perform an action, even if you is stressed.",
                HostShip
                );
        }
Example #2
0
        private void GrantAction()
        {
            TargetShip.BeforeActionIsPerformed += PayForceCost;

            SelectShipSubPhase.FinishSelectionNoCallback();
            Selection.ThisShip = TargetShip;

            TargetShip.OnCheckCanPerformActionsWhileStressed += ConfirmThatIsPossible;
            TargetShip.OnCanPerformActionWhileStressed       += AlwaysAllow;

            var actions = TargetShip.GetAvailableActions();

            TargetShip.AskPerformFreeAction(
                actions,
                delegate {
                TargetShip.OnCheckCanPerformActionsWhileStressed -= ConfirmThatIsPossible;
                TargetShip.OnCanPerformActionWhileStressed       -= AlwaysAllow;

                Selection.ThisShip = HostShip;
                TargetShip.BeforeActionIsPerformed -= PayForceCost;
                Triggers.FinishTrigger();
            },
                HostShip.PilotInfo.PilotName,
                "You may perform an action, even if you is stressed.",
                HostShip
                );
        }
Example #3
0
        protected virtual void PerformFreeAction()
        {
            Selection.ThisShip = TargetShip;

            TargetShip.AskPerformFreeAction(
                TargetShip.GetAvailableActions(),
                delegate {
                Selection.ThisShip = HostShip;
                SelectShipSubPhase.FinishSelection();
            });
        }
        protected override void PerformFreeAction(object sender, System.EventArgs e)
        {
            List <GenericAction> actions = TargetShip.GetAvailableActions();

            TargetShip.AskPerformFreeAction(
                actions,
                delegate {
                Selection.ThisShip = HostShip;
                Phases.CurrentSubPhase.Resume();
                Triggers.FinishTrigger();
            });
        }
Example #5
0
        protected virtual void PerformFreeAction(object sender, System.EventArgs e)
        {
            List <GenericAction> actions          = TargetShip.GetAvailableActions();
            List <GenericAction> actionBarActions = actions.Where(n => n.IsInActionBar).ToList();

            TargetShip.AskPerformFreeAction(
                actionBarActions,
                delegate {
                Selection.ThisShip = HostShip;
                Phases.CurrentSubPhase.Resume();
                Triggers.FinishTrigger();
            });
        }
Example #6
0
        protected virtual void PerformFreeAction()
        {
            Selection.ThisShip = TargetShip;

            TargetShip.AskPerformFreeAction(
                TargetShip.GetAvailableActions(),
                delegate {
                Selection.ThisShip = HostShip;
                SelectShipSubPhase.FinishSelection();
            },
                HostShip.PilotInfo.PilotName,
                "You may perform 1 free action",
                HostShip
                );
        }