Пример #1
0
        private void UseAbility(object sender, EventArgs e)
        {
            if (HostShip.AssignedManeuver.ColorComplexity == MovementComplexity.Complex && HostUpgrade.State.Charges > 0)
            {
                HostShip.BeforeActionIsPerformed += SpendCharge;

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

                List <GenericAction> actions = HostShip.GetAvailableActions();

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

                    HostShip.BeforeActionIsPerformed -= SpendCharge;
                    Triggers.FinishTrigger();
                },
                    HostUpgrade.UpgradeInfo.Name,
                    "After you fully execute a red maneuver, you may spend 1 Charge to perform an action, even while stressed",
                    HostUpgrade
                    );
            }
            else
            {
                Triggers.FinishTrigger();
            }
        }
Пример #2
0
        private void PerfromFreeActionFromUpgradeBar(object sender, System.EventArgs e)
        {
            List <GenericAction> actions          = HostShip.GetAvailableActions();
            List <GenericAction> actionBarActions = actions.Where(n => n.IsInActionBar).ToList();

            Selection.ThisShip.AskPerformFreeAction(actionBarActions, Triggers.FinishTrigger);
        }
Пример #3
0
        private void PerformPushAction(object sender, System.EventArgs e)
        {
            List <GenericAction> actions          = HostShip.GetAvailableActions();
            List <GenericAction> actionBarActions = actions.Where(n => n.IsInActionBar).ToList();

            HostShip.AskPerformFreeAction(actionBarActions, AddStressToken);
        }
Пример #4
0
        private void UseAdvancedSensors(object sender, System.EventArgs e)
        {
            List <GenericAction> actions = HostShip.GetAvailableActions();

            HostShip.AskPerformFreeAction(actions, SubPhases.DecisionSubPhase.ConfirmDecision);
            // if ability is used, skipped Perform Action
            HostShip.IsSkipsActionSubPhase = true;
        }
Пример #5
0
        private void UseAdvancedSensors(object sender, System.EventArgs e)
        {
            Messages.ShowInfoToHuman(HostUpgrade.UpgradeInfo.Name + ": You can perform an action");

            HostShip.OnActionIsPerformed += SkipActionsUntilEndOfActivation;
            HostShip.OnActionIsSkipped += SkipAbility;

            List<GenericAction> actions = HostShip.GetAvailableActions();
            HostShip.AskPerformFreeAction(actions, Triggers.FinishTrigger);
        }
Пример #6
0
 private void PerformFreeAction()
 {
     HostShip.AskPerformFreeAction(
         HostShip.GetAvailableActions(),
         FinishAbility,
         HostShip.PilotInfo.PilotName,
         "After you defend, you may spend 1 Calculate token to perform an action",
         HostShip
         );
 }
Пример #7
0
 private void AskToPerformFreeAction(object sender, System.EventArgs e)
 {
     HostShip.AskPerformFreeAction(
         HostShip.GetAvailableActions(),
         Triggers.FinishTrigger,
         HostShip.PilotInfo.PilotName,
         "After you drop or launch a device, you may perform an action",
         HostShip
         );
 }
Пример #8
0
        protected override void PerfromFreeActionFromUpgradeBar(object sender, EventArgs e)
        {
            List <GenericAction> actions = HostShip.GetAvailableActions();
            List <GenericAction> whiteActionBarActionsAsRed = actions
                                                              .Where(n => n.IsInActionBar && !n.IsRed)
                                                              .Select(n => n.AsRedAction)
                                                              .ToList();

            Selection.ThisShip.AskPerformFreeAction(whiteActionBarActionsAsRed, Triggers.FinishTrigger);
        }
Пример #9
0
 private void AskToPerfromFreeAction(object sender, EventArgs e)
 {
     HostShip.AskPerformFreeAction(
         HostShip.GetAvailableActions(),
         Triggers.FinishTrigger,
         HostShip.PilotInfo.PilotName,
         "When you become the active ship during the Activation phase, if you have 1 or more focus tokens, you may perform a free action",
         HostShip
         );
 }
Пример #10
0
        private void PerformFreeAction(object sender, System.EventArgs e)
        {
            var previousSelectedShip = Selection.ThisShip;

            Selection.ThisShip = HostShip;

            HostShip.AskPerformFreeAction(HostShip.GetAvailableActions(), delegate
            {
                Selection.ThisShip = previousSelectedShip;
                Triggers.FinishTrigger();
            });
        }
