diff options
Diffstat (limited to 'src')
3 files changed, 135 insertions, 127 deletions
diff --git a/src/bindings/scripts/scripts/zone/hellfire_peninsula/boss_doomlord_kazzak.cpp b/src/bindings/scripts/scripts/zone/hellfire_peninsula/boss_doomlord_kazzak.cpp index c73fbd22225..1264a72f0cb 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_peninsula/boss_doomlord_kazzak.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_peninsula/boss_doomlord_kazzak.cpp @@ -23,6 +23,19 @@ EndScriptData */ #include "precompiled.h" +#define SAY_INTRO -1000375 +#define SAY_AGGRO1 -1000376 +#define SAY_AGGRO2 -1000377 +#define SAY_SURPREME1 -1000378 +#define SAY_SURPREME2 -1000379 +#define SAY_KILL1 -1000380 +#define SAY_KILL2 -1000381 +#define SAY_KILL3 -1000382 +#define SAY_DEATH -1000383 +#define EMOTE_FRENZY -1000384 +#define SAY_RAND1 -1000385 +#define SAY_RAND2 -1000386 + #define SPELL_SHADOWVOLLEY 32963 #define SPELL_CLEAVE 31779 #define SPELL_THUNDERCLAP 36706 @@ -55,13 +68,39 @@ struct TRINITY_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI Twisted_Reflection_Timer = 33000; // Timer may be incorrect } - void Aggro(Unit *who) {} + void JustRespawned() + { + DoScriptText(SAY_INTRO, m_creature); + } + + void Aggro(Unit *who) + { + switch(rand()%2) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + } + } void KilledUnit(Unit* victim) { // When Kazzak kills a player (not pets/totems), he regens some health - if(victim->GetTypeId() == TYPEID_PLAYER) + if (victim->GetTypeId() != TYPEID_PLAYER) + return; + DoCast(m_creature,SPELL_CAPTURESOUL); + + switch(rand()%3) + { + case 0: DoScriptText(SAY_KILL1, m_creature); break; + case 1: DoScriptText(SAY_KILL2, m_creature); break; + case 2: DoScriptText(SAY_KILL3, m_creature); break; + } + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_DEATH, m_creature); } void UpdateAI(const uint32 diff) @@ -112,6 +151,7 @@ struct TRINITY_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI //Enrage_Timer if (Enrage_Timer < diff) { + DoScriptText(EMOTE_FRENZY, m_creature); DoCast(m_creature,SPELL_ENRAGE); Enrage_Timer = 30000; }else Enrage_Timer -= diff; @@ -126,6 +166,7 @@ struct TRINITY_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI } }; + CreatureAI* GetAI_boss_doomlordkazzak(Creature *_Creature) { return new boss_doomlordkazzakAI (_Creature); diff --git a/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp b/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp index 1d2760be73c..5b5dd3dabd9 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp @@ -61,9 +61,10 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance uint64 GamesmansExitDoor; // Door after Chess uint64 NetherspaceDoor; // Door at Malchezaar uint64 MastersTerraceDoor[2]; - uint64 ImageGUID; + bool NightbaneSummoned; + void Initialize() { for (uint8 i = 0; i < ENCOUNTERS; ++i) @@ -87,8 +88,9 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance NetherspaceDoor = 0; MastersTerraceDoor[0]= 0; MastersTerraceDoor[1]= 0; - ImageGUID = 0; + + NightbaneSummoned = false; } bool IsEncounterInProgress() const @@ -131,6 +133,9 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance case 17229: KilrekGUID = creature->GetGUID(); break; case 15688: TerestianGUID = creature->GetGUID(); break; case 15687: MoroesGUID = creature->GetGUID(); break; + case 17225: if(NightbaneSummoned)creature->RemoveFromWorld(); + else NightbaneSummoned = true; + break; } } diff --git a/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp b/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp index 949d447dcaa..eade0b96455 100644 --- a/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp +++ b/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp @@ -23,53 +23,31 @@ EndScriptData */ #include "precompiled.h" -//-------------------------------------- -//Spells -#define SPELL_SUNDER_ARMOR 33661 +#define SAY_AGGRO -1000387 +#define SAY_EARTHQUAKE_1 -1000388 +#define SAY_EARTHQUAKE_2 -1000389 +#define SAY_OVERRUN_1 -1000390 +#define SAY_OVERRUN_2 -1000391 +#define SAY_SLAY_1 -1000392 +#define SAY_SLAY_2 -1000393 +#define SAY_SLAY_3 -1000394 +#define SAY_DEATH -1000395 +#define SPELL_EARTHQUAKE 32686 +#define SPELL_SUNDER_ARMOR 33661 #define SPELL_CHAIN_LIGHTNING 33665 - #define SPELL_OVERRUN 32636 -#define SAY_OVERRUN_1 "Trajectory locked." -#define SOUND_OVERRUN_1 11347 -#define SAY_OVERRUN_2 "Engage maximum speed." -#define SOUND_OVERRUN_2 11348 - #define SPELL_ENRAGE 33653 - #define SPELL_MARK_DEATH 37128 -#define SPELL_EARTHQUAKE 32686 -#define SAY_EARTHQUAKE_1 "Tectonic disruption commencing." -#define SOUND_EARTHQUAKE_1 11345 -#define SAY_EARTHQUAKE_2 "Magnitude set. Release." -#define SOUND_EARTHQUAKE_2 11346 -//--------------------------------------- -//Aggro -#define SAY_AGGRO "Do not proceed. You will be eliminated!" -#define SOUND_AGGRO 11344 -//--------------------------------------- -//Slay -#define SAY_SLAY_1 "Threat level zero." -#define SOUND_SLAY_1 11349 -#define SAY_SLAY_2 "Directive accomplished." -#define SOUND_SLAY_2 11350 -#define SAY_SLAY_3 "Target exterminated." -#define SOUND_SLAY_3 11351 -//--------------------------------------- -//Death -#define SAY_DEATH "System failure in five... four..." -#define SOUND_DEATH 11352 - -struct TRINITY_DLL_DECL boss_doomwalkerAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_doomwalkerAI : public ScriptedAI { boss_doomwalkerAI(Creature *c) : ScriptedAI(c) {Reset();} - uint32 Chain_Timer; - uint32 Enrage_Timer; + uint32 Enrage_Timer; uint32 Overrun_Timer; - uint32 Quake_Timer; + uint32 Quake_Timer; uint32 Armor_Timer; bool InEnrage; @@ -82,7 +60,7 @@ struct TRINITY_DLL_DECL boss_doomwalkerAI : public ScriptedAI Quake_Timer = 25000 + rand()%10000; Overrun_Timer = 30000 + rand()%15000; - InEnrage = false; + InEnrage = false; } void KilledUnit(Unit* Victim) @@ -92,114 +70,98 @@ struct TRINITY_DLL_DECL boss_doomwalkerAI : public ScriptedAI switch(rand()%3) { - case 0: - DoYell(SAY_SLAY_1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_SLAY_1); - break; - case 1: - DoYell(SAY_SLAY_2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_SLAY_2); - break; - case 2: - DoYell(SAY_SLAY_3, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_SLAY_3); - break; + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; } + + DoCast(m_creature->getVictim(), SPELL_MARK_DEATH); } void JustDied(Unit* Killer) { - DoYell(SAY_DEATH, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_DEATH); + DoScriptText(SAY_DEATH, m_creature); } void Aggro(Unit *who) { - DoYell(SAY_AGGRO, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_AGGRO); + DoScriptText(SAY_AGGRO, m_creature); } void UpdateAI(const uint32 diff) { - if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) return; - //if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + //Spell Enrage, when hp <= 20% gain enrage + if (((m_creature->GetHealth()*100)/ m_creature->GetMaxHealth()) <= 20) { - //Spell Enrage - if (((m_creature->GetHealth()*100)/ m_creature->GetMaxHealth()) <= 20)//when hp <= 20% gain enrage - { - if(Enrage_Timer < diff) - { - DoCast(m_creature,SPELL_ENRAGE); - Enrage_Timer = 6000; - InEnrage = true; - }else Enrage_Timer -= diff; - } - - //Spell Overrun - if (Overrun_Timer < diff) - { - switch(rand()%2) - { - case 0: - DoYell(SAY_OVERRUN_1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_OVERRUN_1); - break; - case 1: - DoYell(SAY_OVERRUN_2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_OVERRUN_2); - break; - } - DoCast(m_creature->getVictim(),SPELL_OVERRUN); - Overrun_Timer = 25000 + rand()%15000; - - }else Overrun_Timer -= diff; - - //Spell Earthquake - if (Quake_Timer < diff) + if(Enrage_Timer < diff) { - if (rand()%2) - return; - - switch(rand()%2) - { - case 0: - DoYell(SAY_EARTHQUAKE_1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_EARTHQUAKE_1); - break; - case 1: - DoYell(SAY_EARTHQUAKE_2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_EARTHQUAKE_2); - break; - } - if(InEnrage) - { - m_creature->RemoveAura(SPELL_ENRAGE, 0);//remove enrage before casting earthquake because enrage + earthquake = 16000dmg over 8sec and all dead - } - DoCast(m_creature,SPELL_EARTHQUAKE); - Quake_Timer = 30000 + rand()%25000; - }else Quake_Timer -= diff; - - //Spell Chain Lightning - if (Chain_Timer < diff) + DoCast(m_creature,SPELL_ENRAGE); + Enrage_Timer = 6000; + InEnrage = true; + }else Enrage_Timer -= diff; + } + + //Spell Overrun + if (Overrun_Timer < diff) + { + switch(rand()%2) { - DoCast(m_creature->getVictim(),SPELL_CHAIN_LIGHTNING); - Chain_Timer = 15000 + rand()%25000; - }else Chain_Timer -= diff; + case 0: DoScriptText(SAY_OVERRUN_1, m_creature); break; + case 1: DoScriptText(SAY_OVERRUN_2, m_creature); break; + } + + DoCast(m_creature->getVictim(),SPELL_OVERRUN); + Overrun_Timer = 25000 + rand()%15000; + }else Overrun_Timer -= diff; + + //Spell Earthquake + if (Quake_Timer < diff) + { + if (rand()%2) + return; - //Spell Sunder Armor - if (Armor_Timer < diff) + switch(rand()%2) { - DoCast(m_creature->getVictim(),SPELL_SUNDER_ARMOR); - Armor_Timer = 15000 + rand()%15000; - }else Armor_Timer -= diff; + case 0: DoScriptText(SAY_EARTHQUAKE_1, m_creature); break; + case 1: DoScriptText(SAY_EARTHQUAKE_2, m_creature); break; + } - DoMeleeAttackIfReady(); - } + //remove enrage before casting earthquake because enrage + earthquake = 16000dmg over 8sec and all dead + if (InEnrage) + m_creature->RemoveAura(SPELL_ENRAGE, 0); + + DoCast(m_creature,SPELL_EARTHQUAKE); + Quake_Timer = 30000 + rand()%25000; + }else Quake_Timer -= diff; + + //Spell Chain Lightning + if (Chain_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,1); + + if (!target) + target = m_creature->getVictim(); + + if (target) + DoCast(target,SPELL_CHAIN_LIGHTNING); + + Chain_Timer = 10000 + rand()%25000; + }else Chain_Timer -= diff; + + //Spell Sunder Armor + if (Armor_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SUNDER_ARMOR); + Armor_Timer = 10000 + rand()%15000; + }else Armor_Timer -= diff; + + DoMeleeAttackIfReady(); } -}; +}; CreatureAI* GetAI_boss_doomwalker(Creature *_Creature) { @@ -210,7 +172,7 @@ void AddSC_boss_doomwalker() { Script *newscript; newscript = new Script; - newscript->Name="boss_doomwalker"; + newscript->Name = "boss_doomwalker"; newscript->GetAI = &GetAI_boss_doomwalker; newscript->RegisterSelf(); } |