示例#1
0
        public static void InitNPCs()
        {
            //Pandemonius
            pandemoniusEntry = NPCMgr.GetEntry(NPCId.Pandemonius);
            pandemoniusEntry.BrainCreator = pandemonius => new PandemoniusBrain(pandemonius);
            pandemoniusEntry.AddSpells(pandemoniusSpells);

			SpellHandler.Apply(spell => spell.AISettings.SetCooldown(15000, 25000), SpellId.VoidBlast);
			SpellHandler.Apply(spell => spell.CooldownTime = 20000, SpellId.DarkShell);
        }
示例#2
0
        public static void InitNPCs()
        {
            _deviateStinglashEntry = NPCMgr.GetEntry(NPCId.DeviateStinglash);
            _deviateStinglashEntry.AddSpell(SpellId.Lash);
            var lash = SpellHandler.Get(SpellId.Lash);
            lash.AISettings.SetCooldownRange(17000, 20000);

            _deviateCreeperEntry = NPCMgr.GetEntry(NPCId.DeviateCreeper);
            _deviateCreeperEntry.AddSpell(SpellId.InfectedWound);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(12000, 18000), SpellId.InfectedWound);

            _deviateSlayerEntry = NPCMgr.GetEntry(NPCId.DeviateSlayer);
            _deviateSlayerEntry.Activated +=
                deviateSlayer => { ((BaseBrain) deviateSlayer.Brain).DefaultCombatAction.Strategy = new DeviateSlayerAttackAction(deviateSlayer); };

            _mutanustheDevourerEntry = NPCMgr.GetEntry(NPCId.MutanusTheDevourer);
            var mutanustheDevourerSpells = new[] {SpellId.NaralexsNightmare, SpellId.Terrify, SpellId.ThundercrackRank1};
            _mutanustheDevourerEntry.AddSpells(mutanustheDevourerSpells);
            SpellHandler.Apply(spell => spell.CooldownTime = 30000, mutanustheDevourerSpells[0]);
            SpellHandler.Apply(spell => spell.CooldownTime = 50000, mutanustheDevourerSpells[1]);
            SpellHandler.Apply(spell =>
                               	{
                               		spell.TargetFlags = SpellTargetFlags.Self;
                               		spell.CooldownTime = 10000;
                               	}, mutanustheDevourerSpells[2]);

            _madMagglishEntry = NPCMgr.GetEntry(NPCId.MadMagglish);
            _madMagglishEntry.AddSpell(SpellId.SmokeBomb);
            SpellHandler.Apply(spell =>
                               	{
                               		spell.TargetFlags = SpellTargetFlags.Self;
                               		spell.CooldownTime = 9000;
                               	}, SpellId.SmokeBomb);

            _lordCobrahnEntry = NPCMgr.GetEntry(NPCId.LordCobrahn);
            _lordCobrahnEntry.BrainCreator = lordCobrahn => new LordCobrahnBrain(lordCobrahn);
            _lordCobrahnEntry.Activated +=
                lordCobrahn => { ((BaseBrain) lordCobrahn.Brain).DefaultCombatAction.Strategy = new LordCobrahnAttackAction(lordCobrahn); };

            _lordPythasEntry = NPCMgr.GetEntry(NPCId.LordPythas);
            var lordPythasSpells = new[] {SpellId.ThunderclapRank1, SpellId.SleepRank1};
            _lordPythasEntry.AddSpells(lordPythasSpells);
            SpellHandler.Apply(spell =>
                               	{
                               		spell.TargetFlags = SpellTargetFlags.Self;
                               		spell.CooldownTime = Random.Next(6000, 11000);
                               	}, lordPythasSpells[0]);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(12000, 20000), lordPythasSpells[1]);
            _lordPythasEntry.BrainCreator = lordPythas => new LordPythasBrain(lordPythas);
            _lordPythasEntry.Activated +=
                lordPythas => { ((BaseBrain) lordPythas.Brain).DefaultCombatAction.Strategy = new LordPythasAttackAction(lordPythas); };

            _ladyAnacondraEntry = NPCMgr.GetEntry(NPCId.LadyAnacondra);
            _ladyAnacondraEntry.AddSpell(SpellId.SleepRank1);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(12000, 25000), SpellId.SleepRank1);
            _ladyAnacondraEntry.BrainCreator = ladyAnacondra => new LadyAnacondraBrain(ladyAnacondra);
            _ladyAnacondraEntry.Activated +=
                ladyAnacondra => { ((BaseBrain) ladyAnacondra.Brain).DefaultCombatAction.Strategy = new LadyAnacondraAttackAction(ladyAnacondra); };

            _boahnEntry = NPCMgr.GetEntry(NPCId.Boahn);
            _boahnEntry.BrainCreator = boahn => new BoahnBrain(boahn);
            _boahnEntry.Activated +=
                boahn => { ((BaseBrain) boahn.Brain).DefaultCombatAction.Strategy = new BoahnAttackAction(boahn); };

            _lordSerpentisEntry = NPCMgr.GetEntry(NPCId.LordSerpentis);
            _lordSerpentisEntry.AddSpell(SpellId.SleepRank1);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(10000, 19000), SpellId.SleepRank1);
            _lordSerpentisEntry.BrainCreator = lordSerpentis => new LordSerpentisBrain(lordSerpentis);
            _lordSerpentisEntry.Activated +=
                lordSerpentis => { ((BaseBrain) lordSerpentis.Brain).DefaultCombatAction.Strategy = new LordSerpentisAttackAction(lordSerpentis); };

            _skumEntry = NPCMgr.GetEntry(NPCId.Skum);
            _skumEntry.AddSpell(SpellId.ChainedBolt);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(4000, 6000), SpellId.ChainedBolt);

            _druidoftheFangEntry = NPCMgr.GetEntry(NPCId.DruidOfTheFang);
            _druidoftheFangEntry.BrainCreator = druidoftheFang => new DruidoftheFangBrain(druidoftheFang);
            _druidoftheFangEntry.Activated +=
                druidoftheFang => { ((BaseBrain) druidoftheFang.Brain).DefaultCombatAction.Strategy = new DruidoftheFangAttackAction(druidoftheFang); };

            _deviateAdderEntry = NPCMgr.GetEntry(NPCId.DeviateAdder);
            _deviateAdderEntry.AddSpell(SpellId.EffectPoison);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(15000, 25000), SpellId.EffectPoison);

            _deviateCrocoliskEntry = NPCMgr.GetEntry(NPCId.DeviateCrocolisk);
            _deviateCrocoliskEntry.AddSpell(SpellId.TendonRip);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(10000, 12000), SpellId.TendonRip);

            _deviateLasherEntry = NPCMgr.GetEntry(NPCId.DeviateLasher);
            _deviateLasherEntry.AddSpell(SpellId.WideSlashRank1);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(8000, 12000), SpellId.WideSlashRank1);

            _deviateDreadfangEntry = NPCMgr.GetEntry(NPCId.DeviateDreadfang);
            _deviateDreadfangEntry.AddSpell(SpellId.Terrify);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(20000, 25000), SpellId.Terrify);

            _deviateViperEntry = NPCMgr.GetEntry(NPCId.DeviateViper);
            _deviateViperEntry.AddSpell(SpellId.LocalizedToxin);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(10000, 15000), SpellId.LocalizedToxin);

            _deviateVenomwingEntry = NPCMgr.GetEntry(NPCId.DeviateVenomwing);
            _deviateVenomwingEntry.AddSpell(SpellId.ToxicSpit);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(8000, 10000), SpellId.ToxicSpit);

            _deviateShamblerEntry = NPCMgr.GetEntry(NPCId.DeviateShambler);
            _deviateShamblerEntry.Activated +=
                deviateShambler => { ((BaseBrain) deviateShambler.Brain).DefaultCombatAction.Strategy = new DeviateShamblerAttackAction(deviateShambler); };

            _verdanTheEverlivingEntry = NPCMgr.GetEntry(NPCId.VerdanTheEverliving);
            _verdanTheEverlivingEntry.AddSpell(SpellId.GraspingVines);
            SpellHandler.Apply(spell =>
                               	{
                               		spell.TargetFlags = SpellTargetFlags.Self;
                               		spell.CooldownTime = Random.Next(10000, 13000);
                               	}, SpellId.GraspingVines);
        }
