Example #1
0
        public override IDisposable ApplyPassiveEffect(VLoadout loadout)
        {
            ErrorReporter.ReportDebug("OrbOrbiter passive effect is being applied, but OrbOrbiter is not the current unit", () => loadout.CurrentUnit.UnitData.Type != Type);

            var stacks = loadout.CurrentUnit.CurrentKills / 2000;

            for (var i = 1; i <= stacks; i++)
            {
                loadout.Stats.UpdateAttackSpeed($"OrbOrbiterOrbEssence{i}", 20);
                loadout.Stats.Attack        += 40;
                loadout.Stats.AdditiveArmor += 40;
                loadout.Stats.UpdateCooldownSpeed($"OrbOrbiterOrbEssence{i}", 20);
            }

            return(new DisposableAction(
                       () =>
            {
                ErrorReporter.ReportDebug("OrbOrbiter passive effect is being removed, but OrbOrbiter is not the current unit", () => loadout.CurrentUnit.UnitData.Type != Type);

                for (var i = 1; i <= stacks; i++)
                {
                    loadout.Stats.UpdateAttackSpeed($"OrbOrbiterOrbEssence{i}", -20);
                    loadout.Stats.Attack -= 40;
                    loadout.Stats.AdditiveArmor -= 40;
                    loadout.Stats.UpdateCooldownSpeed($"OrbOrbiterOrbEssence{i}", -20);
                }
            }));
        }
Example #2
0
        // orbs attack once per second without ups. It scales with attack speed upgrades, but not attack speed stats.
        //
        // orbs can hit all units in a radius of 6, but it requires you to have vision of the target.
        // Because we likely won't have vision of all enemies in radius 6 from the orb,
        // this has been scaled to a radius of 4 to attempt to mimic that
        protected override double GetAttackCount(VLoadout loadout)
        {
            var orbAtkSpeed = 1.0 * Math.Pow(0.96, loadout.Upgrades.AttackSpeedUpgrade);
            var zapsPerOrb  = OrbTravelDuration / orbAtkSpeed;

            return(zapsPerOrb * OrbsPerAttack * WeaponHelper.GetEnemiesInRadius(RadiusOfOrbAttacks));
        }
Example #3
0
        internal static CritChances GetCritChances(VLoadout loadout)
        {
            var perks       = loadout.Perks;
            var stats       = loadout.Stats;
            var critChances = new CritChances();

            if (stats.CriticalChance <= 0)
            {
                critChances.RegularChance = 1.0;
            }
            else
            {
                var remainingChance = 1.0;

                var blackCritChance = stats.HasBlackCrits ? stats.CriticalChance / 300.0 : 0;
                blackCritChance         = blackCritChance > 1 ? 1 : blackCritChance;
                critChances.BlackChance = blackCritChance;
                remainingChance        -= blackCritChance;

                var redCritChance = stats.HasRedCrits ? remainingChance * stats.CriticalChance / 200 : 0;
                redCritChance         = redCritChance > remainingChance ? remainingChance : redCritChance;
                critChances.RedChance = redCritChance;
                remainingChance      -= redCritChance;

                var yellowCritChance = remainingChance * stats.CriticalChance / 100;
                yellowCritChance         = yellowCritChance > remainingChance ? remainingChance : yellowCritChance;
                critChances.YellowChance = yellowCritChance;
                remainingChance         -= yellowCritChance;

                critChances.RegularChance = remainingChance;
            }

            ErrorReporter.ReportDebug("your crit calculations need to equal 100", () => System.Math.Round(critChances.RegularChance + critChances.YellowChance + critChances.RedChance + critChances.BlackChance, 6) != 1);
            return(critChances);
        }
        protected override double GetWeaponDamage(VLoadout loadout)
        {
            // here is an example string defining how the damages scale with atk speed upgrades
            // 840-871-902-934-968-1004-1041-1079-1119-1161-1204-1250-1296-1346-1397-1451.
            // I can't work out the equation that governs this, the closest relationship I saw was an exponiental increase of 1.037

            return(AbilityDamage + loadout.Upgrades.AttackUpgrade * AttackIncrement * Math.Pow(1.037, loadout.Upgrades.AttackSpeedUpgrade));
        }
        public override IEnumerable <IWeaponData> GetWeapons(VLoadout loadout)
        {
            yield return(new WrathWalkerBasicWeapon());

            yield return(new WrathwalkerTaldarimBeam());

            yield return(new WrathWalkerWrathfulCharge());
        }