Пример #11
0
        private void DeathfireEffect(object sender, EventArgs e)
        {
            var actions = HostShip.GetAvailableActions()
                          .Where(action => action is BombDropAction)
                          .ToList();

            HostShip.AskPerformFreeAction(actions, () =>
            {
                ClearIsAbilityUsedFlag();
                Triggers.FinishTrigger();
            });
        }
Пример #12
0
        private void PerformPushAction(object sender, System.EventArgs e)
        {
            List <GenericAction> actions          = HostShip.GetAvailableActions();
            List <GenericAction> actionBarActions = actions.Where(n => n.IsInActionBar).ToList();

            HostShip.AskPerformFreeAction(
                actionBarActions,
                AddStressToken,
                HostUpgrade.UpgradeInfo.Name,
                "Once per round, after you perform an action, you may perform 1 free action shown in your action bar. Then receive 1 stress token.",
                HostUpgrade
                );
        }
Пример #13
0
        protected virtual void PerfromFreeActionFromUpgradeBar(object sender, System.EventArgs e)
        {
            List <GenericAction> actions          = HostShip.GetAvailableActions();
            List <GenericAction> actionBarActions = actions.Where(n => n.IsInActionBar).ToList();

            Selection.ThisShip.AskPerformFreeAction(
                actionBarActions,
                Triggers.FinishTrigger,
                HostUpgrade.UpgradeInfo.Name,
                "After performing a SLAM action, if you did not overlap an obstacle or another ship, you may perform a free action on your action bar",
                HostUpgrade
                );
        }
Пример #14
0
        private void PerformExperimentalInterfaceAction(object sender, System.EventArgs e)
        {
            List <GenericAction> actions             = HostShip.GetAvailableActions();
            List <GenericAction> notActionBarActions = actions.Where(n => !n.IsInActionBar).ToList();

            HostShip.AskPerformFreeAction(
                notActionBarActions,
                AddStressToken,
                HostUpgrade.UpgradeInfo.Name,
                "Once per round, after you perform an action, you may perform 1 free action from an equipped Upgrade card with the \"Action: \" header. Then receive 1 stress token.",
                HostUpgrade
                );
        }
Пример #15
0
        private void AgreeToPerformAction(object sender, EventArgs e)
        {
            SubPhases.DecisionSubPhase.ConfirmDecisionNoCallback();

            HostShip.State.Force--;

            HostShip.AskPerformFreeAction(
                HostShip.GetAvailableActions(),
                Triggers.FinishTrigger,
                HostShip.PilotInfo.PilotName,
                "After you perform an attack that hits, you may spend 1 Force to perform an action",
                HostShip
                );
        }
Пример #16
0
        private void UseAdvancedSensors(object sender, System.EventArgs e)
        {
            List <GenericAction> actions = HostShip.GetAvailableActions();

            // if ability is used, skipped Perform Action
            HostShip.IsSkipsActionSubPhase = true;

            HostShip.AskPerformFreeAction(
                actions,
                SubPhases.DecisionSubPhase.ConfirmDecision,
                HostUpgrade.UpgradeInfo.Name,
                "You may perform 1 action. You cannot perform another action during your activation.",
                HostUpgrade
                );
        }
Пример #17
0
        private void UseAdvancedSensors(object sender, System.EventArgs e)
        {
            HostShip.OnActionIsPerformed += SkipActionsUntilEndOfActivation;
            HostShip.OnActionIsSkipped   += SkipAbility;

            List <GenericAction> actions = HostShip.GetAvailableActions();

            HostShip.AskPerformFreeAction(
                actions,
                Triggers.FinishTrigger,
                HostUpgrade.UpgradeInfo.Name,
                "You may perform 1 action. You cannot perform another action during your activation.",
                HostUpgrade
                );
        }
Пример #18
0
        private void PerformAction(object sender, System.EventArgs e)
        {
            var previousSelectedShip = Selection.ThisShip;

            Selection.ThisShip = HostShip;

            Messages.ShowInfoToHuman(HostName + ": you may spend 1 charge to perform an action");

            HostShip.BeforeFreeActionIsPerformed += SpendCharge;

            HostShip.AskPerformFreeAction(HostShip.GetAvailableActions(), delegate
            {
                Selection.ThisShip = previousSelectedShip;
                CleanUp();
            });
        }
