diff --git a/common/ruletypes.h b/common/ruletypes.h index 6c834c580..0c41a0c6d 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -529,6 +529,7 @@ RULE_INT(Spells, TargetedAOEMaxTargets, 4, "Max number of targets a Targeted AOE RULE_INT(Spells, PointBlankAOEMaxTargets, 0, "Max number of targets a Point-Blank AOE spell can cast on. Set to 0 for no limit.") RULE_INT(Spells, DefaultAOEMaxTargets, 0, "Max number of targets that an AOE spell which does not meet other descriptions can cast on. Set to 0 for no limit.") RULE_BOOL(Spells, AllowFocusOnSkillDamageSpells, false, "Allow focus effects 185, 459, and 482 to enhance SkillAttack spell effect 193") +RULE_STRING(Spells, AlwaysStackSpells, "", "Comma-Seperated list of spell IDs to always stack with every other spell, except themselves.") RULE_CATEGORY_END() RULE_CATEGORY(Combat) diff --git a/zone/spells.cpp b/zone/spells.cpp index cb51fabe1..051503b7a 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -3135,6 +3135,17 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2, } } + const std::string& always_stack_spells = RuleS(Spells, AlwaysStackSpells); + if (spellid1 != spellid2 && !always_stack_spells.empty()) { + const auto& v = Strings::Split(always_stack_spells, ","); + if (Strings::Contains(v, std::to_string(spellid1))) { + return 0; + } + if (Strings::Contains(v, std::to_string(spellid2))) { + return 0; + } + } + /* One of these is a bard song and one isn't and they're both beneficial so they should stack. */