Пример #1
0
        private void PerformFreeAction(object sender, System.EventArgs e)
        {
            HostShip.GenerateAvailableActionsList();
            List <ActionsList.GenericAction> actions = Selection.ThisShip.GetAvailableActionsList();

            HostShip.AskPerformFreeAction(actions, Triggers.FinishTrigger);
        }
Пример #2
0
        private void UseAdvancedSensors(object sender, System.EventArgs e)
        {
            HostShip.GenerateAvailableActionsList();
            List <ActionsList.GenericAction> actions = HostShip.GetAvailableActionsList();

            HostShip.AskPerformFreeAction(actions, SubPhases.DecisionSubPhase.ConfirmDecision);
            // if ability is used, skipped Perform Action
            HostShip.IsSkipsActionSubPhase = true;
        }
Пример #3
0
        private void PerformAction(object sender, System.EventArgs e)
        {
            HostShip.GenerateAvailableActionsList();
            List <GenericAction> actions = Selection.ThisShip.GetAvailableActionsList();

            HostShip.BeforeFreeActionIsPerformed += PayForceCost;
            Messages.ShowInfo("Darth Vader: you may spend 1 force to perform an action");
            HostShip.AskPerformFreeAction(actions, CleanUp);
        }
Пример #4
0
        private void DeathfireEffect(object sender, EventArgs e)
        {
            HostShip.GenerateAvailableActionsList();
            var actions = HostShip.GetAvailableActionsList()
                          .Where(action => action is BombDropAction)
                          .ToList();

            HostShip.AskPerformFreeAction(actions, () =>
            {
                ClearIsAbilityUsedFlag();
                Triggers.FinishTrigger();
            });
        }
Пример #5
0
        private void PerformFreeAction(object sender, System.EventArgs e)
        {
            HostShip.GenerateAvailableActionsList();

            var previousSelectedShip = Selection.ThisShip;

            Selection.ThisShip = HostShip;

            HostShip.AskPerformFreeAction(HostShip.GetAvailableActionsList(), delegate
            {
                Selection.ThisShip = previousSelectedShip;
                Triggers.FinishTrigger();
            });
        }