public override void DoAction(GenericAbility ability)
        {
            Ability = ability;
            ShipsThatCanBeActivated = Ability.GetTargetsForAbility(FilterTargets);

            StartSelection();
        }
        public override void DoAction(GenericAbility ability)
        {
            Ability = ability;

            GetDualCard().Flip();
            Triggers.FinishTrigger();
        }
        public override void DoAction(GenericAbility ability)
        {
            Ability = ability;

            Messages.ShowInfo(GetMessage());
            Ability.HostShip.Tokens.TransferToken(TokenType, Ability.TargetShip, Triggers.FinishTrigger);
        }
        public override void DoAction(GenericAbility ability)
        {
            Ability = ability;
            UpgradesThatCanBeTransfered = GetUpgradesFiltered();

            StartSelection();
        }
        public override void DoAction(GenericAbility ability)
        {
            Ability = ability;
            if (GetMessage != null)
            {
                Messages.ShowInfo(GetMessage());
            }
            int count = (GetCount != null) ? GetCount() : 1;

            GetShip().Tokens.AssignTokens(CreateToken, count, FinishAbilityPart);
        }
        public override void DoAction(GenericAbility ability)
        {
            Ability = ability;

            AbilityDiceRollCheckSubphase subphase = Phases.StartTemporarySubPhaseNew <AbilityDiceRollCheckSubphase>("Ability Check", Triggers.FinishTrigger);

            subphase.AfterRoll = CheckResults;
            subphase.DiceKind  = DiceType;
            subphase.DiceCount = 1;

            subphase.RequiredPlayer = Ability.HostShip.Owner.PlayerNo;
            subphase.Start();
        }
        public override void DoAction(GenericAbility ability)
        {
            Ability = ability;

            if (Ability.HostShip.SectorsInfo.IsShipInSector(GetTargetShip(), SectorType))
            {
                Action.DoAction(Ability);
            }
            else
            {
                Triggers.FinishTrigger();
            }
        }
Beispiel #8
0
        public override void DoAction(GenericAbility ability)
        {
            Ability = ability;

            Ability.AskToUseAbility(
                Description.Name,
                AiUseByDefault,
                DoOnYes,
                DoOnNo,
                descriptionLong: Description.Description,
                imageHolder: Description.ImageSource,
                requiredPlayer: Ability.HostShip.Owner.PlayerNo
                );
        }
        public override void DoAction(GenericAbility ability)
        {
            Ability = ability;

            Ability.HostShip.AskPerformFreeAction
            (
                ActionInfo.GenerateAction(),
                Finish,
                Description.Name,
                Description.Description,
                Description.ImageSource,
                false
            );
        }
Beispiel #10
0
        public override void DoAction(GenericAbility ability)
        {
            Ability = ability;

            Ability.AskToUseAbility
            (
                Description.Name,
                Ability.AlwaysUseByDefault,
                AcquireTargetLock,
                descriptionLong: Description.Description,
                imageHolder: Description.ImageSource,
                dontUseAbility: GoNext
            );
        }
Beispiel #11
0
 private void ActivateIg2000Ability()
 {
     foreach (var ship in HostShip.Owner.Ships)
     {
         if (ship.Value.ShipId != HostShip.ShipId)
         {
             if (ship.Value.UpgradeBar.GetUpgradesOnlyFaceup().Count(n => n is UpgradesList.Ig2000) > 0)
             {
                 Type           pilotAbilityType = ship.Value.PilotAbilities[0].GetType();
                 GenericAbility pilotAbility     = (GenericAbility)System.Activator.CreateInstance(pilotAbilityType);
                 pilotAbility.Initialize(HostShip);
                 HostShip.PilotAbilities.Add(pilotAbility);
             }
         }
     }
 }
Beispiel #12
0
        public override void DoAction(GenericAbility ability)
        {
            Ability = ability;

            if (TargetUpgrade.IsAllowedForShip(Ability.TargetShip) && TargetUpgrade.UpgradeInfo.Restrictions.IsAllowedForShip(Ability.TargetShip))
            {
                TargetUpgrade.DettachFromShip();
                TargetUpgrade.PreDettachFromShip();
                TargetUpgrade.PreAttachToShip(Ability.TargetShip);
                TargetUpgrade.AttachToShip(Ability.TargetShip);

                Roster.UpdateUpgradesPanel(Ability.TargetShip, Ability.TargetShip.InfoPanel);
                Roster.UpdateUpgradesPanel(Ability.HostShip, Ability.HostShip.InfoPanel);
            }
            else
            {
                Messages.ShowError("This upgrade cannot be installed on this ship");
            }
            Triggers.FinishTrigger();
        }
Beispiel #13
0
        public override void DoAction(GenericAbility ability)
        {
            Ability = ability;

            if (ChangeToSideslip)
            {
                GenericMovement movement = null;
                switch (Ability.HostShip.RevealedManeuver.Bearing)
                {
                case ManeuverBearing.Bank:
                    movement = new SideslipBankMovement(
                        Ability.HostShip.RevealedManeuver.Speed,
                        Ability.HostShip.RevealedManeuver.Direction,
                        ManeuverBearing.SideslipBank,
                        Ability.HostShip.RevealedManeuver.ColorComplexity
                        );
                    break;

                case ManeuverBearing.Turn:
                    movement = new SideslipTurnMovement(
                        Ability.HostShip.RevealedManeuver.Speed,
                        Ability.HostShip.RevealedManeuver.Direction,
                        ManeuverBearing.SideslipTurn,
                        Ability.HostShip.RevealedManeuver.ColorComplexity
                        );
                    break;

                default:
                    break;
                }

                if (movement != null)
                {
                    Messages.ShowInfo("Maneuver is changed to Sideslip");
                    Ability.HostShip.SetAssignedManeuver(movement);
                }
            }

            Triggers.FinishTrigger();
        }
        public override void DoAction(GenericAbility ability)
        {
            Ability = ability;

            if (ability.TargetsForAbilityExist(FilterTargets))
            {
                ability.SelectTargetForAbility(
                    WhenSelected,
                    FilterTargets,
                    GetAiSelectShipPriority,
                    ability.HostShip.Owner.PlayerNo,
                    AbilityDescription.Name,
                    AbilityDescription.Description,
                    AbilityDescription.ImageSource,
                    ShowSkipButton
                    );
            }
            else
            {
                Triggers.FinishTrigger();
            }
        }
        public override void DoAction(GenericAbility ability)
        {
            Ability = ability;

            StartAskRotationSubphase();
        }
Beispiel #16
0
 public abstract void DoAction(GenericAbility ability);