示例#3
0
		public static void InitNPCs()
		{
		    
			// Oggleflint
			oggleflintEntry = NPCMgr.GetEntry(NPCId.Oggleflint);
			oggleflintEntry.AddSpell(SpellId.Cleave);
			SpellHandler.Apply(spell => { spell.CooldownTime = 5000; }, SpellId.Cleave);


			// Taragaman the Hungerer
			taragamanEntry = NPCMgr.GetEntry(NPCId.TaragamanTheHungerer);
            SpellId[] taragamanSpells = new SpellId[2] { SpellId.Uppercut, SpellId.FireNova };
            taragamanEntry.AddSpells(taragamanSpells);
			SpellHandler.Apply(spell => { spell.CooldownTime = 5000; }, taragamanSpells[0]);
			SpellHandler.Apply(spell => { spell.CooldownTime = 10000; }, taragamanSpells[1]);


			// Jergosh the Invoker
			jergoshEntry = NPCMgr.GetEntry(NPCId.JergoshTheInvoker);
            SpellId[] jergoshSpells = new SpellId[2] { SpellId.CurseOfWeakness, SpellId.Immolate };
            jergoshEntry.AddSpells(jergoshSpells);
			SpellHandler.Apply(spell => { spell.CooldownTime = 12000; }, jergoshSpells[0]);
			SpellHandler.Apply(spell => { spell.CooldownTime = 5000; }, jergoshSpells[1]);


			// Bazzalan
			bazzalanEntry = NPCMgr.GetEntry(NPCId.Bazzalan);
            SpellId[] bazzalanSpells = new SpellId[2] { SpellId.Poison, SpellId.SinisterStrike };
            bazzalanEntry.AddSpells(bazzalanSpells);
			SpellHandler.Apply(spell => { spell.CooldownTime = 10000; }, bazzalanSpells[0]);
			SpellHandler.Apply(spell => { spell.CooldownTime = 12000; }, bazzalanSpells[1]);
			
			//NPCs
			
			//Earthborer
			earthborerEntry = NPCMgr.GetEntry(NPCId.Earthborer);
			earthborerEntry.AddSpell(SpellId.EarthborerAcid);
			SpellHandler.Apply(spell => { spell.CooldownTime = (random.Next(8000, 12000)); }, SpellId.EarthborerAcid); //TODO : Check cooldowns

			//RagefireShaman
			ragefireshamanEntry = NPCMgr.GetEntry(NPCId.RagefireShaman);
			SpellId[] ragefireshamanSpells = new SpellId[2] { SpellId.HealingWave, SpellId.LightningBolt };
            jergoshEntry.AddSpells(ragefireshamanSpells);
            SpellHandler.Apply(spell => { spell.TargetFlags = SpellTargetFlags.Self; }, ragefireshamanSpells[0]); //Casting heal on self
            SpellHandler.Apply(spell => { spell.CooldownTime = (random.Next(8000, 12000)); }, ragefireshamanSpells[0]);//TODO : Check cooldowns
            SpellHandler.Apply(spell => { spell.CooldownTime = (random.Next(8000, 12000)); }, ragefireshamanSpells[1]);//TODO : Check cooldowns

			//RagefireTrogg
			ragefiretroggEntry = NPCMgr.GetEntry(NPCId.RagefireTrogg);
			ragefiretroggEntry.AddSpell(SpellId.Strike);
			SpellHandler.Apply(spell => { spell.CooldownTime = (random.Next(5000, 12000)); }, SpellId.Strike); //TODO : Check cooldowns

			//SearingBladeCultist
			searingbladecultistEntry = NPCMgr.GetEntry(NPCId.SearingBladeCultist);
			searingbladecultistEntry.AddSpell(SpellId.CurseOfAgony_4);
			SpellHandler.Apply(spell => { spell.CooldownTime = (random.Next(8000, 12000)); }, SpellId.CurseOfAgony_4); //TODO : Check cooldowns

			//SearingBladeEnforcer
			searingbladeenforcerEntry = NPCMgr.GetEntry(NPCId.SearingBladeEnforcer);
			searingbladeenforcerEntry.AddSpell(SpellId.ShieldSlam);
			SpellHandler.Apply(spell => { spell.CooldownTime = (random.Next(5000, 12000)); }, SpellId.ShieldSlam); //TODO : Check cooldowns

			//SearingBladeWarlock (!)
			searingbladewarlockEntry = NPCMgr.GetEntry(NPCId.SearingBladeWarlock);
			searingbladewarlockEntry.AddSpell(SpellId.ShadowBolt_31);
			SpellHandler.Apply(spell => { spell.CooldownTime = (random.Next(5000, 10000)); }, SpellId.ShadowBolt_31); //TODO : Check cooldowns
			searingbladewarlockEntry.BrainCreator = searingbladewarlock => new SearingBladeWarlockBrain(searingbladewarlock);
		}