diff --git a/common/ruletypes.h b/common/ruletypes.h index a66f0518e..69f4541f0 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -431,6 +431,8 @@ RULE_BOOL(Spells, AlwaysSendTargetsBuffs, false, "Ignore Leadership Alternate Ab 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_REAL(Spells, BreakFeignDeathWhenCastOn, 2.0, "Percentage that fd will break when you resist a spell") +RULE_REAL(Spells, BreakSneakWhenCastOn, 2.0, "Percentage that sneak will break when you resist a spell") 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") diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 95098ab68..3fc7cb27e 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -9682,11 +9682,13 @@ void Client::BreakSneakWhenCastOn(Mob *caster, bool IsResisted) IsCastersTarget = true; } } + if (!IsCastersTarget) { int chance = spellbonuses.NoBreakAESneak + itembonuses.NoBreakAESneak + aabonuses.NoBreakAESneak; if (IsResisted) { - chance *= 2; + chance *= RuleR(Spells, BreakSneakWhenCastOn); } + if (chance && zone->random.Roll(chance)) { return; // Do not drop Sneak/Hide } @@ -9697,12 +9699,12 @@ void Client::BreakSneakWhenCastOn(Mob *caster, bool IsResisted) void Client::BreakFeignDeathWhenCastOn(bool IsResisted) { - if(GetFeigned()){ - + if (GetFeigned()) { int chance = spellbonuses.FeignedCastOnChance + itembonuses.FeignedCastOnChance + aabonuses.FeignedCastOnChance; - if (IsResisted) - chance *= 2; + if (IsResisted) { + chance *= RuleR(Spells, BreakFeignDeathWhenCastOn); + } if(chance && (zone->random.Roll(chance))){ MessageString(Chat::SpellFailure,FD_CAST_ON_NO_BREAK);