Intersect-Engine icon indicating copy to clipboard operation
Intersect-Engine copied to clipboard

enhancement: negative bonus effects

Open cydyn opened this issue 1 year ago • 3 comments

Added the ability to set negative bonus effect values. Negative CDR increases spell cooldown. Negative Tenacity increases the duration of effect, e.g. stun, but does not cause the damage to be duplicated over time. A negative exp and luck bonus results in lower chances of drops and lower exp for the player. Lifesteal and manasteal are negative, it works like 0, but if other equipment adds lifesteal or manasteal, it is known that the minus value takes it into account. PS: Works as 0 because healing spells have minus values, which causes a minus lifesteal to double the healing The characterwindow has also been changed so that negative values ​​can be shown

cydyn avatar Mar 25 '24 19:03 cydyn

Okay, I know what weylon means. I will make sure that the treatment works properly and lifesteal takes the user's life with a negative value.

cydyn avatar Mar 27 '24 01:03 cydyn

Two changes are introduced. One adds options in the code if (baseDamage > 0 && this != enemy)

This means that if we do not deal damage and if we deal damage to ourselves, e.g. a trap that uses a self spell that deals damage, then neither lifesteal nor manasteal works.

Moreover, I added options in the characterwindow so that if lifesteal or manasteal had a negative value, it does not show them, it only shows 0.

I don't know how to do it via the server. The calculation of all effects is not separate, but common, so.... public int GetEquipmentBonusEffect(ItemEffect effect) { var value = 0;

        foreach (var item in EquippedItems)
        {
            if (!item.Descriptor.EffectsEnabled.Contains(effect))
            {
                continue;
            }
            value += item.Descriptor.GetEffectPercentage(effect);
        }

        return value;
    }

cydyn avatar Mar 28 '24 20:03 cydyn

How about adding that life theft would show negative values ​​in charcterwindows as 0 (lifestealrate). thanks to which we have both 0 and a negative value, thanks to which we know how much we currently have

cydyn avatar Mar 29 '24 18:03 cydyn