Пример #19
0
        protected override void PerfromFreeActionFromUpgradeBar(object sender, EventArgs e)
        {
            List <GenericAction> actions = HostShip.GetAvailableActions();
            List <GenericAction> whiteActionBarActionsAsRed = actions
                                                              .Where(n => n.IsInActionBar && n.Color == ActionColor.White)
                                                              .Select(n => n.AsRedAction)
                                                              .ToList();

            Selection.ThisShip.AskPerformFreeAction(
                whiteActionBarActionsAsRed,
                Triggers.FinishTrigger,
                HostUpgrade.UpgradeInfo.Name,
                "After you perform a SLAM action, if you fully executed the maneuver, you may perform a white action on your action bar, treating that action as red",
                HostUpgrade
                );
        }
Пример #20
0
        private void DeathfireEffect(object sender, EventArgs e)
        {
            var actions = HostShip.GetAvailableActions()
                          .Where(action => action is BombDropAction)
                          .ToList();

            HostShip.AskPerformFreeAction(
                actions, () =>
            {
                ClearIsAbilityUsedFlag();
                Triggers.FinishTrigger();
            },
                HostShip.PilotInfo.PilotName,
                "When you reveal your maneuver dial or after you perform an action, you may perform a Bomb Upgrade card action as a free action",
                HostShip
                );
        }
Пример #21
0
        private void UseHeffTobberAbility(object sender, EventArgs e)
        {
            Messages.ShowInfo("Heff Tobber can perform free action");

            GenericShip previousActiveShip = Selection.ThisShip;

            Selection.ChangeActiveShip(HostShip);
            List <GenericAction> actions = HostShip.GetAvailableActions();

            HostShip.AskPerformFreeAction(
                actions,
                delegate {
                Selection.ChangeActiveShip(previousActiveShip);
                Triggers.FinishTrigger();
            }
                );
        }
Пример #22
0
        private void PerformFreeAction(object sender, System.EventArgs e)
        {
            var previousSelectedShip = Selection.ThisShip;

            Selection.ThisShip = HostShip;

            HostShip.AskPerformFreeAction(
                HostShip.GetAvailableActions(),
                delegate
            {
                Selection.ThisShip = previousSelectedShip;
                Triggers.FinishTrigger();
            },
                HostShip.PilotInfo.PilotName,
                "After an enemy ship inside your firing arc at Range 1-3 attacks another friendly ship, you may perform a free action",
                HostShip
                );
        }
Пример #23
0
        private void PerformFreeAction(object sender, System.EventArgs e)
        {
            var previousSelectedShip = Selection.ThisShip;

            Selection.ThisShip = HostShip;

            HostShip.AskPerformFreeAction(
                HostShip.GetAvailableActions(),
                delegate
            {
                Selection.ThisShip = previousSelectedShip;
                Triggers.FinishTrigger();
            },
                HostShip.PilotInfo.PilotName,
                "After a friendly ship at range 0-1 defends, you may perform an action",
                HostShip
                );
        }
Пример #24
0
        private void UseHeffTobberAbility(object sender, EventArgs e)
        {
            GenericShip previousActiveShip = Selection.ThisShip;

            Selection.ChangeActiveShip(HostShip);
            List <GenericAction> actions = HostShip.GetAvailableActions();

            HostShip.AskPerformFreeAction(
                actions,
                delegate {
                Selection.ChangeActiveShip(previousActiveShip);
                Triggers.FinishTrigger();
            },
                HostShip.PilotInfo.PilotName,
                "After an enemy executes a maneuver, if it is at range 0, you may perform an action",
                HostShip
                );
        }
Пример #25
0
 private void AskToPerfromFreeAction(object sender, EventArgs e)
 {
     HostShip.AskPerformFreeAction(HostShip.GetAvailableActions(), Triggers.FinishTrigger);
 }
Пример #26
0
        private void AskToPerformFreeAction(object sender, System.EventArgs e)
        {
            Messages.ShowInfo("\"Deathrain\" can perform an action");

            HostShip.AskPerformFreeAction(HostShip.GetAvailableActions(), Triggers.FinishTrigger);
        }