Esempio n. 1
0
    protected override void Tick()
    {
        base.Tick();

        if (targetEntity != null)
        {
            CombatManager.ApplyUntrackedStatMod(source, target.GetComponent <Entity>(), Constants.BaseStatType.Health, effectDamage);
            //Debug.Log(effectDamage);
        }
        else
        {
            //Debug.Log("Target null");
        }
    }
Esempio n. 2
0
    public override void Apply(GameObject target)
    {
        float damage;

        if (scaleFromBaseDamage)
        {
            damage = effectDamage + (parentAbility.source.stats.GetStatModifiedValue(Constants.BaseStatType.BaseDamage) * percentOfBaseDamage);
        }
        else
        {
            damage = effectDamage;
        }

        //Debug.Log(damage + " is being dealt to " + target.gameObject.name);

        Entity targetEntity = target.GetComponent <Entity>();

        if (targetEntity != null)
        {
            CombatManager.ApplyUntrackedStatMod(Source, targetEntity, Constants.BaseStatType.Health, damage);
        }

        base.Apply(target);
    }