Drak'Tharon Keep: *Cleanup

*Trollgore script
		  *Tharon'ja script

--HG--
branch : trunk
This commit is contained in:
tartalo
2009-10-31 19:14:54 +01:00
parent 47ba05f5d4
commit 7d8af67268
9 changed files with 379 additions and 62 deletions
@@ -1,3 +1,21 @@
/*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* Script Data Start
SDName: Boss dred
SDAuthor: LordVanMartin
@@ -1,7 +1,25 @@
/*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* Script Data Start
SDName: Boss novos
SDAuthor: LordVanMartin
SD%Complete:
SDAuthor: Tartalo
SD%Complete: 100
SDComment:
SDCategory:
Script Data End */
@@ -1,6 +1,24 @@
/*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* Script Data Start
SDName: Boss tharon_ja
SDAuthor: LordVanMartin
SDName: Boss Tharon'ja
SDAuthor: Tartalo
SD%Complete:
SDComment:
SDCategory:
@@ -14,44 +32,55 @@ update creature_template set scriptname = 'boss_tharon_ja' where entry = '';
enum Spells
{
SPELL_COURSE_OF_LIFE = 49527,
SPELL_DECAY_FLESH = 49356, //casted at end of pahase 1, starts phase 2
SPELL_EYE_BEAM = 49544,
SPELL_LIGHTNING_BREATH = 49537,
SPELL_POISON_CLOUD = 49548,
SPELL_RAIN_OF_FIRE = 49518,
SPELL_RETURN_FLESH = 53463, //Channeled spell ending phase two and returning to phase 1. This ability will stun the party for 6 seconds.
SPELL_SHADOW_VOLLEY = 49528,
//Spells Heroic
H_SPELL_COURSE_OF_LIFE = 59972,
H_SPELL_EYE_BEAM = 59965,
H_SPELL_LIGHTNING_BREATH = 59963,
H_SPELL_POISON_CLOUD = 59969,
H_SPELL_RAIN_OF_FIRE = 59971,
H_SPELL_SHADOW_VOLLEY = 59973
//skeletal spells (phase 1)
SPELL_CURSE_OF_LIFE = 49527,
H_SPELL_CURSE_OF_LIFE = 59972,
SPELL_RAIN_OF_FIRE = 49518,
H_SPELL_RAIN_OF_FIRE = 59971,
SPELL_SHADOW_VOLLEY = 49528,
H_SPELL_SHADOW_VOLLEY = 59973,
SPELL_DECAY_FLESH = 49356, //casted at end of phase 1, starts phase 2
//flesh spells (phase 2)
SPELL_GIFT_OF_THARON_JA = 52509,
SPELL_EYE_BEAM = 49544,
H_SPELL_EYE_BEAM = 59965,
SPELL_LIGHTNING_BREATH = 49537,
H_SPELL_LIGHTNING_BREATH = 59963,
SPELL_POISON_CLOUD = 49548,
H_SPELL_POISON_CLOUD = 59969,
SPELL_RETURN_FLESH = 53463 //Channeled spell ending phase two and returning to phase 1. This ability will stun the party for 6 seconds.
};
enum PlayerSkills
{
//Players skills durring Phase2
PLAYER_PHASE2_SLAYING_STRIKE = 50799,
PLAYER_PHASE2_TAUNT = 49613,
PLAYER_PHASE2_BONE_ARMOR = 49609,
PLAYER_PHASE2_TOUCH_OF_LIFE = 49617
//Players' skills during Phase2
SPELL_PLAYER_PHASE2_SLAYING_STRIKE = 50799,
SPELL_PLAYER_PHASE2_TAUNT = 49613,
SPELL_PLAYER_PHASE2_BONE_ARMOR = 49609,
SPELL_PLAYER_PHASE2_TOUCH_OF_LIFE = 49617
};
//Phase 1 all abilities except Eye beam
//Phase 2 turns players to skeletons with new abilities, boss grows skin
//not in db
enum Yells
{
SAY_AGGRO = -1600011,
SAY_KILL_1 = -1600012,
SAY_KILL_2 = -1600013,
SAY_FLESH_1 = -1600014,
SAY_FLESH_2 = -1600015,
SAY_SKELETON_1 = -1600016,
SAY_SKELETON_2 = -1600017,
SAY_DEATH = -1600018
SAY_AGGRO = -1600011,
SAY_KILL_1 = -1600012,
SAY_KILL_2 = -1600013,
SAY_FLESH_1 = -1600014,
SAY_FLESH_2 = -1600015,
SAY_SKELETON_1 = -1600016,
SAY_SKELETON_2 = -1600017,
SAY_DEATH = -1600018
};
enum Models
{
MODEL_FLESH = 27696
};
enum CombatPhase
{
SKELETAL,
GOING_FLESH,
FLESH,
GOING_SKELETAL
};
struct TRINITY_DLL_DECL boss_tharon_jaAI : public ScriptedAI
@@ -61,13 +90,30 @@ struct TRINITY_DLL_DECL boss_tharon_jaAI : public ScriptedAI
pInstance = c->GetInstanceData();
}
uint32 uiPhaseTimer;
uint32 uiCurseOfLifeTimer;
uint32 uiRainOfFireTimer;
uint32 uiShadowVolleyTimer;
uint32 uiEyeBeamTimer;
uint32 uiLightningBreathTimer;
uint32 uiPoisonCloudTimer;
CombatPhase Phase;
ScriptedInstance* pInstance;
void Reset()
{
uiPhaseTimer = 20000;
uiCurseOfLifeTimer = 1000;
uiRainOfFireTimer = urand(14000,18000);
uiShadowVolleyTimer = urand(8000,10000);
Phase = SKELETAL;
m_creature->SetDisplayId(m_creature->GetNativeDisplayId());
if (pInstance)
pInstance->SetData(DATA_THARON_JA_EVENT, NOT_STARTED);
}
void EnterCombat(Unit* who)
{
DoScriptText(SAY_AGGRO, m_creature);
@@ -75,15 +121,105 @@ struct TRINITY_DLL_DECL boss_tharon_jaAI : public ScriptedAI
if (pInstance)
pInstance->SetData(DATA_THARON_JA_EVENT, IN_PROGRESS);
}
void AttackStart(Unit* who) {}
void MoveInLineOfSight(Unit* who) {}
void UpdateAI(const uint32 diff)
{
//Return since we have no target
if (!UpdateVictim())
return;
DoMeleeAttackIfReady();
switch (Phase)
{
case SKELETAL:
if (uiCurseOfLifeTimer < diff)
{
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, HEROIC(SPELL_CURSE_OF_LIFE,H_SPELL_CURSE_OF_LIFE));
uiCurseOfLifeTimer = urand(10000,15000);
} else uiCurseOfLifeTimer -= diff;
if (uiShadowVolleyTimer < diff)
{
DoCastVictim(HEROIC(SPELL_SHADOW_VOLLEY,H_SPELL_SHADOW_VOLLEY));
uiShadowVolleyTimer = urand(8000,10000);
} else uiShadowVolleyTimer -= diff;
if (uiRainOfFireTimer < diff)
{
DoCastAOE(HEROIC(SPELL_RAIN_OF_FIRE,H_SPELL_RAIN_OF_FIRE));
uiRainOfFireTimer = urand(14000,18000);
} else uiRainOfFireTimer -= diff;
if (uiPhaseTimer < diff)
{
DoCast(SPELL_DECAY_FLESH);
Phase = GOING_FLESH;
uiPhaseTimer = 6000;
} else uiPhaseTimer -= diff;
DoMeleeAttackIfReady();
break;
case GOING_FLESH:
if (uiPhaseTimer < diff)
{
DoScriptText(RAND(SAY_FLESH_1,SAY_FLESH_2),m_creature);
m_creature->SetDisplayId(MODEL_FLESH);
std::list<HostilReference*>& threatlist = m_creature->getThreatManager().getThreatList();
for (std::list<HostilReference*>::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
Unit *pTemp = Unit::GetUnit((*m_creature),(*itr)->getUnitGuid());
if (pTemp->GetTypeId() == TYPEID_PLAYER)
DoCast(pTemp, SPELL_GIFT_OF_THARON_JA);
}
uiPhaseTimer = 20000;
uiLightningBreathTimer = urand(3000,4000);
uiEyeBeamTimer = urand(4000,8000);
uiPoisonCloudTimer = urand(6000,7000);
Phase = FLESH;
} else uiPhaseTimer -= diff;
break;
case FLESH:
if (uiLightningBreathTimer < diff)
{
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget,HEROIC(SPELL_LIGHTNING_BREATH,H_SPELL_LIGHTNING_BREATH));
uiLightningBreathTimer = urand(6000,7000);
} else uiLightningBreathTimer -= diff;
if (uiEyeBeamTimer < diff)
{
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget,HEROIC(SPELL_EYE_BEAM,H_SPELL_EYE_BEAM));
uiEyeBeamTimer = urand(4000,6000);
} else uiEyeBeamTimer -= diff;
if (uiPoisonCloudTimer < diff)
{
DoCastAOE(HEROIC(SPELL_POISON_CLOUD,H_SPELL_POISON_CLOUD));
uiPoisonCloudTimer = urand(10000,12000);
} else uiPoisonCloudTimer -= diff;
if (uiPhaseTimer < diff)
{
DoCast(SPELL_RETURN_FLESH);
Phase = GOING_SKELETAL;
uiPhaseTimer = 6000;
} else uiPhaseTimer -= diff;
DoMeleeAttackIfReady();
break;
case GOING_SKELETAL:
if (uiPhaseTimer < diff)
{
DoScriptText(RAND(SAY_SKELETON_1,SAY_SKELETON_2), m_creature);
m_creature->SetDisplayId(m_creature->GetNativeDisplayId());
Phase = SKELETAL;
uiPhaseTimer = 20000;
uiCurseOfLifeTimer = 1000;
uiRainOfFireTimer = urand(14000,18000);
uiShadowVolleyTimer = urand(8000,10000);
} else uiPhaseTimer -= diff;
break;
}
}
void KilledUnit(Unit *victim)
@@ -1,8 +1,26 @@
/*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* Script Data Start
SDName: Boss trollgore
SDAuthor: LordVanMartin
SDAuthor: Tartalo
SD%Complete:
SDComment:
SDComment: TODO: spawn troll waves
SDCategory:
Script Data End */
@@ -14,22 +32,30 @@ update creature_template set scriptname = 'boss_trollgore' where entry = '';
enum Spells
{
SPELL_INFECTED_WOUND = 49637,
SPELL_CRUSH = 49639,
SPELL_CORPSE_EXPLODE = 49555,
SPELL_CONSUME = 49380,
//Spell Heroic
H_SPELL_CORPSE_EXPLODE = 59807,
H_SPELL_CONSUME = 59803
SPELL_INFECTED_WOUND = 49637,
SPELL_CRUSH = 49639,
SPELL_CORPSE_EXPLODE = 49555,
SPELL_CONSUME = 49380,
//Heroic spells
H_SPELL_CORPSE_EXPLODE = 59807,
H_SPELL_CONSUME = 59803
};
//not in db
enum Yells
{
SAY_AGGRO = -1600006,
SAY_KILL = -1600007,
SAY_CONSUME = -1600008,
SAY_EXPLODE = -1600009,
SAY_DEATH = -1600010
SAY_AGGRO = -1600006,
SAY_KILL = -1600007,
SAY_CONSUME = -1600008,
SAY_EXPLODE = -1600009,
SAY_DEATH = -1600010
};
enum Achievements
{
ACHIEV_CONSUMPTION_JUNCTION = 2151
};
enum Creatures
{
NPC_DRAKKARI_INVADERS = 22222
};
struct TRINITY_DLL_DECL boss_trollgoreAI : public ScriptedAI
@@ -39,10 +65,26 @@ struct TRINITY_DLL_DECL boss_trollgoreAI : public ScriptedAI
pInstance = c->GetInstanceData();
}
uint32 uiConsumeTimer;
uint32 uiAuraCountTimer;
uint32 uiCrushTimer;
uint32 uiInfectedWoundTimer;
uint32 uiExplodeCorpseTimer;
bool bAchiev;
ScriptedInstance* pInstance;
void Reset()
{
uiConsumeTimer = 15000;
uiAuraCountTimer = 15500;
uiCrushTimer = urand(1000,5000);
uiInfectedWoundTimer = urand(6000,10000);
uiExplodeCorpseTimer = 3000;
bAchiev = true;
if (pInstance)
pInstance->SetData(DATA_TROLLGORE_EVENT, NOT_STARTED);
}
@@ -62,6 +104,46 @@ struct TRINITY_DLL_DECL boss_trollgoreAI : public ScriptedAI
if (!UpdateVictim())
return;
if (uiConsumeTimer < diff)
{
DoScriptText(SAY_CONSUME, m_creature);
DoCast(HEROIC(SPELL_CONSUME,H_SPELL_CONSUME));
uiConsumeTimer = 15000;
} else uiConsumeTimer -= diff;
if (bAchiev)
{
if (uiAuraCountTimer < diff)
{
if (m_creature->HasAura(HEROIC(SPELL_CONSUME,H_SPELL_CONSUME)))
{
Aura *pConsumeAura = m_creature->GetAura(HEROIC(SPELL_CONSUME,H_SPELL_CONSUME));
if (pConsumeAura && pConsumeAura->GetStackAmount() > 9)
bAchiev = false;
}
uiAuraCountTimer = 16000;
} else uiAuraCountTimer -= diff;
}
if (uiCrushTimer < diff)
{
DoCastVictim(SPELL_CRUSH);
uiCrushTimer = urand(10000,15000);
} else uiCrushTimer -= diff;
if (uiInfectedWoundTimer < diff)
{
DoCastVictim(SPELL_INFECTED_WOUND);
uiInfectedWoundTimer = urand(25000,35000);
} else uiInfectedWoundTimer -= diff;
if (uiExplodeCorpseTimer < diff)
{
DoCast(HEROIC(SPELL_CORPSE_EXPLODE,H_SPELL_CORPSE_EXPLODE));
DoScriptText(SAY_EXPLODE, m_creature);
uiExplodeCorpseTimer = urand(15000,19000);
} uiExplodeCorpseTimer -= diff;
DoMeleeAttackIfReady();
}
void JustDied(Unit* killer)
@@ -69,7 +151,11 @@ struct TRINITY_DLL_DECL boss_trollgoreAI : public ScriptedAI
DoScriptText(SAY_DEATH, m_creature);
if (pInstance)
{
if (bAchiev)
pInstance->DoCompleteAchievement(ACHIEV_CONSUMPTION_JUNCTION);
pInstance->SetData(DATA_TROLLGORE_EVENT, DONE);
}
}
void KilledUnit(Unit *victim)
{
@@ -1,3 +1,21 @@
/*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef DEF_DRAK_THARON_H
#define DEF_DRAK_THARON_H
enum Data
@@ -1,3 +1,21 @@
/*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "precompiled.h"
#include "drak_tharon_keep.h"
@@ -9,6 +27,21 @@
3 - Tharon Ja
*/
enum Creatures
{
NPC_TROLLGORE = 26630,
NPC_NOVOS = 26631,
NPC_KING_DRED = 27483,
NPC_THARON_JA = 26632
};
enum GameObjects
{
GO_NOVOS_CRYSTAL_1 = 189299,
GO_NOVOS_CRYSTAL_2 = 189300,
GO_NOVOS_CRYSTAL_3 = 189301,
GO_NOVOS_CRYSTAL_4 = 189302
};
struct TRINITY_DLL_DECL instance_drak_tharon : public ScriptedInstance
{
instance_drak_tharon(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
@@ -51,16 +84,16 @@ struct TRINITY_DLL_DECL instance_drak_tharon : public ScriptedInstance
{
switch(pGo->GetEntry())
{
case 189299:
case GO_NOVOS_CRYSTAL_1:
uiNovosCrystal1 = pGo->GetGUID();
break;
case 189300:
case GO_NOVOS_CRYSTAL_2:
uiNovosCrystal2 = pGo->GetGUID();
break;
case 189301:
case GO_NOVOS_CRYSTAL_3:
uiNovosCrystal3 = pGo->GetGUID();
break;
case 189302:
case GO_NOVOS_CRYSTAL_4:
uiNovosCrystal4 = pGo->GetGUID();
break;
}
@@ -70,16 +103,16 @@ struct TRINITY_DLL_DECL instance_drak_tharon : public ScriptedInstance
{
switch(pCreature->GetEntry())
{
case 26630:
case NPC_TROLLGORE:
uiTrollgore = pCreature->GetGUID();
break;
case 26631:
case NPC_NOVOS:
uiNovos = pCreature->GetGUID();
break;
case 27483:
uiTrollgore = pCreature->GetGUID();
case NPC_KING_DRED:
uiDred = pCreature->GetGUID();
break;
case 26632:
case NPC_THARON_JA:
uiTharonJa = pCreature->GetGUID();
break;
}
+6 -2
View File
@@ -341,7 +341,9 @@ extern void AddSC_utgarde_keep();
extern void AddSC_boss_archavon(); //Vault of Archavon
extern void AddSC_boss_emalon();
extern void AddSC_instance_archavon();
extern void AddSC_boss_novos(); //Drak'Tharon Keep
extern void AddSC_boss_trollgore(); //Drak'Tharon Keep
extern void AddSC_boss_novos();
extern void AddSC_boss_tharon_ja();
extern void AddSC_instance_drak_tharon();
extern void AddSC_boss_cyanigosa(); //Violet Hold
extern void AddSC_boss_erekem();
@@ -785,7 +787,9 @@ void AddScripts()
AddSC_boss_archavon(); //Vault of Archavon
AddSC_boss_emalon();
AddSC_instance_archavon();
AddSC_boss_novos(); //Drak'Tharon Keep
AddSC_boss_trollgore(); //Drak'Tharon Keep
AddSC_boss_novos();
AddSC_boss_tharon_ja();
AddSC_instance_drak_tharon();
AddSC_boss_cyanigosa(); //Violet Hold
AddSC_boss_erekem();