public Guard(GuardType type, AIType ai) : base(ai, FightMode.Closest, 20, 1, 0.2, 0.4) { m_Type = type; if (m_Type == GuardType.Wizard) { ChangeAIType(AIType.AI_Mage); } if (m_Type == GuardType.Archer) { ChangeAIType(AIType.AI_Archer); } if (m_Type == GuardType.Medic) { ChangeAIType(AIType.AI_Healer); } Title = GetTitle(type); Hue = Utility.RandomSkinHue(); Karma = 12000; if (0.50 >= Utility.RandomDouble()) { Name = NameList.RandomName("female") + ","; Female = true; Body = 0x191; } else { Name = NameList.RandomName("male") + ","; Body = 0x190; FacialHairItemID = Utility.RandomList(0x203E, 0x203F, 0x2040, 0x2041, 0x204B, 0x204C, 0x204D); } SetStatsAndSkills(type); SetDamage(7, 13); SetDamageType(ResistanceType.Physical, 100); SetResistance(ResistanceType.Physical, 55, 65); SetResistance(ResistanceType.Fire, 40, 50); SetResistance(ResistanceType.Cold, 30, 45); SetResistance(ResistanceType.Poison, 40, 50); SetResistance(ResistanceType.Energy, 50, 60); HairItemID = Utility.RandomList(0x203B, 0x203C, 0x203D, 0x2048); HairHue = FacialHairHue = Utility.RandomHairHue(); Backpack pack = new Backpack(); pack.AddItem(new Bandage(Utility.RandomMinMax(100, 200))); this.AddItem(pack); AddEquipment(type); if (type == GuardType.Cavalry) { Horse horse = new Horse(); horse.Body = 0xE4; horse.Controlled = true; horse.ControlMaster = this; horse.ControlOrder = OrderType.Come; horse.RawName = "Caballo del Guardia"; horse.Hue = 1410; horse.ItemID = 16033; horse.Rider = this; horse.RawStr += Utility.RandomMinMax(45, 60); horse.RawDex += Utility.RandomMinMax(25, 30); horse.RawInt += Utility.RandomMinMax(15, 20); horse.SetSkill(SkillName.Wrestling, horse.Skills.Wrestling.Value + Utility.RandomMinMax(15, 20)); horse.SetSkill(SkillName.Tactics, horse.Skills.Tactics.Value + Utility.RandomMinMax(20, 25)); horse.SetSkill(SkillName.MagicResist, horse.Skills.MagicResist.Value + Utility.RandomMinMax(30, 40)); } }
public Guard(GuardType type, AIType ai) : base(ai, FightMode.Closest, 20, 1, 0.2, 0.4) { m_Type = type; if (m_Type == GuardType.Wizard) ChangeAIType(AIType.AI_Mage); if (m_Type == GuardType.Archer) ChangeAIType(AIType.AI_Archer); if (m_Type == GuardType.Medic) ChangeAIType(AIType.AI_Healer); Title = GetTitle(type); Hue = Utility.RandomSkinHue(); Karma = 12000; if (0.50 >= Utility.RandomDouble()) { Name = NameList.RandomName("female") + ","; Female = true; Body = 0x191; } else { Name = NameList.RandomName("male") + ","; Body = 0x190; FacialHairItemID = Utility.RandomList(0x203E, 0x203F, 0x2040, 0x2041, 0x204B, 0x204C, 0x204D); } SetStatsAndSkills(type); SetDamage(7, 13); SetDamageType(ResistanceType.Physical, 100); SetResistance(ResistanceType.Physical, 55, 65); SetResistance(ResistanceType.Fire, 40, 50); SetResistance(ResistanceType.Cold, 30, 45); SetResistance(ResistanceType.Poison, 40, 50); SetResistance(ResistanceType.Energy, 50, 60); HairItemID = Utility.RandomList(0x203B, 0x203C, 0x203D, 0x2048); HairHue = FacialHairHue = Utility.RandomHairHue(); Backpack pack = new Backpack(); pack.AddItem(new Bandage(Utility.RandomMinMax(100, 200))); this.AddItem(pack); AddEquipment(type); if (type == GuardType.Cavalry) { Horse horse = new Horse(); horse.Body = 0xE4; horse.Controlled = true; horse.ControlMaster = this; horse.ControlOrder = OrderType.Come; horse.RawName = "an Imperial War Horse"; horse.Hue = 1410; horse.ItemID = 16033; horse.Rider = this; horse.RawStr += Utility.RandomMinMax(45, 60); horse.RawDex += Utility.RandomMinMax(25, 30); horse.RawInt += Utility.RandomMinMax(15, 20); horse.SetSkill(SkillName.Wrestling, horse.Skills.Wrestling.Value + Utility.RandomMinMax(15, 20)); horse.SetSkill(SkillName.Tactics, horse.Skills.Tactics.Value + Utility.RandomMinMax(20, 25)); horse.SetSkill(SkillName.MagicResist, horse.Skills.MagicResist.Value + Utility.RandomMinMax(30, 40)); } }