Пример #1
0
    private void ExplosionTimer_Tick(object source, EventArgs e)
    {
        CombatHelper.DealDamageToCurrentEnemy(InterfaceHelper.CurrentEnemy.CurrentHealth, DamageType.Magic);

        _timer.Stop();
        _canTrigger = true;
    }
Пример #2
0
    public override void OnDealingPoisonDamage(ref int poisonDamage)
    {
        int convertedDamage = (int)Math.Ceiling(poisonDamage * DamageConversionRatio);

        poisonDamage = 0;

        CombatHelper.DealDamageToCurrentEnemy(convertedDamage, DamageType.Magic);
    }
Пример #3
0
    public void Consume(Artifact ammunitionArtifact)
    {
        ammunitionArtifact.RemoveItem(1);
        CombatHelper.DealDamageToCurrentEnemy(DamageDealt);

        foreach (var artifact in User.Instance.CurrentHero.EquippedArtifacts)
        {
            artifact.ArtifactFunctionality.OnConsumed(ammunitionArtifact);
        }
    }
Пример #4
0
    private void PoisonTimer_Tick(object source, EventArgs e)
    {
        _ticksCount++;

        CombatHelper.DealDamageToCurrentEnemy(DamageDealtPerTick, DamageType.Poison);

        if (_ticksCount >= _maxTicksCount)
        {
            _ticksCount    = 0;
            _maxTicksCount = TicksNumber;
            _timer.Stop();
        }
    }
Пример #5
0
    private void BurningTimer_Tick(object source, EventArgs e)
    {
        _ticksCount++;

        const int damage = BurningDamage / TicksNumber;

        CombatHelper.DealDamageToCurrentEnemy(damage, DamageType.Magic);

        if (_ticksCount == TicksNumber)
        {
            _ticksCount = 0;
            _timer.Stop();
        }
    }
Пример #6
0
    private void FamiliarTimer_Tick(object sender, EventArgs e)
    {
        var totalFamiliarDamageModifier = BaseFamiliarClickDamageModifier + FamiliarClickDamageModifierPerStack * _stacksCount;
        var damage = (int)Math.Ceiling(User.Instance.CurrentHero.ClickDamage * totalFamiliarDamageModifier);

        CombatHelper.DealDamageToCurrentEnemy(damage, DamageType.Magic);

        _familiarAttacksCount++;

        if (_familiarAttacksCount == FamiliarDuration)
        {
            _timer.Stop();
        }
    }
Пример #7
0
    public void Consume(Artifact ammunitionArtifact)
    {
        ammunitionArtifact.RemoveItem(1);

        var damageDealt         = BaseDamageDealt;
        var bonusDamageModifier = Math.Min((100 - InterfaceHelper.CurrentEnemy.CurrentHealthProgress) * BonusDamageDealtPerHealthPercentLost, 2.0) + 1.0;

        damageDealt = (int)Math.Ceiling(damageDealt * bonusDamageModifier);

        CombatHelper.DealDamageToCurrentEnemy(damageDealt, DamageType.Magic);

        foreach (var artifact in User.Instance.CurrentHero.EquippedArtifacts)
        {
            artifact.ArtifactFunctionality.OnConsumed(ammunitionArtifact);
        }
    }
Пример #8
0
    private void DecayTimer_Tick(object source, EventArgs e)
    {
        _ticksCount++;

        var damage = User.Instance.CurrentHero.PoisonDamage;

        if (InterfaceHelper.CurrentEnemy is Boss)
        {
            damage *= DamageModifier;
        }

        CombatHelper.DealDamageToCurrentEnemy(damage, DamageType.Magic);

        if (_ticksCount == TicksNumber)
        {
            _ticksCount = 0;
            _timer.Stop();
        }
    }
Пример #9
0
    public override void OnDealingClickDamage(ref int clickDamage, DamageType clickDamageType)
    {
        if (_isNextClickEmpowered)
        {
            _isNextClickEmpowered = false;

            if (clickDamageType == DamageType.Normal)
            {
                var criticalDamageDealt = (int)Math.Ceiling(clickDamage * User.Instance.CurrentHero.CritDamage);

                CombatHelper.DealDamageToCurrentEnemy(criticalDamageDealt, DamageType.Critical);
                CombatHelper.DealDamageToCurrentEnemy((int)(criticalDamageDealt * DamageModifier), DamageType.Magic);

                clickDamage = 0;
            }
            else if (clickDamageType == DamageType.Critical)
            {
                CombatHelper.DealDamageToCurrentEnemy((int)(clickDamage * DamageModifier), DamageType.Magic);
            }
        }
    }
Пример #10
0
    public void Consume(Artifact ammunitionArtifact)
    {
        ammunitionArtifact.RemoveItem(1);

        var currentEnemy = InterfaceHelper.CurrentEnemy;
        int damageDealt;

        if (currentEnemy is Monster)
        {
            damageDealt = (int)Math.Ceiling(currentEnemy.CurrentHealth * PercentageHealthDamageAgainstMonsters);
        }
        else
        {
            damageDealt = (int)Math.Ceiling(currentEnemy.CurrentHealth * PercentageHealthDamageAgainstBosses);
        }

        CombatHelper.DealDamageToCurrentEnemy(damageDealt, DamageType.OnHit);

        foreach (var artifact in User.Instance.CurrentHero.EquippedArtifacts)
        {
            artifact.ArtifactFunctionality.OnConsumed(ammunitionArtifact);
        }
    }
Пример #11
0
 public override void OnConsumed(Artifact artifactConsumed)
 {
     CombatHelper.DealDamageToCurrentEnemy(DamageDealtUponConsuming, DamageType.Magic);
 }
Пример #12
0
 private void ExplosionTimer_Tick(object source, EventArgs e)
 {
     _timer.Stop();
     CombatHelper.DealDamageToCurrentEnemy(_damageStored * DamageModifier, DamageType.Magic);
     _damageStored = 0;
 }
Пример #13
0
 private void BurningTimer_Tick(object source, EventArgs e)
 {
     CombatHelper.DealDamageToCurrentEnemy(DamageDealtPerTick, DamageType.Magic);
 }