private void UpgradeInstalled(UpgradeType slotType) { SlotTypes .Where(slot => slot != slotType) .ToList() .ForEach(slot => UpgradeBar.RemoveSlot(slot, this)); }
public virtual void InitializeUpgrades() { foreach (var slot in UpgradeBar.GetUpgradeSlots()) { slot.TryInstallUpgrade(slot.InstalledUpgrade, this); } }
private void InitializeSlots() { foreach (var slot in PrintedUpgradeIcons) { UpgradeBar.AddSlot(slot); } }
private void PerformShipDestruction(Action callback, bool isFled = false) { IsDestroyed = true; Roster.DestroyShip(this.GetTag()); foreach (var pilotAbility in PilotAbilities) { pilotAbility.DeactivateAbility(); } foreach (var upgrade in UpgradeBar.GetUpgradesOnlyFaceup()) { foreach (var upgradeAbility in upgrade.UpgradeAbilities) { upgradeAbility.DeactivateAbility(); } } if (OnShipIsDestroyed != null) { OnShipIsDestroyed(this, isFled); } if (OnDestroyedGlobal != null) { OnDestroyedGlobal(this, isFled); } Triggers.ResolveTriggers(TriggerTypes.OnShipIsDestroyed, callback); }
private void UpgradeRemoved(UpgradeType slotType) { SlotTypes .Where(slot => slot != slotType) .ToList() .ForEach(slot => UpgradeBar.AddSlot(CreateSlot(slot))); }
public UpgradeView(Texture2D text, Player player, List <IDs> upgradePartsIDs) //remove text param { activeSelection = -1; this.upgradePartsIDs = upgradePartsIDs; this.player = player; UpgradeBar = new UpgradeBar(upgradePartsIDs, text); shipItems = new Dictionary <int, ShipItem>(); Initialize(); }
public DutchVanderElite() : base() { PilotName = "\"Dutch\" Vander (Elite)"; ImageUrl = "https://i.imgur.com/aakKh9D.png"; UpgradeBar.AddSlot(Upgrade.UpgradeType.Elite); RequiredMods.Add(typeof(EliteYWingPilotsMod)); }
public HortonSalmElite() : base() { PilotName = "Horton Salm (Elite)"; ImageUrl = "https://i.imgur.com/iOArz8A.png"; UpgradeBar.AddSlot(Upgrade.UpgradeType.Elite); RequiredMods.Add(typeof(EliteYWingPilotsMod)); }
public KyloRenUpsilon() : base() { PilotName = "Kylo Ren"; PilotSkill = 6; Cost = 34; IsUnique = true; UpgradeBar.AddSlot(UpgradeType.Elite); PilotAbilities.Add(new KyloRenPilotAbility()); }
public void Load(ContentManager Content, GraphicsDevice graphics) { this.graphics = graphics; TreasureManager.Content = Content; CollectTreasureInfo.LoadContent(Content); upgradeBar = new UpgradeBar(Content, playerManager.getPlayer(), 0.65f); //for (int i = 0; i < treasureList.Count; i++) //{ // treasureList[i].Load(Content, "arrow1"); //} }
private void InitializeSlots() { foreach (var slot in ShipInfo.UpgradeIcons.Upgrades) { UpgradeBar.AddSlot(slot); } foreach (var slot in PilotInfo.ExtraUpgrades) { UpgradeBar.AddSlot(slot); } }
public Zuckuss() : base() { PilotName = "Zuckuss"; PilotSkill = 7; Cost = 28; IsUnique = true; UpgradeBar.AddSlot(Upgrade.UpgradeType.Elite); PilotAbilities.Add(new ZuckussAbility()); }
public void AdaptShipToSecondEdition() { FullType = "RZ-1 A-wing"; ActionBar.AddPrintedAction(new BarrelRollAction()); UpgradeBar.RemoveSlot(Upgrade.UpgradeType.Modification); Maneuvers.Add("3.L.R", MovementComplexity.Complex); Maneuvers.Add("3.R.R", MovementComplexity.Complex); Maneuvers.Remove("3.F.R"); ShipAbilities.Add(new VectoredThrusters()); IconicPilots[Faction.Rebel] = typeof(JakeFarrell); }
public P4LOM() : base() { PilotName = "4-LOM"; PilotSkill = 3; Cost = 49; IsUnique = true; PilotRuleType = typeof(SecondEdition); ActionBar.RemovePrintedAction(typeof(FocusAction)); ActionBar.AddPrintedAction(new CalculateAction()); UpgradeBar.AddSlot(Upgrade.UpgradeType.Elite); PilotAbilities.Add(new P4LOMAbility()); }
public List <IShipWeapon> GetAllWeapons() { List <IShipWeapon> allWeapons = new List <IShipWeapon>(); foreach (PrimaryWeaponClass primaryWeapon in PrimaryWeapons) { allWeapons.Add(primaryWeapon as IShipWeapon); } foreach (GenericUpgrade upgrade in UpgradeBar.GetSpecialWeaponsActive()) { allWeapons.Add(upgrade as IShipWeapon); } return(allWeapons); }
public void AdaptShipToSecondEdition() { Maneuvers["2.L.B"] = MovementComplexity.Normal; Maneuvers["2.R.B"] = MovementComplexity.Normal; Maneuvers.Add("5.F.S", MovementComplexity.Normal); MaxHull = 3; AddedSlots = SlotTypes.Select(CreateSlot).ToList(); AddedSlots.ForEach(slot => { slot.GrantedBy = this; UpgradeBar.AddSlot(slot); }); IconicPilots[Faction.Scum] = typeof(Serissu); }
public List <IShipWeapon> GetAllWeapons() { List <IShipWeapon> allWeapons = new List <IShipWeapon>(); allWeapons.Add(PrimaryWeapon); foreach (var upgrade in UpgradeBar.GetInstalledUpgrades()) { IShipWeapon secondaryWeapon = upgrade as IShipWeapon; if (secondaryWeapon != null) { allWeapons.Add(secondaryWeapon); } } return(allWeapons); }
public void AdaptShipToSecondEdition() { FullType = "TIE/D Defender"; Maneuvers["1.L.B"] = MovementComplexity.Easy; Maneuvers["1.R.B"] = MovementComplexity.Easy; PilotAbilities.Add(new Abilities.TIEx7Ability()); MaxShields = 4; ActionBar.AddPrintedAction(new EvadeAction()); ActionBar.AddPrintedAction(new BoostAction()); UpgradeBar.RemoveSlot(Upgrade.UpgradeType.Modification); PrintedUpgradeIcons.Add(Upgrade.UpgradeType.System); }
private void InitializeSlots() { foreach (var slot in ShipInfo.UpgradeIcons.Upgrades) { UpgradeBar.AddSlot(slot); } foreach (var slot in PilotInfo.ExtraUpgrades) { UpgradeBar.AddSlot(slot); } if (DebugManager.FreeMode) { UpgradeBar.AddSlot(UpgradeType.Omni); } }
public AutopilotDrone() : base() { PilotName = "Autopilot Drone"; PilotSkill = 1; Cost = 12; IsUnique = true; UsesCharges = true; MaxCharges = 3; PrintedUpgradeIcons.Remove(Upgrade.UpgradeType.Crew); UpgradeBar.RemoveSlot(Upgrade.UpgradeType.Modification); ShipAbilities.Add(new Abilities.SecondEdition.AutopilotDroneAbility()); SEImageNumber = 229; }
public List <IShipWeapon> GetAllWeapons() { List <IShipWeapon> allWeapons = new List <IShipWeapon> { PrimaryWeapon }; foreach (var upgrade in UpgradeBar.GetUpgradesOnlyFaceup()) { IShipWeapon secondaryWeapon = upgrade as IShipWeapon; if (secondaryWeapon != null) { allWeapons.Add(secondaryWeapon); } } return(allWeapons); }
// ATTACK TYPES public int GetAnotherAttackTypesCount() { int result = 0; foreach (var upgrade in UpgradeBar.GetUpgradesOnlyFaceup()) { IShipWeapon secondaryWeapon = upgrade as IShipWeapon; if (secondaryWeapon != null) { if (secondaryWeapon.IsShotAvailable(Selection.AnotherShip)) { result++; } } } return(result); }
public void AdaptShipToSecondEdition() { FullType = "Fang Fighter"; IconicPilots[Faction.Scum] = typeof(FennRau); ShipAbilities.Add(new Abilities.SecondEdition.ConcordiaFaceoffAbility()); UpgradeBar.RemoveSlot(Upgrade.UpgradeType.Modification); ActionBar.AddActionLink(typeof(BarrelRollAction), new FocusAction() { IsRed = true }); ActionBar.AddActionLink(typeof(BoostAction), new FocusAction() { IsRed = true }); }
public void AdaptShipToSecondEdition() { PrintedActions.Remove(PrintedActions.First(n => n is EvadeAction)); Maneuvers["1.F.S"] = MovementComplexity.Normal; Maneuvers["2.L.B"] = MovementComplexity.Easy; Maneuvers["2.R.B"] = MovementComplexity.Easy; Maneuvers["3.L.E"] = MovementComplexity.Complex; Maneuvers["3.R.E"] = MovementComplexity.Complex; UpgradeBar.AddSlot(Upgrade.UpgradeType.System); PrintedActions.Add(new FocusAction() { LinkedRedAction = new BarrelRollAction() { IsRed = true } }); }
public void DeactivateAllAbilities() { foreach (var shipAbility in ShipAbilities) { shipAbility.DeactivateAbility(); } foreach (var pilotAbility in PilotAbilities) { pilotAbility.DeactivateAbility(); } foreach (var upgrade in UpgradeBar.GetUpgradesOnlyFaceup()) { foreach (var upgradeAbility in upgrade.UpgradeAbilities) { upgradeAbility.DeactivateAbility(); } } }
private void PerformShipDestruction() { Phases.OnCombatSubPhaseRequiredPilotSkillIsChanged -= PerformShipDestruction; Roster.DestroyShip(this.GetTag()); foreach (var pilotAbility in PilotAbilities) { pilotAbility.DeactivateAbility(); foreach (var upgrade in UpgradeBar.GetInstalledUpgrades()) { foreach (var upgradeAbility in upgrade.UpgradeAbilities) { upgradeAbility.DeactivateAbility(); } } } if (OnDestroyed != null) { OnDestroyed(this); } }
public void AdaptShipToSecondEdition() { FullType = "TIE Advanced v1"; Maneuvers.Add("2.L.E", MovementComplexity.Complex); Maneuvers.Add("2.R.E", MovementComplexity.Complex); Maneuvers["4.F.S"] = MovementComplexity.Normal; PrintedUpgradeIcons.Add(Upgrade.UpgradeType.System); UpgradeBar.RemoveSlot(Upgrade.UpgradeType.Modification); ActionBar.AddActionLink(typeof(BoostAction), new FocusAction() { IsRed = true }); ActionBar.AddActionLink(typeof(BarrelRollAction), new FocusAction() { IsRed = true }); ActionBar.AddPrintedAction(new EvadeAction()); }
void Awake() { upgradeBar = GetComponent <UpgradeBar>(); }