示例#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
                });
            }
        }
示例#2
0
 private void AddDebrisGambitAction(GenericShip host)
 {
     host.AddAvailableAction(new EvadeAction()
     {
         IsRed = true
     });
 }
示例#3
0
 private void AddRemoveStressActionForHotacAI(GenericShip host)
 {
     host.AddAvailableAction(new HotacRemoveStressAction()
     {
         Host = host
     });
 }
示例#4
0
 private void SquadLeaderAddAction(GenericShip host)
 {
     ActionsList.GenericAction newAction = new ActionsList.SquadLeaderAction()
     {
         ImageUrl = ImageUrl, Host = this.Host, Source = this
     };
     host.AddAvailableAction(newAction);
 }
示例#5
0
 private void LeeboAction(GenericShip ship)
 {
     ActionsList.GenericAction action = new ActionsList.LeeboAction()
     {
         Host = this.HostShip
     };
     ship.AddAvailableAction(action);
 }
示例#6
0
 private void RageAddAction(GenericShip host)
 {
     ActionsList.GenericAction action = new ActionsList.RageAction()
     {
         ImageUrl = HostUpgrade.ImageUrl,
         Host     = HostShip
     };
     host.AddAvailableAction(action);
 }
示例#7
0
 private void AddRepairAction(GenericShip harpoonedShip)
 {
     ActionsList.GenericAction action = new ActionsList.HarpoonedRepairAction()
     {
         ImageUrl = (new Harpooned(harpoonedShip)).Tooltip,
         Host     = harpoonedShip
     };
     harpoonedShip.AddAvailableAction(action);
 }
        protected void AddActionIcon(GenericShip host)
        {
            var alreadyHasBarrelRoll = host.PrintedActions.Any(n => n is BarrelRollAction);

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

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

            host.AddAvailableAction(newAction);
        }
示例#13
0
        private void AddT65BAction(GenericShip host)
        {
            GenericAction newAction = new T65BAction()
            {
                ImageUrl = HostUpgrade.ImageUrl,
                Host     = host
            };

            host.AddAvailableAction(newAction);
        }
示例#14
0
        private void AddExpertHandlingAction(GenericShip host)
        {
            GenericAction newAction = new ExpertHandlingAction()
            {
                ImageUrl = HostUpgrade.ImageUrl,
                Host     = host
            };

            host.AddAvailableAction(newAction);
        }
示例#15
0
 private void SquadLeaderAddAction(GenericShip host)
 {
     ActionsList.GenericAction newAction = new ActionsList.SquadLeaderAction()
     {
         ImageUrl = HostUpgrade.ImageUrl,
         Host     = HostShip,
         Source   = HostUpgrade
     };
     host.AddAvailableAction(newAction);
 }
示例#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());
         }
     }
 }
示例#18
0
 private void AddAction(GenericShip ship)
 {
     ship.AddAvailableAction(new HondoOhnakaAction()
     {
         ImageUrl = HostUpgrade.ImageUrl,
         HostShip = HostShip,
         Source   = HostUpgrade,
         Ability  = this,
         Name     = "Hondo Ohnaka"
     });
 }
示例#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
     });
 }
示例#20
0
        private void AddDropSparePartsAction(GenericShip ship)
        {
            SparePartsCanistersDropCharge action = new SparePartsCanistersDropCharge()
            {
                Source   = HostUpgrade,
                HostShip = ship,
                ImageUrl = HostUpgrade.ImageUrl,
                DoAction = DropSparePartsToken
            };

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

            ship.AddAvailableAction(action);
        }
示例#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
                        }
                    });
                }
            }
示例#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);
     }
 }
示例#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"
         });
     }
 }
 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"
         });
     }
 }
示例#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);
            }
        }
示例#28
0
 protected void AddCancelCritAction()
 {
     ActionsList.CancelCritAction cancelCritAction = new ActionsList.CancelCritAction();
     cancelCritAction.Initilize(this);
     Host.AddAvailableAction(cancelCritAction);
 }
示例#29
0
 private void ExposeAddAction(GenericShip host)
 {
     ActionsList.GenericAction newAction = new ActionsList.ExposeAction();
     newAction.ImageUrl = ImageUrl;
     host.AddAvailableAction(newAction);
 }