Example #6
0
        public override IEnumerable <IWeaponData> GetWeapons(VLoadout loadout)
        {
            yield return(new UnstableDreadnoughtBasicWeapon());

            yield return(new UnstableDreadnoughtBasicAttackAOE());

            yield return(new UnstableDreadnoughtUnstableCore());
        }
        public override IEnumerable <IWeaponData> GetWeapons(VLoadout loadout)
        {
            yield return(new TemplarBasicWeapon());

            yield return(new HighTemplarStorm());

            yield return(new HighTemplarAutoStorm());
        }
        public override IEnumerable <IWeaponData> GetWeapons(VLoadout loadout)
        {
            yield return(new OrbDancerBasicWeapon());

            yield return(new OrbDancerOrbArc());

            yield return(new OrbDancerOrbExtension());
        }
        public override double GetDamageToEnemy(VLoadout loadout, IEnemyStatCard enemy)
        {
            // this effectively gets the damage from open fire, and casts it 7 times in the cooldown time
            var damageDealtByOpenFire = WingedOpenFireWeapon.GetDamageToEnemy(loadout, enemy) * WingedOpenFireWeapon.GetActualWeaponPeriod(loadout);

            damageDealtByOpenFire *= 7;
            return(damageDealtByOpenFire / GetActualWeaponPeriod(loadout));
        }
        public override IEnumerable <IWeaponData> GetWeapons(VLoadout loadout)
        {
            yield return(new PrisonerBasicWeapon());

            yield return(new PrisonerBasicAtkAOE());

            yield return(new PrisonerBerserkerAOE());
        }
        public override IEnumerable <IWeaponData> GetWeapons(VLoadout loadout)
        {
            yield return(new DarkWarpLordBasicWeapon());

            yield return(new DarkWarpLordBasicAtkAOE());

            yield return(new DarkWarpLordDarkWarpAnnihilation());
        }
Example #12
0
        public override IEnumerable <IWeaponData> GetWeapons(VLoadout loadout)
        {
            yield return(new ReaverBasicWeapon());

            yield return(new ReaverBasicAttackAOE());

            yield return(new ReaverUnstableScarab());
        }
        protected internal virtual double GetActualWeaponPeriod(VLoadout loadout)
        {
            var rawAttackSpeed    = BaseAttackPeriod * Math.Pow(0.96, loadout.Upgrades.AttackSpeedUpgrade);
            var actualAttackSpeed = rawAttackSpeed / (loadout.Stats.AttackSpeed / 100);

            actualAttackSpeed /= loadout.Stats.Acceleration / 100;
            return(actualAttackSpeed);
        }
Example #14
0
        public override IEnumerable <IWeaponData> GetWeapons(VLoadout loadout)
        {
            yield return(new ArchonBasicWeapon());

            yield return(new ArchonBasicAttackAOE());

            yield return(new TemplarStorm());
        }
Example #15
0
        public override IEnumerable <IWeaponData> GetWeapons(VLoadout loadout)
        {
            yield return(new OrbOrbiterBasicWeapon());

            yield return(new OrbOrbiterOrbWave());

            yield return(new OrbOrbiterOrbOrbit());
        }
Example #16
0
 protected internal override double GetActualWeaponPeriod(VLoadout loadout)
 {
     // if this cooldown is any faster than 20 seconds, it doesn't actually deal extra damage,
     // we will just have perma 12s orbs, which effectively means that every orb spawned has
     // an additional 6 seconds of timed life
     // (passive 6 seconds are built into weapons)
     return(System.Math.Max(base.GetActualWeaponPeriod(loadout), 20));
 }
Example #17
0
        public override IEnumerable <IWeaponData> GetWeapons(VLoadout loadout)
        {
            yield return(new ColossusBasicWeapon());

            yield return(new ColossusSplitBeam());

            yield return(new ColossusStrikeBeam());
        }
        public override IDisposable ApplyTemporaryBuff(VLoadout loadout)
        {
            loadout.Stats.CriticalDamage += 50;

            return(new DisposableAction(() =>
            {
                loadout.Stats.CriticalDamage -= 50;
            }));
        }
        public override IDisposable ApplyPassiveEffect(VLoadout loadout)
        {
            loadout.Stats.UpdateDamageReduction("ADomFortitude", 10);

            return(new DisposableAction(() =>
            {
                loadout.Stats.UpdateDamageReduction("ADomFortitude", -10);
            }));
        }
