mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 04:11:30 +00:00
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:
parent
58fafd0f9c
commit
00af2903c3
@ -396,6 +396,7 @@ RULE_BOOL(Spells, UseAdditiveFocusFromWornSlot, false, "Allows an additive focus
|
||||
RULE_BOOL(Spells, AlwaysSendTargetsBuffs, false, "Ignore Leadership Alternate Abilities level if true")
|
||||
RULE_BOOL(Spells, FlatItemExtraSpellAmt, false, "Allow SpellDmg stat to affect all spells, regardless of cast time/cooldown/etc")
|
||||
RULE_BOOL(Spells, IgnoreSpellDmgLvlRestriction, false, "Ignore the 5 level spread on applying SpellDmg")
|
||||
RULE_BOOL(Spells, ItemExtraSpellAmtCalcAsPercent, false, "Apply the Item stats Spell Dmg and Heal Amount as Percentage-based modifiers instead of flat additions")
|
||||
RULE_BOOL(Spells, AllowItemTGB, false, "Target group buff (/tgb) doesn't work with items on live, custom servers want it though")
|
||||
RULE_BOOL(Spells, NPCInnateProcOverride, true, "NPC innate procs override the target type to single target")
|
||||
RULE_BOOL(Spells, OldRainTargets, false, "Use old incorrectly implemented maximum targets for rains")
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user