From 359f90a987b9d111a3b6bc01d6de13f71a86dec4 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Thu, 3 Apr 2025 18:42:53 -0400 Subject: [PATCH] Root break update Roots will not break from damage spells if spell skill is set to 200. Live mechanic. --- common/spdat.h | 2 ++ zone/attack.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/common/spdat.h b/common/spdat.h index afc00f4dd..35b38b5e3 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -246,6 +246,8 @@ #define MAX_INVISIBILTY_LEVEL 254 +#define NO_ROOT_BREAK 200 + //instrument item id's used as song components #define INSTRUMENT_HAND_DRUM 13000 #define INSTRUMENT_WOODEN_FLUTE 13001 diff --git a/zone/attack.cpp b/zone/attack.cpp index 78c7334f2..92105b268 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -4439,8 +4439,9 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons if (IsValidSpell(spell_id) && !iBuffTic) { //see if root will break - if (IsRooted() && !FromDamageShield) // neotoyko: only spells cancel root + if (IsRooted() && !FromDamageShield && spells[spell_id].skill != NO_ROOT_BREAK) { // neotoyko: only spells cancel root TryRootFadeByDamage(buffslot, attacker); + } } else if (!IsValidSpell(spell_id)) { @@ -6223,6 +6224,7 @@ bool Mob::TryRootFadeByDamage(int buffslot, Mob* attacker) { - If multiple roots on target, always and only checks first root slot and if broken only removes that slots root. - Only roots on determental spells can be broken by damage. - Root break chance values obtained from live parses. + - If casting skill is set to 200 then spell can not break root */ if (!attacker || !spellbonuses.Root[SBIndex::ROOT_EXISTS] || spellbonuses.Root[SBIndex::ROOT_BUFFSLOT] < 0) {