Exemplo n.º 1
0
        private void AddActions(GenericShip ship)
        {
            var upgrades = GetNonRecurringChargeUpgrades();

            if (upgrades.Any(u => u.State.Charges > 0) && HostShip.State.ShieldsCurrent < HostShip.State.ShieldsMax)
            {
                ship.AddAvailableAction(new RecoverShieldAction()
                {
                    ImageUrl             = HostUpgrade.ImageUrl,
                    HostShip             = HostShip,
                    Source               = this.HostUpgrade,
                    GetAvailableUpgrades = GetNonRecurringChargeUpgrades
                });
            }
            if (upgrades.Any(u => u.State.Charges < u.State.MaxCharges) && HostShip.State.ShieldsCurrent >= 2)
            {
                ship.AddAvailableAction(new RecoverChargeAction()
                {
                    ImageUrl             = HostUpgrade.ImageUrl,
                    HostShip             = HostShip,
                    Source               = this.HostUpgrade,
                    GetAvailableUpgrades = GetNonRecurringChargeUpgrades
                });
            }
        }
Exemplo n.º 2
0
 private void AddDebrisGambitAction(GenericShip host)
 {
     host.AddAvailableAction(new EvadeAction()
     {
         IsRed = true
     });
 }
Exemplo n.º 3
0
 private void AddRemoveStressActionForHotacAI(GenericShip host)
 {
     host.AddAvailableAction(new HotacRemoveStressAction()
     {
         Host = host
     });
 }
Exemplo n.º 4
0
 private void SquadLeaderAddAction(GenericShip host)
 {
     ActionsList.GenericAction newAction = new ActionsList.SquadLeaderAction()
     {
         ImageUrl = ImageUrl, Host = this.Host, Source = this
     };
     host.AddAvailableAction(newAction);
 }
Exemplo n.º 5
0
 private void LeeboAction(GenericShip ship)
 {
     ActionsList.GenericAction action = new ActionsList.LeeboAction()
     {
         Host = this.HostShip
     };
     ship.AddAvailableAction(action);
 }
Exemplo n.º 6
0
 private void RageAddAction(GenericShip host)
 {
     ActionsList.GenericAction action = new ActionsList.RageAction()
     {
         ImageUrl = HostUpgrade.ImageUrl,
         Host     = HostShip
     };
     host.AddAvailableAction(action);
 }
Exemplo n.º 7
0
 private void AddRepairAction(GenericShip harpoonedShip)
 {
     ActionsList.GenericAction action = new ActionsList.HarpoonedRepairAction()
     {
         ImageUrl = (new Harpooned(harpoonedShip)).Tooltip,
         Host     = harpoonedShip
     };
     harpoonedShip.AddAvailableAction(action);
 }
Exemplo n.º 8
0
        protected void AddActionIcon(GenericShip host)
        {
            var alreadyHasBarrelRoll = host.PrintedActions.Any(n => n is BarrelRollAction);

            if (!alreadyHasBarrelRoll)
            {
                host.AddAvailableAction(new BarrelRollAction());
            }
        }
Exemplo n.º 9
0
        private void MarksmanshipAddAction(GenericShip host)
        {
            GenericAction newAction = new MarksmanshipAction
            {
                ImageUrl = HostUpgrade.ImageUrl,
                Host     = host
            };

            host.AddAvailableAction(newAction);
        }
Exemplo n.º 10
0
 private void JynErsoAddAction(GenericShip host)
 {
     ActionsList.GenericAction action = new ActionsList.JynErsoAction()
     {
         ImageUrl = HostUpgrade.ImageUrl,
         HostShip = HostShip,
         DoAction = DoJynErsoAction
     };
     host.AddAvailableAction(action);
 }
Exemplo n.º 11
0
 private void KyloRenCrewAddAction(GenericShip host)
 {
     ActionsList.GenericAction action = new ActionsList.KyloRenCrewAction()
     {
         ImageUrl = HostUpgrade.ImageUrl,
         Host     = HostShip,
         DoAction = DoKyloRenAction
     };
     host.AddAvailableAction(action);
 }
Exemplo n.º 12
0
        private void ExposeAddAction(GenericShip host)
        {
            GenericAction newAction = new ExposeAction
            {
                ImageUrl = HostUpgrade.ImageUrl,
                Host     = host
            };

            host.AddAvailableAction(newAction);
        }
Exemplo n.º 13
0
        private void AddT65BAction(GenericShip host)
        {
            GenericAction newAction = new T65BAction()
            {
                ImageUrl = HostUpgrade.ImageUrl,
                Host     = host
            };

            host.AddAvailableAction(newAction);
        }
Exemplo n.º 14
0
        private void AddExpertHandlingAction(GenericShip host)
        {
            GenericAction newAction = new ExpertHandlingAction()
            {
                ImageUrl = HostUpgrade.ImageUrl,
                Host     = host
            };

            host.AddAvailableAction(newAction);
        }
Exemplo n.º 15
0
 private void SquadLeaderAddAction(GenericShip host)
 {
     ActionsList.GenericAction newAction = new ActionsList.SquadLeaderAction()
     {
         ImageUrl = HostUpgrade.ImageUrl,
         Host     = HostShip,
         Source   = HostUpgrade
     };
     host.AddAvailableAction(newAction);
 }
Exemplo n.º 16
0
        private void R2F2AddAction(GenericShip host)
        {
            GenericAction action = new ChopperAstromechAction()
            {
                ImageUrl = HostUpgrade.ImageUrl,
                Host     = HostShip,
                DoAction = AskToDiscardAnotherUpgrade
            };

            host.AddAvailableAction(action);
        }
 private void AddAction(GenericShip host)
 {
     if (!isDiscarded)
     {
         var alreadyHasAction = host.PrintedActions.Find(n => n.GetType() == typeof(T));
         if (alreadyHasAction == null)
         {
             host.AddAvailableAction(new T());
         }
     }
 }
