mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user