/*
* Copyright (C) 2008-2009 Sun++ Team <http://www.sunscripting.com/>
* Copyright (C) 2005-2007 Ascent Team <http://www.ascentemu.com/>
* Copyright (C) 2007-2008 Moon++ Team <http://www.moonplusplus.info/>
*
* 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 3 of the License, or
* 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, see <http://www.gnu.org/licenses/>.
*/
#include "StdAfx.h"
//Allie script. By Sybil.
//DisplayID is -
#define CN_ALLIE ?
#define SPELL_MIND_SEAR 60440 //800 Dmg a second.
#define SPELL_SHIELD 68033 //Absorbs 16k.
#define SPELL_PAIN 68090 //7000 - 8000 damage every 3 sec.
#define SPELL_PLAGUE 56444 //Reduces stam and has a chance to jump.
#define SPELL_HEAL_SELF 68023 //Heals self for 40k ish.
#define SPELL_HEAL_ALLY 68025 //Heals ally for 95k ish.
class AllieAI : public MoonScriptBossAI
{
MOONSCRIPT_FACTORY_FUNCTION(AllieAI, MoonScriptBossAI)
AllieAI(Creature *pCreature) : MoonScriptBossAI(pCreature)
SpellDesc* Heal;
{
AddSpell2(SPELL_MIND_SEAR, Target_Current, 11000, 5000);
AddSpell2(SPELL_SHIELD, Target_Friendly, 25000, 5000);
AddSpell2(SPELL_PAIN, Target_RandomPlayer, 6000, 10000);
AddSpell2(SPELL_PLAGUE, Target_Current, 10000, 10000);
Heal = AddSpell(SPELL_HEAL_SELF, Target_Self);
AddSpell2(SPELL_HEAL_ALLY, Target_Friendly, 13000, 4000);
}
void AIUpdate()
{
if(GetHealthPercent <=30)
{
CastSpellNowNoScheduling(Heal);
Heal->mEnabled = false;
}
ParentClass::AIUpdate();
}
};
void SetupMaraudon(ScriptMgr * mgr)
{
mgr->register_creature_script(CN_ALLIE, &AllieAI::Create);
}