Exemplo n.º 18
0
 private void AddAction(GenericShip ship)
 {
     ship.AddAvailableAction(new HondoOhnakaAction()
     {
         ImageUrl = HostUpgrade.ImageUrl,
         HostShip = HostShip,
         Source   = HostUpgrade,
         Ability  = this,
         Name     = "Hondo Ohnaka"
     });
 }
Exemplo n.º 19
0
 protected void AddAction(GenericShip ship)
 {
     // Add this action to the available actions for this ship during the Action phase.
     ship.AddAvailableAction(new GenericAction()
     {
         ImageUrl = HostUpgrade.ImageUrl,
         HostShip = HostShip,
         Source   = HostUpgrade,
         DoAction = DoAction,
         Name     = HostName
     });
 }
Exemplo n.º 20
0
        private void AddDropSparePartsAction(GenericShip ship)
        {
            SparePartsCanistersDropCharge action = new SparePartsCanistersDropCharge()
            {
                Source   = HostUpgrade,
                HostShip = ship,
                ImageUrl = HostUpgrade.ImageUrl,
                DoAction = DropSparePartsToken
            };

            ship.AddAvailableAction(action);
        }
Exemplo n.º 21
0
        private void AddRecoverChargeAction(GenericShip ship)
        {
            SparePartsCanistersRecoverCharge action = new SparePartsCanistersRecoverCharge()
            {
                Source   = HostUpgrade,
                HostShip = ship,
                ImageUrl = HostUpgrade.ImageUrl,
                DoAction = DoRecoverCharge
            };

            ship.AddAvailableAction(action);
        }
Exemplo n.º 22
0
            protected void AddActionIcons(GenericShip host)
            {
                var alreadyHasBarrelRoll = host.PrintedActions.Any(n => n is BoostAction);

                if (!alreadyHasBarrelRoll)
                {
                    host.AddAvailableAction(new BoostAction());
                }

                var alreadyHasFocusToBarrelRoll = host.PrintedActions.Any(n => n is FocusAction && n.LinkedRedAction is BoostAction);

                if (!alreadyHasFocusToBarrelRoll)
                {
                    host.AddAvailableAction(new FocusAction()
                    {
                        LinkedRedAction = new BoostAction()
                        {
                            IsRed = true
                        }
                    });
                }
            }
Exemplo n.º 23
0
 private void AddRiggedCargoChuteAction(GenericShip host)
 {
     if (HostUpgrade.State.Charges > 0)
     {
         GenericAction action = new RiggedCargoChuteAction()
         {
             ImageUrl = HostUpgrade.ImageUrl,
             HostShip = HostShip,
             DoAction = DropCargoToken
         };
         host.AddAvailableAction(action);
     }
 }
Exemplo n.º 24
0
 protected void AddPassiveSensorsAction(GenericShip ship)
 {
     if (HostUpgrade.State.Charges > 0)
     {
         ship.AddAvailableAction(new PassiveSensorsAction()
         {
             ImageUrl = HostUpgrade.ImageUrl,
             HostShip = HostShip,
             Source   = HostUpgrade,
             Name     = "Spend Passive Sensors charge"
         });
     }
 }
Exemplo n.º 25
0
 protected void AddEnergyShellChargesAction(GenericShip ship)
 {
     if (HostUpgrade.State.Charges <= 0)
     {
         ship.AddAvailableAction(new ReloadEnergyShellChargesAction()
         {
             ImageUrl = HostUpgrade.ImageUrl,
             HostShip = HostShip,
             Source   = HostUpgrade,
             Name     = "Reload Energy-Shell Charges"
         });
     }
 }
Exemplo n.º 26
0
        private void AddActions(GenericShip ship)
        {
            if (HostUpgrade.State.Charges > 0 && HostShip.State.ShieldsCurrent < HostShip.State.ShieldsMax)
            {
                ship.AddAvailableAction(new RecoverShieldAction()
                {
                    ImageUrl = HostUpgrade.ImageUrl,
                    HostShip = HostShip,
                    Source   = HostUpgrade,
                    Name     = "Gonk: Spend 1 charge to recover 1 shield"
                });
            }

            if (HostUpgrade.State.Charges == 0)
            {
                ship.AddAvailableAction(new RecoverChargeAction()
                {
                    ImageUrl = HostUpgrade.ImageUrl,
                    HostShip = HostShip,
                    Source   = HostUpgrade,
                    Name     = "Gonk: Recover 1 charge"
                });
            }
        }
        private void AddAction(GenericShip host)
        {
            var alreadyHasAction = host.PrintedActions.Find(action =>
                                                            action is T && action.IsRed == IsRed &&
                                                            (LinkedAction == null || action.LinkedRedAction == null ||
                                                             (action.LinkedRedAction.GetType() == LinkedAction.GetType() && action.LinkedRedAction.IsRed == LinkedAction.IsRed))
                                                            );

            if (alreadyHasAction == null)
            {
                var action = new T();
                action.IsRed           = IsRed;
                action.LinkedRedAction = LinkedAction;
                host.AddAvailableAction(action);
            }
        }
Exemplo n.º 28
0
 protected void AddCancelCritAction()
 {
     ActionsList.CancelCritAction cancelCritAction = new ActionsList.CancelCritAction();
     cancelCritAction.Initilize(this);
     Host.AddAvailableAction(cancelCritAction);
 }
Exemplo n.º 29
0
 private void ExposeAddAction(GenericShip host)
 {
     ActionsList.GenericAction newAction = new ActionsList.ExposeAction();
     newAction.ImageUrl = ImageUrl;
     host.AddAvailableAction(newAction);
 }