From fa7c8663892bd2758f2ce095c4aabd6fa5cd0ec9 Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Wed, 24 Apr 2024 18:24:14 +0200 Subject: [PATCH 1/2] Anub'Arak no longer triggers Locust Swarm before cast, scale damage per tick --- sql/world/base/naxx40_spells.sql | 5 +++ src/naxx40Scripts/boss_anubrekhan_40.cpp | 47 +++++++++++++++++++++--- 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/sql/world/base/naxx40_spells.sql b/sql/world/base/naxx40_spells.sql index 11929e2..9f02b35 100644 --- a/sql/world/base/naxx40_spells.sql +++ b/sql/world/base/naxx40_spells.sql @@ -4,3 +4,8 @@ INSERT INTO spell_dbc (`ID`,`Category`,`DispelType`,`Mechanic`,`Attributes`,`Att (90001,0,0,0,8388864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,101,0,0,0,0,21,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,28,0,0,1,0,0,0,0,0,4,0,0,0,0,0,18,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,351083,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7626,0,1,0,0,'Summon Corpse Scarabs (5)','','','','','','','','','','','','','','','',16712190,'','','','','','','','','','','','','','','','',16712172,'','','','','','','','','','','','','','','','',16712188,'','','','','','','','','','','','','','','','',16712188,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0), # 29105 - Corpse Scarabs (5) (90002,0,0,0,8388864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,101,0,0,0,0,21,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,28,0,0,1,0,0,0,0,0,9,0,0,0,0,0,18,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,351083,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7626,0,1,0,0,'Summon Corpse Scarabs (10)','','','','','','','','','','','','','','','',16712190,'','','','','','','','','','','','','','','','',16712172,'','','','','','','','','','','','','','','','',16712188,'','','','','','','','','','','','','','','','',16712188,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0); # 28864 - Corpse Scarabs (10 +-- Anub'Arak +-- Locust Swarm: Reduce damage ~1500 to ~1000, increase radius 25yd to 30yd +DELETE FROM `spell_script_names` WHERE `spell_id` = 28785; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) +VALUES(28785, 'spell_anub_locust_swarm_40'); diff --git a/src/naxx40Scripts/boss_anubrekhan_40.cpp b/src/naxx40Scripts/boss_anubrekhan_40.cpp index fcaab47..991190a 100644 --- a/src/naxx40Scripts/boss_anubrekhan_40.cpp +++ b/src/naxx40Scripts/boss_anubrekhan_40.cpp @@ -236,12 +236,7 @@ public: case EVENT_LOCUST_SWARM: { Talk(EMOTE_LOCUST); - // Set damage for periodic trigger effect to a random value between 875 and 1125 - int32 modifiedLocustSwarmDamage = urand(875, 1125); me->CastSpell(me, SPELL_LOCUST_SWARM, false); - // Update the periodic trigger effect with custom damage - me->CastCustomSpell(me, SPELL_LOCUST_SWARM_TRIGGER, &modifiedLocustSwarmDamage, nullptr, nullptr, true, nullptr, nullptr, me->GetGUID()); - events.ScheduleEvent(EVENT_SPAWN_GUARD, 3000); events.RepeatEvent(90000); break; @@ -258,7 +253,49 @@ public: }; }; +class spell_anub_locust_swarm_40 : public SpellScriptLoader +{ +public: + spell_anub_locust_swarm_40() : SpellScriptLoader("spell_anub_locust_swarm_40") { } + + class spell_anub_locust_swarm_40_AuraScript : public AuraScript + { + PrepareAuraScript(spell_anub_locust_swarm_40_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_LOCUST_SWARM_TRIGGER }); + } + + void HandleTriggerSpell(AuraEffect const* /*aurEff*/) + { + Unit* caster = GetCaster(); + if (!caster || (caster->GetMap()->GetDifficulty() != RAID_DIFFICULTY_10MAN_HEROIC)) + { + return; + } + PreventDefaultAction(); + int32 modifiedLocustSwarmDamage = 812; + CustomSpellValues values; + values.AddSpellMod(SPELLVALUE_BASE_POINT0, modifiedLocustSwarmDamage); + values.AddSpellMod(SPELLVALUE_RADIUS_MOD, 3000); // 30yd + caster->CastCustomSpell(SPELL_LOCUST_SWARM_TRIGGER, values, caster, TRIGGERED_FULL_MASK, nullptr, nullptr, GetCasterGUID()); + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_anub_locust_swarm_40_AuraScript::HandleTriggerSpell, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_anub_locust_swarm_40_AuraScript(); + } +}; + void AddSC_boss_anubrekhan_40() { new boss_anubrekhan_40(); + new spell_anub_locust_swarm_40(); } From a3f8854eb370ce7f461bfcf31e1a4e2877afb8df Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Wed, 24 Apr 2024 23:53:32 +0200 Subject: [PATCH 2/2] horsemen: remove punish, scale primary and secondary spells, reduce mark damage --- src/naxx40Scripts/boss_four_horsemen_40.cpp | 88 ++++++++++++++------- 1 file changed, 60 insertions(+), 28 deletions(-) diff --git a/src/naxx40Scripts/boss_four_horsemen_40.cpp b/src/naxx40Scripts/boss_four_horsemen_40.cpp index 533c47d..09db2d2 100644 --- a/src/naxx40Scripts/boss_four_horsemen_40.cpp +++ b/src/naxx40Scripts/boss_four_horsemen_40.cpp @@ -39,13 +39,11 @@ enum Spells SPELL_BLAUMEUX_SHADOW_BOLT_25 = 57464, SPELL_BLAUMEUX_VOID_ZONE_10 = 28863, SPELL_BLAUMEUX_VOID_ZONE_25 = 57463, - SPELL_BLAUMEUX_UNYIELDING_PAIN = 57381, // Zeliek SPELL_ZELIEK_HOLY_WRATH_10 = 28883, SPELL_ZELIEK_HOLY_WRATH_25 = 57466, SPELL_ZELIEK_HOLY_BOLT_10 = 57376, SPELL_ZELIEK_HOLY_BOLT_25 = 57465, - SPELL_ZELIEK_CONDEMNATION = 57377, // Mograine SPELL_RIVENDARE_UNHOLY_SHADOW_10 = 28882, SPELL_RIVENDARE_UNHOLY_SHADOW_25 = 57369 @@ -56,8 +54,7 @@ enum Events EVENT_MARK_CAST = 1, EVENT_PRIMARY_SPELL = 2, EVENT_SECONDARY_SPELL = 3, - EVENT_PUNISH = 4, - EVENT_BERSERK = 5 + EVENT_BERSERK = 4 }; enum Misc @@ -86,17 +83,6 @@ enum FourHorsemen // MARKS const uint32 TABLE_SPELL_MARK[4] = {SPELL_MARK_OF_ZELIEK, SPELL_MARK_OF_BLAUMEUX, SPELL_MARK_OF_MOGRAINE, SPELL_MARK_OF_KORTHAZZ}; -// PRIMARY SPELL -const uint32 TABLE_SPELL_PRIMARY_10[4] = {SPELL_ZELIEK_HOLY_BOLT_10, SPELL_BLAUMEUX_SHADOW_BOLT_10, SPELL_RIVENDARE_UNHOLY_SHADOW_10, SPELL_KORTHAZZ_METEOR_10}; -const uint32 TABLE_SPELL_PRIMARY_25[4] = {SPELL_ZELIEK_HOLY_BOLT_25, SPELL_BLAUMEUX_SHADOW_BOLT_25, SPELL_RIVENDARE_UNHOLY_SHADOW_25, SPELL_KORTHAZZ_METEOR_25}; - -// PUNISH -const uint32 TABLE_SPELL_PUNISH[4] = {SPELL_ZELIEK_CONDEMNATION, SPELL_BLAUMEUX_UNYIELDING_PAIN, 0, 0}; - -// SECONDARY SPELL -const uint32 TABLE_SPELL_SECONDARY_10[4] = {SPELL_ZELIEK_HOLY_WRATH_10, SPELL_BLAUMEUX_VOID_ZONE_10, 0, 0}; -const uint32 TABLE_SPELL_SECONDARY_25[4] = {SPELL_ZELIEK_HOLY_WRATH_25, SPELL_BLAUMEUX_VOID_ZONE_25, 0, 0}; - const Position WaypointPositions[12] = { // Thane waypoints @@ -201,7 +187,6 @@ public: } else { - events.RescheduleEvent(EVENT_PUNISH, 5000); events.RescheduleEvent(EVENT_SECONDARY_SPELL, 15000); } if (pInstance) @@ -345,19 +330,41 @@ public: return; case EVENT_PRIMARY_SPELL: Talk(SAY_TAUNT); - me->CastSpell(me->GetVictim(), RAID_MODE(TABLE_SPELL_PRIMARY_10[horsemanId], TABLE_SPELL_PRIMARY_25[horsemanId]), false); + if (horsemanId == HORSEMAN_ZELIEK) + { + int32 bp0 = 1109; // spell not used in vanilla, reduced damage from ~2.5 to ~1.2k + me->CastCustomSpell(me->GetVictim(), SPELL_ZELIEK_HOLY_BOLT_10, &bp0, 0, 0, false); + } + else if (horsemanId == HORSEMAN_BLAUMEUX) + { + int32 bp0 = 1109; // spell not used in vanilla, reduced damage from ~2.5 to ~1.2k + me->CastCustomSpell(me->GetVictim(), SPELL_BLAUMEUX_SHADOW_BOLT_10, &bp0, 0, 0, false); + } + else if (horsemanId == HORSEMAN_MOGRAINE) + { + // same dbc as vanilla. Shadow damage instead of fire + me->CastSpell(me->GetVictim(), SPELL_RIVENDARE_UNHOLY_SHADOW_10, false); + } + else // HORSEMAN_KORTHAZZ + { + int32 bp0 = 12824; // 14.5k to 13.5k + me->CastCustomSpell(me->GetVictim(), SPELL_KORTHAZZ_METEOR_10, &bp0, 0, 0, false); + } events.RepeatEvent(15000); return; - case EVENT_PUNISH: - if (!SelectTarget(SelectTargetMethod::MaxDistance, 0, 45.0f, true)) - { - me->CastSpell(me, TABLE_SPELL_PUNISH[horsemanId], false); - Talk(EMOTE_RAGECAST); - } - events.RepeatEvent(2010); - return; case EVENT_SECONDARY_SPELL: - me->CastSpell(me->GetVictim(), RAID_MODE(TABLE_SPELL_SECONDARY_10[horsemanId], TABLE_SPELL_SECONDARY_25[horsemanId]), false); + if (horsemanId == HORSEMAN_ZELIEK) + { + int32 bp0 = 443; + CustomSpellValues values; + values.AddSpellMod(SPELLVALUE_BASE_POINT0, bp0); + values.AddSpellMod(SPELLVALUE_MAX_TARGETS, 50); // 30yd + me->CastCustomSpell(SPELL_ZELIEK_HOLY_WRATH_10, values, me->GetVictim(), TRIGGERED_NONE, nullptr, nullptr, ObjectGuid::Empty); + } + else // HORSEMAN_BLAUMEUX + { + me->CastSpell(me->GetVictim(), SPELL_BLAUMEUX_VOID_ZONE_10, false); + } events.RepeatEvent(15000); return; } @@ -366,7 +373,16 @@ public: { if (Unit* target = SelectTarget(SelectTargetMethod::MaxDistance, 0, 45.0f, true)) { - me->CastSpell(target, RAID_MODE(TABLE_SPELL_PRIMARY_10[horsemanId], TABLE_SPELL_PRIMARY_25[horsemanId]), false); + if (horsemanId == HORSEMAN_ZELIEK) + { + int32 bp0 = 1109; // spell not used in vanilla, reduced damage from ~2.5 to ~1.2k + me->CastCustomSpell(me->GetVictim(), SPELL_ZELIEK_HOLY_BOLT_10, &bp0, 0, 0, false); + } + else if (horsemanId == HORSEMAN_BLAUMEUX) + { + int32 bp0 = 1109; // spell not used in vanilla, reduced damage from ~2.5 to ~1.2k + me->CastCustomSpell(me->GetVictim(), SPELL_BLAUMEUX_SHADOW_BOLT_10, &bp0, 0, 0, false); + } } } else @@ -391,6 +407,7 @@ public: if (Unit* caster = GetCaster()) { int32 damage; + switch (GetStackAmount()) { case 1: @@ -415,6 +432,21 @@ public: damage = 20000 + 1000 * (GetStackAmount() - 7); break; } + + if (caster->GetMap()->GetDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC) + { + switch (GetStackAmount()) + { + case 1: damage = 0; break; + case 2: damage = 250; break; + case 3: damage = 1000; break; + case 4: damage = 3000; break; + default: + damage = 1000 * GetStackAmount(); + break; + } + } + if (damage) { caster->CastCustomSpell(SPELL_MARK_DAMAGE, SPELLVALUE_BASE_POINT0, damage, GetTarget()); @@ -453,6 +485,6 @@ class spell_four_horsemen_consumption : public SpellScript void AddSC_boss_four_horsemen_40() { new boss_four_horsemen_40(); -// new spell_four_horsemen_mark(); + new spell_four_horsemen_mark(); // RegisterSpellScript(spell_four_horsemen_consumption); }