[Tuning] FD and Sneak break when cast on adjustments. (#3861)

* [Tuning] FD and Sneak break when cast on adjustments.
         Rules added:
         RULE_REAL(Spells, BreakFeignDeathWhenCastOn, 50.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

* Fix default value to be peq default and spacing
This commit is contained in:
Fryguy 2024-01-07 01:55:15 -05:00 committed by GitHub
parent 7803170d6b
commit 0ada53aa96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -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")

View File

@ -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);