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));
        }
예제 #2
0
        public override double GetDamageToEnemy(VLoadout loadout, IEnemyStatCard enemy)
        {
            var abilityCd     = AbilityCooldown / (loadout.Stats.CooldownSpeed / 100);
            var abilityUptime = Duration / abilityCd;

            abilityUptime = Math.Min(abilityUptime, 1);

            var extraAttacksModifier = (TargetsHit - BaseWeapon.AttackCount) / BaseWeapon.AttackCount;

            var baseWeaponDamage = BaseWeapon.GetDamageToEnemy(loadout, enemy);

            return(baseWeaponDamage * abilityUptime * extraAttacksModifier * (ProcChance / 100));
        }
        public override double GetDamageToEnemy(VLoadout loadout, IEnemyStatCard enemy)
        {
            // if crit, deal 80%-90% damage to nearby enemy
            // max bounce 3-4

            var startingDamage = GetWeaponDamage(loadout);

            startingDamage *= loadout.Stats.Attack / 100;
            startingDamage *= 1 + loadout.Stats.DamageIncrease / 100;
            startingDamage *= (1 - enemy.DamageReduction / 100);

            var damageDealt = GetAdeptDamage(loadout, startingDamage, enemy, Crits);

            // I'm intentionally removing this attack count, because SA deals a *stupid* amount of damage as it is already,
            // (100x stronger than SuperHero units at max stats) and we don't need to multiply it by 3. It can be humble
            //damageDealt *= AttackCount;
            var dps = damageDealt / GetActualWeaponPeriod(loadout);

            return(dps);
        }
        public double GetDamageToEnemy(VLoadout loadout, IEnemyStatCard enemy)
        {
            // get damage of weapon scaled with damage increase
            var rawHeal = BaseAttack + loadout.Upgrades.AttackUpgrade * AttackIncrement;

            rawHeal *= loadout.Stats.Attack / 100;
            rawHeal *= 1 + loadout.Stats.DamageIncrease / 100;

            // apply an average crit modifier to increase the damage dealt
            var totalHealed = rawHeal * BasicAttackWeapon.CritModifier(WeaponHelper.Crits, loadout.Stats.CriticalDamage);

            // divide damage by attack speed to get the damage dealt per second
            var rawAttackSpeed    = BaseAttackPeriod * Math.Pow(0.96, loadout.Upgrades.AttackSpeedUpgrade);
            var actualAttackSpeed = rawAttackSpeed / (loadout.Stats.AttackSpeed / 100);

            actualAttackSpeed /= loadout.Stats.Acceleration / 100;

            var totalHps = totalHealed / actualAttackSpeed;

            return(totalHps);
        }
        public virtual double GetDamageToEnemy(VLoadout loadout, IEnemyStatCard enemy)
        {
            // get damage of weapon scaled with damage increase and damage reduction
            var rawDamage = GetWeaponDamage(loadout);

            rawDamage *= loadout.Stats.Attack / 100;
            rawDamage *= 1 + loadout.Stats.DamageIncrease / 100;
            rawDamage *= (1 - enemy.DamageReduction / 100);

            // get the enemies armor, allowing for quasar buff's armor reduction
            var enemyArmor = loadout.CurrentUnit.UnitRank >= UnitRankType.SXDZ
                                ? enemy.Armor * 0.7
                                : enemy.Armor;

            // get the bonus critical damage from void buff
            var bonusCritDamage = loadout.CurrentUnit.UnitRank >= UnitRankType.XYZ
                                ? enemyArmor / 5
                                : 0;

            // determine the effective armor when armor pierce is considered
            enemyArmor *= (1 - ArmorPenetration / 100);

            // get the core damage dealt to the unit, before crits.
            // if the enemy has more armor than the weapon can deal, deal 0.5 damage
            var effectiveDamage = Math.Max(rawDamage - enemyArmor, 0.5);

            // apply an average crit modifier to increase the damage dealt
            var totalDamage = effectiveDamage * CritModifier(Crits, loadout.Stats.CriticalDamage + bonusCritDamage);

            // multiple the attack by the number of units hit
            totalDamage *= GetAttackCount(loadout);

            // divide damage by attack speed to get the damage dealt per second
            var totalDps = totalDamage / GetActualWeaponPeriod(loadout);

            return(totalDps);
        }
 double GetAdeptDamage(VLoadout loadout, double baseDamage, IEnemyStatCard enemy, ICritChances crits)
 {
     var damages = new (double, double)[] { (1, baseDamage) };
예제 #7
0
 public double GetDamageToEnemy(VLoadout loadout, IEnemyStatCard enemy)
 {
     return(0);
 }