public static bool IsDroneShip(EShipType type) { return(type == EShipType.DroneBomber || type == EShipType.DroneScout || type == EShipType.DroneFighter || type == EShipType.DroneInterceptor || type == EShipType.DroneGunship || type == EShipType.DroneStealthFighter || type == EShipType.DroneStealthBomber); }
public bool HasResearchedShipType(EShipType type) { var unlockedItems = (from i in TechItems where i.Completed select i).ToList(); switch (type) { case EShipType.Scout: case EShipType.Fighter: return(true); case EShipType.FighterBomber: case EShipType.Gunship: case EShipType.Bomber: case EShipType.StealthBomber: case EShipType.Interceptor: case EShipType.StealthFighter: case EShipType.TroopTransport: return(unlockedItems.Any(_ => _.Name.Replace(" ", string.Empty).Contains(type.ToString()))); default: return(false); } }
public ShipPosition(EShipType ship, int startRow, int startColumn, int endRow, int endColumn) { this.ship = ship; this.row = startRow; this.col = startColumn; this.endingRow = endRow; this.endingColumn = endColumn; }
public static bool IsNonCapitalShip(EShipType type) { return(type == EShipType.Bomber || type == EShipType.Scout || type == EShipType.Fighter || type == EShipType.FighterBomber || type == EShipType.StealthBomber || type == EShipType.StealthFighter || type == EShipType.Interceptor || type == EShipType.Gunship || type == EShipType.TroopTransport); }
public static bool IsCapitalShip(EShipType type) { return(type == EShipType.Battlecruiser || type == EShipType.Battleship || type == EShipType.Corvette || type == EShipType.Cruiser || type == EShipType.Destroyer || type == EShipType.Devastator || type == EShipType.Frigate || type == EShipType.Support || type == EShipType.AdvancedSupport || type == EShipType.HeavySupport); }
public CombatShip CreateTowerShip(EShipType type, int team, Color teamColour, int sectorId) { var unlockedIds = _game.TechTree[team - 1].CompletedTechIds(); // Get the most advanced tower ship var spec = (from s in Ships where (s.DependsOnTechIds == null || s.DependsOnTechIds.All(unlockedIds.Contains)) && s.Type == type orderby s.Id descending select s).FirstOrDefault(); if (spec == null) { return(null); } return(CreateShip(spec, team, teamColour, sectorId)); }
public void SetShipType(EShipType shipType, bool versusShip = false) { var shipTypeInt = (int)shipType; for (var i = 0; i < 4; ++i) { var shipTypeActive = (i == shipTypeInt) ? true : false; ShipTypes[i].SetActive(shipTypeActive); if (shipTypeActive) { _shipData = ShipTypes[i].GetComponent <GSB_ShipData>(); } } if (versusShip && VSIcon != null) { VSIcon.SetActive(true); } _shipType = shipType; }
public CombatShip(StrategyGame game, string imageFilename, int width, int height, Color teamColor, int team, int alliance, float health, int numPilots, EShipType type, int sectorId) : base(game, imageFilename, width, height, teamColor, team, alliance, health, numPilots, sectorId) { Type = type; Weapons = new List <Weapon>(); }
public CombatShip(StrategyGame game, string imageFilename, int width, int height, Color teamColor, int team, int alliance, float health, int numPilots, EShipType type, int sectorId) : base(game, imageFilename, width, height, teamColor, team, alliance, health, numPilots, sectorId) { Type = type; Weapons = new List <Weapon>(); TeamPen = new Pen(Colour.AdjustAlpha(StrategyGame.AbilityPenAlpha), StrategyGame.AbilityPenWidth); // Prepare the abilities this ship can use, adjusted with the current upgrades Abilities = new Dictionary <EAbilityType, Ability>(); var t = team - 1; var cooldown = game.TechTree[t].ResearchedUpgrades[EGlobalUpgrade.AbilityCooldown]; var duration = game.TechTree[t].ResearchedUpgrades[EGlobalUpgrade.AbilityDuration]; var effect = game.TechTree[t].ResearchedUpgrades[EGlobalUpgrade.AbilityEffect]; foreach (var at in game.GetEnabledAbilities(team, type)) { var ad = game.AbilityData[at]; var ab = new Ability(at, cooldown * ad.CooldownDuration, effect * ad.AbilityEffectMultiplier, duration * ad.AbilityDuration); Abilities.Add(at, ab); if (at == EAbilityType.WeaponBoost) { _boostWeaponsAmount = ab.AbilityEffectMultiplier; } // Setup what happens to this ship when the ability is triggered & completes // (Rapid Fire, Weapon Boost, Engine Boost are handled while active, not toggled on/off) if (at == EAbilityType.EngineBoost) { ab.AbilityStarted += (Ability a) => { Speed *= a.AbilityEffectMultiplier; }; ab.AbilityFinished += (Ability a) => { Speed /= a.AbilityEffectMultiplier; }; } else if (at == EAbilityType.ShieldBoost) { ab.AbilityStarted += (Ability a) => { Shield += MaxShield * (a.AbilityEffectMultiplier - 1); if (Shield > MaxShield) { Shield = MaxShield; } }; } else if (at == EAbilityType.ScanBoost) { ab.AbilityStarted += (Ability a) => { ScanRange *= a.AbilityEffectMultiplier; }; ab.AbilityFinished += (Ability a) => { ScanRange /= a.AbilityEffectMultiplier; }; } else if (at == EAbilityType.StealthBoost) { ab.AbilityStarted += (Ability a) => { Signature /= a.AbilityEffectMultiplier; }; ab.AbilityFinished += (Ability a) => { Signature *= a.AbilityEffectMultiplier; }; } } }
public void Shipyard_Build(String WerftPosition, EShipType ShipTyp) { }
public static bool IsTower(EShipType type) { return(type == EShipType.Tower || type == EShipType.ShieldTower || type == EShipType.MissileTower || type == EShipType.RepairTower); }
public static bool CanDock(EShipType type) { return(type != EShipType.Miner && type != EShipType.Constructor && !IsCapitalShip(type) && !IsDroneShip(type) && !IsTower(type)); }
public static bool CanDock(EShipType type) { return(type != EShipType.Miner && type != EShipType.Constructor && !Ship.IsCapitalShip(type)); }