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);
        }
Beispiel #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);
        }