private void OnUndocked(GenericShip dockingHost) { dockingHost.OnCanReleaseDockedShipRegular -= DenyRelease; 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; if (pilotAbilityType != null) { GenericAbility pilotAbility = (GenericAbility)System.Activator.CreateInstance(pilotAbilityType); pilotAbility.Initialize(HostShip); HostShip.PilotAbilities.Add(pilotAbility); } HostShip.InitializeState(); Roster.UpdateShipStats(HostShip); }