Bonaccorso
Member
How are spells chosen, which can be used by the caster mobiles, like HireMage or Orcish Mage, for example?
[Constructable]
public OrcishMage()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
#region References
using Server.Items;
using Server.SkillHandlers;
using Server.Spells;
using Server.Spells.Eighth;
using Server.Spells.Fifth;
using Server.Spells.First;
using Server.Spells.Fourth;
using Server.Spells.Mysticism;
using Server.Spells.Necromancy;
using Server.Spells.Second;
using Server.Spells.Seventh;
using Server.Spells.Sixth;
using Server.Spells.SkillMasteries;
using Server.Spells.Spellweaving;
using Server.Spells.Third;
using Server.Targeting;
using System;
#endregion
namespace Server.Mobiles
{
public class MageAI : BaseAI
{
public virtual SkillName CastSkill => SkillName.Magery;
public virtual bool UsesMagery => true;
Thank you! Seems to be what I was looking for.If I understand it correctly: The critter will have an AI type (Artificial intelligence)
MageAI.cs
Orc Mage:[Constructable] public OrcishMage() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4) {
And that AI type gives you the list of what spells and the such it can cast.
MageAI.cs
Mage AI:#region References using Server.Items; using Server.SkillHandlers; using Server.Spells; using Server.Spells.Eighth; using Server.Spells.Fifth; using Server.Spells.First; using Server.Spells.Fourth; using Server.Spells.Mysticism; using Server.Spells.Necromancy; using Server.Spells.Second; using Server.Spells.Seventh; using Server.Spells.Sixth; using Server.Spells.SkillMasteries; using Server.Spells.Spellweaving; using Server.Spells.Third; using Server.Targeting; using System; #endregion namespace Server.Mobiles { public class MageAI : BaseAI { public virtual SkillName CastSkill => SkillName.Magery; public virtual bool UsesMagery => true;
We use essential cookies to make this site work, and optional cookies to enhance your experience.