fix(Scripts/Mechanar): Add missing Enrage event for Pathaleon the Calculator (#15650)

* init

* 2

* indentation

* 3
This commit is contained in:
Gultask
2023-03-30 18:09:11 -03:00
committed by GitHub
parent 3ede5186ba
commit ea047f2cf2
2 changed files with 34 additions and 9 deletions

View File

@@ -0,0 +1,8 @@
--
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceEntry` = 35301) AND (`ConditionTypeOrReference` = 31) AND (`ConditionValue2` = 21062);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 1, 35301, 0, 0, 31, 0, 3, 21062, 0, 0, 0, 0, '', 'Spell Suicide (35301) only targets Nether Wraith (21062)');
DELETE FROM `creature_equip_template` WHERE (`CreatureID` = 19220 AND `ID` = 2);
INSERT INTO `creature_equip_template` (`CreatureID`, `ID`, `ItemID1`, `ItemID2`, `ItemID3`, `VerifiedBuild`) VALUES
(19220, 2, 29455, 0, 0, 48526);

View File

@@ -37,6 +37,8 @@ enum Spells
SPELL_ARCANE_TORRENT = 36022,
SPELL_MANA_TAP = 36021,
SPELL_DOMINATION = 35280,
SPELL_FRENZY = 36992,
SPELL_SUICIDE = 35301,
SPELL_ETHEREAL_TELEPORT = 34427,
SPELL_GREATER_INVISIBILITY = 34426,
SPELL_SUMMON_NETHER_WRAITH_1 = 35285,
@@ -48,6 +50,8 @@ enum Spells
enum Misc
{
ACTION_BRIDGE_MOB_DEATH = 1, // Used by SAI
EQUIPMENT_NORMAL = 1,
EQUIPMENT_FRENZY = 2,
};
struct boss_pathaleon_the_calculator : public BossAI
@@ -60,9 +64,13 @@ struct boss_pathaleon_the_calculator : public BossAI
});
}
bool _isEnraged;
void Reset() override
{
_Reset();
_isEnraged = false;
me->LoadEquipment(EQUIPMENT_NORMAL);
if (instance->GetPersistentData(DATA_BRIDGE_MOB_DEATH_COUNT) < 4)
{
@@ -81,18 +89,23 @@ struct boss_pathaleon_the_calculator : public BossAI
ScheduleHealthCheckEvent(20, [&]()
{
summons.DespawnAll();
DoCastSelf(SPELL_DISGRUNTLED_ANGER, true);
DoCastSelf(SPELL_SUICIDE, true);
DoCastSelf(SPELL_FRENZY, true);
Talk(SAY_ENRAGE);
_isEnraged = true;
me->LoadEquipment(EQUIPMENT_FRENZY);
});
scheduler.Schedule(30s, [this](TaskContext context)
scheduler.Schedule(20s, 25s, [this](TaskContext context)
{
for (uint8 i = 0; i < DUNGEON_MODE(3, 4); ++i)
me->CastSpell(me, SPELL_SUMMON_NETHER_WRAITH_1 + i, true);
if (!_isEnraged)
{
for (uint8 i = 0; i < DUNGEON_MODE(3, 4); ++i)
me->CastSpell(me, SPELL_SUMMON_NETHER_WRAITH_1 + i, true);
Talk(SAY_SUMMON);
context.Repeat(30s, 40s);
Talk(SAY_SUMMON);
}
context.Repeat(45s, 50s);
}).Schedule(12s, [this](TaskContext context)
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, PowerUsersSelector(me, POWER_MANA, 40.0f, false)))
@@ -106,13 +119,17 @@ struct boss_pathaleon_the_calculator : public BossAI
me->ModifyPower(POWER_MANA, 5000);
DoCastSelf(SPELL_ARCANE_TORRENT);
context.Repeat(15s);
}).Schedule(25s, [this](TaskContext context)
}).Schedule(10s, 15s, [this](TaskContext context)
{
if (DoCastRandomTarget(SPELL_DOMINATION, 1, 50.0f) == SPELL_CAST_OK)
{
Talk(SAY_DOMINATION);
}
context.Repeat(30s);
context.Repeat(27s, 40s);
}).Schedule(25s, [this](TaskContext context)
{
DoCast(SPELL_DISGRUNTLED_ANGER);
context.Repeat(40s, 90s);
});
if (IsHeroic())