Rule to apply Spell Dmg and Heal Amount stats as a percentage instead of flat value. (#2017)

* Apply Spell Dmg and Heal Amt stats as a percentage increase (1 SD\HA = 1% increase to spell effectiveness) instead of a flat addition.

* Corrected logic to allow for coexistence of FlatItemExtraSpellAmt rule and this.

* Adjusted rule name to be less ambiguous.
This commit is contained in:
catapultam-habeo
2022-02-28 12:24:16 -08:00
committed by GitHub
parent 58fafd0f9c
commit 00af2903c3
2 changed files with 10 additions and 2 deletions
+9 -2
View File
@@ -284,8 +284,12 @@ int32 Mob::GetActDoTDamage(uint16 spell_id, int32 value, Mob* target) {
int32 Mob::GetExtraSpellAmt(uint16 spell_id, int32 extra_spell_amt, int32 base_spell_dmg)
{
if (RuleB(Spells, FlatItemExtraSpellAmt))
return extra_spell_amt;
if (RuleB(Spells, FlatItemExtraSpellAmt)) {
if (RuleB(Spells, ItemExtraSpellAmtCalcAsPercent))
return abs(base_spell_dmg)*extra_spell_amt/100;
else
return extra_spell_amt;
}
int total_cast_time = 0;
@@ -306,6 +310,9 @@ int32 Mob::GetExtraSpellAmt(uint16 spell_id, int32 extra_spell_amt, int32 base_s
extra_spell_amt = abs(base_spell_dmg) / 2;
}
if (RuleB(Spells, ItemExtraSpellAmtCalcAsPercent))
return abs(base_spell_dmg)*extra_spell_amt/100;
return extra_spell_amt;
}