public virtual int GetNewAosDamage(int bonus, int dice, int sides, bool playerVsPlayer, double scalar)
{
int damage = Utility.Dice(dice, sides, bonus) * 100;
int damageBonus = 0;
int inscribeSkill = GetInscribeFixed(m_Caster);
int inscribeBonus = (inscribeSkill + (1000 * (inscribeSkill / 1000))) / 200;
damageBonus += inscribeBonus;
int intBonus = Caster.Int / 10;
damageBonus += intBonus;
int sdiBonus = AosAttributes.GetValue(m_Caster, AosAttribute.SpellDamage);
#region Mondain's Legacy
sdiBonus += ArcaneEmpowermentSpell.GetSpellBonus(m_Caster, playerVsPlayer);
#endregion
// PvP spell damage increase cap of 15% from an item’s magic property, 30% if spell school focused.
if (playerVsPlayer)
{
if (SpellHelper.HasSpellMastery(m_Caster) && sdiBonus > 30)
{
sdiBonus = 30;
}
if (!SpellHelper.HasSpellMastery(m_Caster) && sdiBonus > 15)
{
sdiBonus = 15;
}
}
damageBonus += sdiBonus;
TransformContext context = TransformationSpellHelper.GetContext(Caster);
if (context != null && context.Spell is ReaperFormSpell)
{
damageBonus += ((ReaperFormSpell)context.Spell).SpellDamageBonus;
}
damage = AOS.Scale(damage, 100 + damageBonus);
int evalSkill = GetDamageFixed(m_Caster);
int evalScale = 30 + ((9 * evalSkill) / 100);
damage = AOS.Scale(damage, evalScale);
damage = AOS.Scale(damage, (int)(scalar * 100));
return(damage / 100);
}