本文整理匯總了C#中WCell.RealmServer.NPCs.NPCEntry.AddSpell方法的典型用法代碼示例。如果您正苦於以下問題:C# NPCEntry.AddSpell方法的具體用法?C# NPCEntry.AddSpell怎麽用?C# NPCEntry.AddSpell使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WCell.RealmServer.NPCs.NPCEntry
的用法示例。
在下文中一共展示了NPCEntry.AddSpell方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: InitNPCs
public static void InitNPCs()
{
// Oggleflint
oggleflintEntry = NPCMgr.GetEntry(NPCId.Oggleflint);
oggleflintEntry.AddSpell(SpellId.Cleave);
oggleflintEntry.Activated += oggleflint =>
{
var brain = (BaseBrain)oggleflint.Brain;
var combatAction = (AICombatAction)brain.Actions[BrainState.Combat];
combatAction.Strategy = new OggleflintAttackAction(oggleflint);
oggleflint.AddProcHandler(cleave);
};
// Taragaman the Hungerer
taragamanEntry = NPCMgr.GetEntry(NPCId.TaragamanTheHungerer);
// taragamanEntry.AddSpell(SpellId.Uppercut); //Not working properly
taragamanEntry.AddSpell(SpellId.FireNova);
taragamanEntry.Activated += taragaman =>
{
var brain = (BaseBrain)taragaman.Brain;
var combatAction = (AICombatAction)brain.Actions[BrainState.Combat];
combatAction.Strategy = new TaragamanAttackAction(taragaman);
// taragaman.AddProcHandler(uppercut); //Currently not working
taragaman.AddProcHandler(firenova);
};
// Jergosh the Invoker
jergoshEntry = NPCMgr.GetEntry(NPCId.JergoshTheInvoker);
jergoshEntry.AddSpell(SpellId.CurseOfWeakness);
jergoshEntry.AddSpell(SpellId.Immolate);
jergoshEntry.Activated += jergosh =>
{
var brain = (BaseBrain)jergosh.Brain;
var combatAction = (AICombatAction)brain.Actions[BrainState.Combat];
combatAction.Strategy = new JergoshAttackAction(jergosh);
jergosh.AddProcHandler(weakness);
jergosh.AddProcHandler(immolate);
};
// Bazzalan
bazzalanEntry = NPCMgr.GetEntry(NPCId.Bazzalan);
bazzalanEntry.AddSpell(SpellId.Poison);
bazzalanEntry.AddSpell(SpellId.SinisterStrike);
bazzalanEntry.Activated += bazzalan =>
{
var brain = (BaseBrain)bazzalan.Brain;
var combatAction = (AICombatAction)brain.Actions[BrainState.Combat];
combatAction.Strategy = new BazzalanAttackAction(bazzalan);
bazzalan.AddProcHandler(poison);
bazzalan.AddProcHandler(sstrike);
};
}
示例2: InitNPCs
public static void InitNPCs()
{
// (!)Rethilgore
rethilgoreEntry = NPCMgr.GetEntry(3914);
rethilgoreEntry.AddSpell((SpellId)7295); // add Rethilgore Spell
rethilgoreEntry.BrainCreator = rethilgore => new RethilgoreBrain(rethilgore);
// Rethilgore spell has a cooldown of about 30s
SpellHandler.Apply(spell => { spell.CooldownTime = 30000; }, (SpellId)7295);
// (!)Baron Silverlaine
baronsilverlaineEntry = NPCMgr.GetEntry(3887);
baronsilverlaineEntry.AddSpell((SpellId)7068);
SpellHandler.Apply(spell => { spell.CooldownTime = 15000; }, (SpellId)7068);
// (!)Commander Springvale
commanderspringvaleEntry = NPCMgr.GetEntry(4278);
commanderspringvaleEntry.AddSpell((SpellId)5588);
commanderspringvaleEntry.AddSpell((SpellId)31713);
SpellHandler.Apply(spell => { spell.CooldownTime = 60000; }, (SpellId)5588);
SpellHandler.Apply(spell => { spell.CooldownTime = 45000; }, (SpellId)31713);
// (!)Odo the Blindwatcher
blindwatcherEntry = NPCMgr.GetEntry(4279);
blindwatcherEntry.AddSpell((SpellId)7484);
SpellHandler.Apply(spell => { spell.CooldownTime = 60000; }, (SpellId)7484);
// (!)Fenrus the Devourer
fenrusEntry = NPCMgr.GetEntry(4274);
fenrusEntry.AddSpell((SpellId)7125);
fenrusEntry.BrainCreator = fenrus => new FenrusBrain(fenrus);
SpellHandler.Apply(spell => { spell.CooldownTime = 60000; }, (SpellId)7125);
// (!)Archmage Arugal
arugalEntry = NPCMgr.GetEntry(4275);
arugalEntry.AddSpell((SpellId)7803);
arugalEntry.AddSpell((SpellId)7588);
SpellHandler.Apply(spell => { spell.CooldownTime = 25000; }, (SpellId)7803);
SpellHandler.Apply(spell => { spell.CooldownTime = 40000; }, (SpellId)7588);
}
示例3: InitNPCs
public static void InitNPCs()
{
// (!)Rethilgore
rethilgoreEntry = NPCMgr.GetEntry(NPCId.Rethilgore);
rethilgoreEntry.AddSpell(SpellId.SoulDrain); // add Rethilgore Spell
rethilgoreEntry.BrainCreator = rethilgore => new RethilgoreBrain(rethilgore);
// Rethilgore spell has a cooldown of about 30s
SpellHandler.Apply(spell => { spell.CooldownTime = 30000; }, SpellId.SoulDrain);
// (!)Baron Silverlaine
baronsilverlaineEntry = NPCMgr.GetEntry(NPCId.BaronSilverlaine);
baronsilverlaineEntry.AddSpell(SpellId.VeilOfShadow);
SpellHandler.Apply(spell => { spell.CooldownTime = 15000; }, SpellId.VeilOfShadow);
// (!)Commander Springvale
commanderspringvaleEntry = NPCMgr.GetEntry(NPCId.CommanderSpringvale);
commanderspringvaleEntry.AddSpell(SpellId.ClassSkillHammerOfJusticeRank2);
commanderspringvaleEntry.AddSpell(SpellId.HolyLight_7);
SpellHandler.Apply(spell => { spell.CooldownTime = 60000; }, SpellId.ClassSkillHammerOfJusticeRank2);
SpellHandler.Apply(spell => { spell.CooldownTime = 45000; }, SpellId.HolyLight_7);
// (!)Odo the Blindwatcher
blindwatcherEntry = NPCMgr.GetEntry(NPCId.OdoTheBlindwatcher);
blindwatcherEntry.AddSpell(SpellId.SkullforgeBrand);
SpellHandler.Apply(spell => { spell.CooldownTime = 60000; }, SpellId.HowlingRage_3);
// (!)Fenrus the Devourer
fenrusEntry = NPCMgr.GetEntry(NPCId.FenrusTheDevourer);
fenrusEntry.AddSpell(SpellId.ToxicSaliva);
fenrusEntry.BrainCreator = fenrus => new FenrusBrain(fenrus);
SpellHandler.Apply(spell => { spell.CooldownTime = 60000; }, SpellId.ToxicSaliva);
// (!)Archmage Arugal
arugalEntry = NPCMgr.GetEntry(NPCId.Arugal);
arugalEntry.AddSpell(SpellId.Thundershock);
arugalEntry.AddSpell(SpellId.VoidBolt);
SpellHandler.Apply(spell => { spell.CooldownTime = 25000; }, SpellId.Thundershock);
SpellHandler.Apply(spell => { spell.CooldownTime = 40000; }, SpellId.VoidBolt);
}
示例4: SetupGrizzly
static void SetupGrizzly()
{
// default settings
GrizzlyBear = new NPCEntry
{
Id = BearId,
DefaultName = "Sample Grizzly",
EntryFlags = NPCEntryFlags.Tamable,
Type = CreatureType.Humanoid,
DisplayIds = new[] { 21635u },
Scale = 1,
MinLevel = 73,
MaxLevel = 74,
HordeFactionId = FactionTemplateId.Monster_2,
MinHealth = 100000,
MaxHealth = 500000,
AttackPower = 314,
AttackTime = 1500,
MinDamage = 250,
MaxDamage = 360,
WalkSpeed = 2.5f,
RunSpeed = 8f,
FlySpeed = 14f,
MinMana = 2000
};
GrizzlyBear.SetResistance(DamageSchool.Physical, 7600);
// AOE damage spell
GrizzlyBear.AddSpell(SpellId.ConeOfFire);
// A spell with a freeze debuff
GrizzlyBear.AddSpell(SpellId.Chilled);
// Sample gossip menu
GossipMgr.AddText(sampleGossipTextId, new GossipText
{
Probability = 1,
TextMale = "Sample Gossip Menu",
TextFemale = "Take a good look"
});
GrizzlyBear.DefaultGossip = CreateSampleGossipMenu();
GrizzlyBear.FinalizeDataHolder();
//NPCMgr.AddEntry(BearId, GrizzlyBear);
}
示例5: InitNPCs
public static void InitNPCs()
{
// Dragonflayer Ironhelm
dragonflayerIronhelm = NPCMgr.GetEntry(NPCId.DragonflayerIronhelm);
dragonflayerIronhelm.AddSpell(SpellId.HeroicStrike_9);
SpellHandler.Apply(spell => { spell.CooldownTime = 5000; },
SpellId.HeroicStrike_9);
//Prince Keleseth
SetupPrinceKeleseth();
// Dragonflayer Ironhelm
dragonflayerIronhelm = NPCMgr.GetEntry(NPCId.DragonflayerIronhelm);
dragonflayerIronhelm.AddSpell(SpellId.HeroicStrike_9);
SpellHandler.Apply(spell => { spell.CooldownTime = 5000; },
SpellId.HeroicStrike_9);
}
示例6: SetupPrinceKeleseth
private static void SetupPrinceKeleseth()
{
princeKelesethEntry = NPCMgr.GetEntry(NPCId.PrinceKeleseth);
princeKelesethEntry.BrainCreator = princeKeleseth => new PrinceKelesethBrain(princeKeleseth);
PrinceSkeletonEntry = NPCMgr.GetEntry(NPCId.VrykulSkeleton);
// add spell to prince
PrinceSkeletonEntry.AddSpell(SpellId.Decrepify);
SpellHandler.Apply(spell => { spell.CooldownTime = 5000; }, SpellId.Decrepify);
var princeSpawnEntry = princeKelesethEntry.SpawnEntries[0];
var poolTemplate = princeSpawnEntry.PoolTemplate;
// do not let Skeletons decay
PrinceSkeletonEntry.DefaultDecayDelayMillis = 0;
// add skeleton spawn entries to pool
for (var i = 0; i < PrinceSkeletonCount; i++)
{
var skelSpawnEntry = new NPCSpawnEntry(PrinceSkeletonEntry.NPCId, MapId.UtgardeKeep, PrinceSkeletonPositions[i])
{
AutoSpawns = false, // must not respawn automatically when dead
IsDead = true, // spawn dead
PoolId = poolTemplate.PoolId // share Prince' pool
};
skelSpawnEntry.FinalizeDataHolder(); // adds to PoolTemplate automatically
PrinceSkeletonSpawnEntries[i] = skelSpawnEntry;
}
// give the prince his AttackAction
princeKelesethEntry.Activated += prince =>
{
var instance = prince.Map as UtgardeKeep;
if (instance == null || prince.SpawnPoint == null) return;
((BaseBrain)prince.Brain).DefaultCombatAction.Strategy = new PrinceKelesethAttackAction(prince);
instance.SpawnDeadPrinceSkeletons(prince);
};
// prince deleted
princeKelesethEntry.Deleted += prince =>
{
var instance = prince.Map as UtgardeKeep;
if (instance == null) return;
// add this "if", in case a GM spawns more than one prince
if (instance.PrinceKeleseth == prince)
{
// unset PrinceKeleseth object
instance.PrinceKeleseth = null;
}
};
// prince dies
princeKelesethEntry.Died += prince =>
{
var instance = prince.Map as UtgardeKeep;
if (instance == null) return;
// kill all skeletons
instance.KillPrinceSkeletons();
};
// update Skeleton if it dies/lives or gets deleted
PrinceSkeletonEntry.Activated += UpdateSkeleton;
PrinceSkeletonEntry.Died += UpdateSkeleton;
PrinceSkeletonEntry.Deleted += UpdateSkeleton;
princeKelesethEntry.AddSpell(SpellId.ShadowBolt_73);
SpellHandler.Apply(spell => { spell.CooldownTime = 10000; },
SpellId.ShadowBolt_73);
//Heroic
//princeKelesethEntry.AddSpell(SpellId.ShadowBolt_99);
//SpellHandler.Apply(spell => { spell.CooldownTime = 5000; },
// SpellId.ShadowBolt_73);
//princeKelesethEntry.AddSpell(SpellId.FrostTomb_3);
//princeKelesethEntry.AddSpell(SpellId.FrostTomb_3);
//princeKelesethEntry.AddSpell(SpellId.FrostTombSummon);
//princeKelesethEntry.AddSpell(SpellId.Decrepify);
//princeKelesethEntry.AddSpell(SpellId.ScourgeResurrection);
}
示例7: InitNPCs
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);
//.........這裏部分代碼省略.........
示例8: InitNPCs
public static void InitNPCs()
{
// Rahkzor
rhahkzorEntry = NPCMgr.GetEntry(NPCId.RhahkZor);
rhahkzorEntry.BrainCreator = rhahkzor => new RhahkzorBrain(rhahkzor);
rhahkzorEntry.AddSpell(SpellId.RhahkZorSlam); // add Rhakzor's slam
// Sneed
sneedShredderEntry = NPCMgr.GetEntry(NPCId.SneedsShredder);
sneedShredderEntry.Died += sneedShredder =>
{
// Cast the sneed ejection spell on the corpse after a short delay
sneedShredder.CallDelayed(2500, (delayed) => { sneedShredder.SpellCast.TriggerSelf(ejectSneed); });
};
sneedEntry = NPCMgr.GetEntry(NPCId.Sneed);
sneedEntry.AddSpell(disarm);
sneedEntry.Died += sneed =>
{
var instance = sneed.Map as Deadmines;
if (instance != null)
{
GameObject door = instance.sneedDoor;
if (door != null && door.IsInWorld)
{
// Open the door
door.State = GameObjectState.Disabled;
}
}
};
// Gilnid
gilnidEntry = NPCMgr.GetEntry(NPCId.Gilnid);
gilnidEntry.AddSpell(SpellId.MoltenMetal);
gilnidEntry.AddSpell(SpellId.MeltOre);
gilnidEntry.Died += gilnid =>
{
var instance = gilnid.Map as Deadmines;
if (instance != null)
{
GameObject door = instance.gilnidDoor;
if (door != null && door.IsInWorld)
{
// Open the door
door.State = GameObjectState.Disabled;
}
}
};
gilnidEntry.Activated += gilnid =>
{
((BaseBrain)gilnid.Brain).DefaultCombatAction.Strategy = new GilnidAttackAction(gilnid);
};
// Mr Smite
smiteEntry = NPCMgr.GetEntry(NPCId.MrSmite);
smiteEntry.BrainCreator = smite => new SmiteBrain(smite);
smiteEntry.Activated += smite =>
{
((BaseBrain)smite.Brain).DefaultCombatAction.Strategy = new SmiteAttackAction(smite);
};
}
示例9: InitNPCs
public static void InitNPCs()
{
// Oggleflint
oggleflintEntry = NPCMgr.GetEntry(NPCId.Oggleflint);
oggleflintEntry.AddSpell(SpellId.Cleave);
SpellHandler.Apply(spell => { spell.CooldownTime = 5000; },
SpellId.Cleave);
oggleflintEntry.Activated += oggleflint =>
{
var brain = (BaseBrain)oggleflint.Brain;
var combatAction = (AICombatAction)brain.Actions[BrainState.Combat];
combatAction.Strategy = new OggleflintAttackAction(oggleflint);
};
// Taragaman the Hungerer
taragamanEntry = NPCMgr.GetEntry(NPCId.TaragamanTheHungerer);
taragamanEntry.AddSpell(SpellId.Uppercut);
taragamanEntry.AddSpell(SpellId.FireNova);
SpellHandler.Apply(spell => { spell.CooldownTime = 5000; },
SpellId.Uppercut);
SpellHandler.Apply(spell => { spell.CooldownTime = 10000; },
SpellId.FireNova);
taragamanEntry.Activated += taragaman =>
{
var brain = (BaseBrain)taragaman.Brain;
var combatAction = (AICombatAction)brain.Actions[BrainState.Combat];
combatAction.Strategy = new TaragamanAttackAction(taragaman);
};
// Jergosh the Invoker
jergoshEntry = NPCMgr.GetEntry(NPCId.JergoshTheInvoker);
jergoshEntry.AddSpell(SpellId.CurseOfWeakness);
jergoshEntry.AddSpell(SpellId.Immolate);
SpellHandler.Apply(spell => { spell.CooldownTime = 12000; },
SpellId.CurseOfWeakness);
SpellHandler.Apply(spell => { spell.CooldownTime = 5000; },
SpellId.Immolate);
jergoshEntry.Activated += jergosh =>
{
var brain = (BaseBrain)jergosh.Brain;
var combatAction = (AICombatAction)brain.Actions[BrainState.Combat];
combatAction.Strategy = new JergoshAttackAction(jergosh);
};
// Bazzalan
bazzalanEntry = NPCMgr.GetEntry(NPCId.Bazzalan);
bazzalanEntry.AddSpell(SpellId.Poison);
bazzalanEntry.AddSpell(SpellId.SinisterStrike);
SpellHandler.Apply(spell => { spell.CooldownTime = 10000; },
SpellId.Poison);
SpellHandler.Apply(spell => { spell.CooldownTime = 12000; },
SpellId.SinisterStrike);
bazzalanEntry.Activated += bazzalan =>
{
var brain = (BaseBrain)bazzalan.Brain;
var combatAction = (AICombatAction)brain.Actions[BrainState.Combat];
combatAction.Strategy = new BazzalanAttackAction(bazzalan);
};
}
示例10: InitNPCs
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);
}
示例11: InitNPCs
public static void InitNPCs()
{
// Graveyard
// Interrogator Vishas
vishasEntry = NPCMgr.GetEntry(NPCId.InterrogatorVishas);
vishasEntry.AddSpell(SpellId.ClassSkillShadowWordPainRank5);
vishasEntry.BrainCreator = interrogatorvishas => new InterrogatorVishasBrain(interrogatorvishas);
vishasEntry.Activated += interrogatorvishas =>
{
((BaseBrain)interrogatorvishas.Brain).DefaultCombatAction.Strategy = new InterrogatorVishasAttackAction(interrogatorvishas);
};
SpellHandler.Apply(spell => { spell.CooldownTime = 5000; }, SpellId.ClassSkillShadowWordPainRank5);
// Bloodmage Thalnos
thalnosEntry = NPCMgr.GetEntry(NPCId.BloodmageThalnos);
thalnosEntry.AddSpell(SpellId.ClassSkillFlameShockRank3);
thalnosEntry.AddSpell(SpellId.ClassSkillShadowBoltRank5);
thalnosEntry.AddSpell(SpellId.FlameSpike_2);
thalnosEntry.AddSpell(SpellId.FireNova_4);
thalnosEntry.BrainCreator = bloodmagethalnos => new BloodmageThalnosBrain(bloodmagethalnos);
thalnosEntry.Activated += bloodmagethalnos =>
{
((BaseBrain)bloodmagethalnos.Brain).DefaultCombatAction.Strategy = new BloodmageThalnosAttackAction(bloodmagethalnos);
};
SpellHandler.Apply(spell => { spell.CooldownTime = 10000; }, SpellId.ClassSkillFlameShockRank3);
SpellHandler.Apply(spell => { spell.CooldownTime = 2000; }, SpellId.ClassSkillShadowBoltRank5);
SpellHandler.Apply(spell => { spell.CooldownTime = 8000; }, SpellId.FlameSpike_2);
SpellHandler.Apply(spell => { spell.CooldownTime = 40000; }, SpellId.FireNova_4);
// Scorn (Scourge Invasions Event)
scornEntry = NPCMgr.GetEntry(NPCId.Scorn);
scornEntry.AddSpell(SpellId.LichSlap);
scornEntry.AddSpell(SpellId.FrostboltVolley);
scornEntry.AddSpell(SpellId.ClassSkillMindFlayRank4);
scornEntry.AddSpell(SpellId.FrostNova_6);
scornEntry.BrainCreator = scorn => new ScornBrain(scorn);
SpellHandler.Apply(spell => { spell.CooldownTime = 45000; }, SpellId.LichSlap);
SpellHandler.Apply(spell => { spell.CooldownTime = 30000; }, SpellId.FrostboltVolley);
SpellHandler.Apply(spell => { spell.CooldownTime = 30000; }, SpellId.ClassSkillMindFlayRank4);
SpellHandler.Apply(spell => { spell.CooldownTime = 30000; }, SpellId.FrostNova_6);
// Library
// Houndmaster Loksey
houndmasterlokseyEntry = NPCMgr.GetEntry(NPCId.HoundmasterLoksey);
houndmasterlokseyEntry.AddSpell(SpellId.SummonScarletHound);
houndmasterlokseyEntry.AddSpell(SpellId.Bloodlust);
houndmasterlokseyEntry.BrainCreator = houndmasterloksey => new HoundmasterLokseyBrain(houndmasterloksey);
SpellHandler.Apply(spell => { spell.CooldownTime = 20000; }, SpellId.Bloodlust);
// Arcanist Doan
arcanistdoanEntry = NPCMgr.GetEntry(NPCId.ArcanistDoan);
arcanistdoanEntry.AddSpell(SpellId.SilenceRank1);
arcanistdoanEntry.AddSpell(SpellId.ArcaneExplosion_25);
arcanistdoanEntry.AddSpell(SpellId.Polymorph);
arcanistdoanEntry.BrainCreator = arcanistdoan => new ArcanistDoanBrain(arcanistdoan);
arcanistdoanEntry.Activated += arcanistdoan =>
{
((BaseBrain)arcanistdoan.Brain).DefaultCombatAction.Strategy = new ArcanistDoanAttackAction(arcanistdoan);
};
SpellHandler.Apply(spell => { spell.CooldownTime = 15000; }, SpellId.SilenceRank1);
SpellHandler.Apply(spell => { spell.CooldownTime = 3000; }, SpellId.ArcaneExplosion_25);
SpellHandler.Apply(spell => { spell.CooldownTime = 20000; }, SpellId.Polymorph);
// Armory
// Herod
herodEntry = NPCMgr.GetEntry(NPCId.Herod);
herodEntry.AddSpell(SpellId.Cleave_2);
herodEntry.BrainCreator = herod => new HerodBrain(herod);
herodEntry.Activated += herod =>
{
((BaseBrain)herod.Brain).DefaultCombatAction.Strategy = new HerodAttackAction(herod);
};
SpellHandler.Apply(spell => { spell.CooldownTime = 12000; }, SpellId.Cleave_2);
// Cathedral
// High Inquisitor Fairbanks
fairbanksEntry = NPCMgr.GetEntry(NPCId.HighInquisitorFairbanks);
fairbanksEntry.AddSpell(SpellId.CurseOfBlood);
fairbanksEntry.AddSpell(SpellId.DispelMagic);
fairbanksEntry.AddSpell(SpellId.Fear);
fairbanksEntry.AddSpell(SpellId.PowerWordShield);
fairbanksEntry.AddSpell(SpellId.Sleep);
fairbanksEntry.BrainCreator = highinquisitorfairbanks => new HighInquisitorFairbanksBrain(highinquisitorfairbanks);
fairbanksEntry.Activated += highinquisitorfairbanks =>
{
((BaseBrain)highinquisitorfairbanks.Brain).DefaultCombatAction.Strategy = new HighInquisitorFairbanksAttackAction(highinquisitorfairbanks);
};
SpellHandler.Apply(spell => { spell.CooldownTime = 10000; }, SpellId.CurseOfBlood);
SpellHandler.Apply(spell => { spell.CooldownTime = 30000; }, SpellId.DispelMagic);
SpellHandler.Apply(spell => { spell.CooldownTime = 40000; }, SpellId.Fear);
SpellHandler.Apply(spell => { spell.CooldownTime = 30000; }, SpellId.Sleep);
// Scarlet Commander Mograine
//.........這裏部分代碼省略.........