Example #20
0
        public override IEnumerable <IWeaponData> GetWeapons(VLoadout loadout)
        {
            yield return(new BerserkerWarpLordBasicWeapon());

            yield return(new BerserkerWarpLordBasicAttackAOE());

            yield return(new BerserkerWarpLordBerserkerWarpAnnihilation());

            yield return(new BerserkerWarpLordWhirlwind());
        }
Example #21
0
        public override IEnumerable <IWeaponData> GetWeapons(VLoadout loadout)
        {
            yield return(new DisruptorBasicWeapon());

            yield return(new DisruptorBasicAttackAOE());

            yield return(new DisruptorDisplacementNova());

            yield return(new DisruptorPurificationNova());
        }
        public override IEnumerable <IWeaponData> GetWeapons(VLoadout loadout)
        {
            yield return(new GalaxianOrbiterBasicWeapon());

            yield return(new GalaxianOrbiterOrbSpiral());

            yield return(new GalaxianOrbiterOrbGalaxy());

            yield return(new GalaxianOrbiterGalacticResonance());
        }
Example #23
0
        public override IEnumerable <IWeaponData> GetWeapons(VLoadout loadout)
        {
            yield return(new AnnihilationDreadnoughtBasicWeapon());

            yield return(new AnnihilationDreadnaughtBasicAtkAOE());

            yield return(new AnnihilationDreadnoughtAnnihilationCannon());

            yield return(new AnnihilationDreadnoughtAnnihilationCore());
        }
Example #24
0
        public static VLoadout SetFarmRoom(this VLoadout loadout, RoomNumber room)
        {
            loadout.IncomeManager.FarmRoom = room;

            if (room == RoomNumber.Room7)
            {
                loadout.IncomeManager.AdditionalFarmRoom = RoomNumber.Room8;
            }
            return(loadout);
        }
Example #25
0
        public override IEnumerable <IWeaponData> GetWeapons(VLoadout loadout)
        {
            yield return(new CrimsonArchonBasicWeapon());

            yield return(new CrimsonArchonBasicAttackAOE());

            yield return(new HighTemplarStorm());

            yield return(new CrimsonArchonOpenFire());
        }
        public override IDisposable ApplyPassiveEffect(VLoadout loadout)
        {
            loadout.Stats.Attack += 30;
            loadout.Stats.UpdateAttackSpeed("Berserker", 30);

            return(new DisposableAction(() =>
            {
                loadout.Stats.Attack -= 30;
                loadout.Stats.UpdateAttackSpeed("Berserker", -30);
            }));
        }
Example #27
0
        public override IDisposable ApplyPassiveEffect(VLoadout loadout)
        {
            loadout.Stats.CriticalChance += 15;
            loadout.Stats.CriticalDamage += 30;

            return(new DisposableAction(() =>
            {
                loadout.Stats.CriticalChance -= 15;
                loadout.Stats.CriticalDamage -= 30;
            }));
        }
Example #28
0
        public override IDisposable ApplyTemporaryBuff(VLoadout loadout)
        {
            loadout.Stats.CriticalDamage += 70;
            loadout.Stats.UpdateDamageIncrease("GalaxyEmpowerment", 10);

            return(new DisposableAction(() =>
            {
                loadout.Stats.CriticalDamage -= 70;
                loadout.Stats.UpdateDamageIncrease("GalaxyEmpowerment", -10);
            }));
        }
Example #29
0
        public static VLoadout SetSpec(this VLoadout loadout, UnitType spec, int specLevel = 10, bool hasAllSpec = false)
        {
            loadout.UnitSpec = spec;
            loadout.Perks.UnitSpecialization.DesiredLevel = (short)specLevel;

            if (hasAllSpec)
            {
                ErrorReporter.ReportDebug("spec level must be 10 if you want all spec", () => specLevel != 10);
                loadout.Perks.UpgradeCache.DesiredLevel = 1;
            }
            return(loadout);
        }
Example #30
0
        public static double GetBasicUnitMineralCost(this UnitType unitType, VLoadout loadout)
        {
            var rawCost = GetBasicUnitRawCost(unitType);
            var cost    = ApplyUnitSpec(unitType, loadout, rawCost);

            if (loadout.IncomeManager.HasSales)
            {
                cost *= 0.9;
            }
            cost /= (1 + loadout.IncomeManager.DoubleWarp / 100.0 + loadout.IncomeManager.TripleWarp / 50.0);
            return(cost);
        }