Exemple #1
0
 private void ActivateIg2000Ability()
 {
     foreach (var ship in HostShip.Owner.Ships)
     {
         if (ship.Value.ShipId != HostShip.ShipId)
         {
             if (ship.Value.UpgradeBar.GetUpgradesOnlyFaceup().Any(n => n.UpgradeInfo.Name == "IG-2000"))
             {
                 Type           pilotAbilityType = ship.Value.PilotAbilities[0].GetType();
                 GenericAbility pilotAbility     = (GenericAbility)System.Activator.CreateInstance(pilotAbilityType);
                 pilotAbility.Initialize(HostShip);
                 HostShip.PilotAbilities.Add(pilotAbility);
             }
         }
     }
 }
Exemple #2
0
        private void OnUndocked(GenericShip dockingHost)
        {
            HostShip.PilotName  = dockingHost.PilotName;
            HostShip.PilotSkill = dockingHost.PilotSkill;

            HostShip.UsesCharges = dockingHost.UsesCharges;
            HostShip.MaxCharges  = dockingHost.MaxCharges;
            HostShip.Charges     = dockingHost.Charges;

            Type           pilotAbilityType = dockingHost.PilotAbilities[0].GetType();
            GenericAbility pilotAbility     = (GenericAbility)System.Activator.CreateInstance(pilotAbilityType);

            pilotAbility.Initialize(HostShip);
            HostShip.PilotAbilities.Add(pilotAbility);

            Roster.UpdateShipStats(HostShip);
        }
Exemple #3
0
        private void OnUndocked(GenericShip dockingHost)
        {
            HostShip.PilotInfo = new PilotCardInfo(
                dockingHost.PilotInfo.PilotName,
                dockingHost.PilotInfo.Initiative,
                6,
                isLimited: true,
                charges: dockingHost.PilotInfo.Charges,
                regensCharges: dockingHost.PilotInfo.RegensCharges
                );

            Type           pilotAbilityType = dockingHost.PilotInfo.AbilityType;
            GenericAbility pilotAbility     = (GenericAbility)System.Activator.CreateInstance(pilotAbilityType);

            pilotAbility.Initialize(HostShip);
            HostShip.PilotAbilities.Add(pilotAbility);

            Roster.UpdateShipStats(HostShip);
        }