Esempio n. 1
0
        public override bool IsAllowedForSquadBuilderPostCheck(SquadList squadList)
        {
            bool result = false;

            if (squadList.SquadFaction == Faction.Scum)
            {
                result = true;
            }

            if (squadList.SquadFaction == Faction.Imperial)
            {
                foreach (var shipHolder in squadList.GetShips())
                {
                    if (shipHolder.Instance.PilotName == "Darth Vader")
                    {
                        return(true);
                    }

                    foreach (var upgrade in shipHolder.Instance.UpgradeBar.GetUpgradesAll())
                    {
                        if (upgrade.Name == "Darth Vader")
                        {
                            return(true);
                        }
                    }
                }

                if (result != true)
                {
                    Messages.ShowError("BT-1 cannot be in Imperial squad without Darth Vader");
                }
            }

            return(result);
        }
Esempio n. 2
0
        public override bool IsAllowedForSquadBuilderPostCheck(SquadList squadList)
        {
            bool result = false;

            if (squadList.SquadFaction == Faction.Scum)
            {
                result = true;
            }

            if (squadList.SquadFaction == Faction.Rebel)
            {
                foreach (var shipHolder in squadList.GetShips())
                {
                    if (shipHolder.Instance.PilotInfo.PilotName == "Ezra Bridger")
                    {
                        return(true);
                    }

                    foreach (var upgrade in shipHolder.Instance.UpgradeBar.GetUpgradesAll())
                    {
                        if (upgrade.UpgradeInfo.Name == "Ezra Bridger")
                        {
                            return(true);
                        }
                    }
                }

                if (result != true)
                {
                    Messages.ShowError("Maul cannot be in a Rebel squad that does not contain Ezra Bridger");
                }
            }

            return(result);
        }
Esempio n. 3
0
            public override bool IsAllowedForSquadBuilderPostCheck(SquadList squadList)
            {
                foreach (var shipHolder in squadList.GetShips())
                {
                    foreach (var upgrade in shipHolder.Instance.UpgradeBar.GetUpgradesAll())
                    {
                        if (upgrade.UpgradeInfo.Name == "Hound's Tooth")
                        {
                            return(true);
                        }
                    }
                }

                Messages.ShowError("You need YV-666 ship with Hound's Tooth title\nto use Nashtah Pup in squad");
                return(false);
            }
Esempio n. 4
0
        public override bool IsAllowedForSquadBuilderPostCheck(SquadList squadList)
        {
            int sameUpgradesInstalled = 0;

            foreach (var ship in squadList.GetShips())
            {
                foreach (var upgrade in ship.Instance.UpgradeBar.GetUpgradesOnlyFaceup())
                {
                    if (upgrade.GetType() == this.GetType())
                    {
                        sameUpgradesInstalled++;
                    }
                }
            }
            ;
            if (sameUpgradesInstalled > 2)
            {
                Messages.ShowError("Cannot have more than 2 Attanni Mindlinks");
            }
            return(sameUpgradesInstalled < 3);
        }