context: using System;
  using Server.Engines.CannedEvil;
  using Server.Items;
  using Server.Spells.Fifth;
  using Server.Spells.Seventh;
  
  namespace Server.Mobiles
  {
      public class Barracoon : BaseChampion
      {
          [Constructable]
          public Barracoon()
              : base(AIType.AI_Melee)
          {
              this.Name = "Barracoon";
              this.Title = "the piper";
              this.Body = 0x190;
              this.Hue = 0x83EC;
  
              this.SetStr(283, 425);
              this.SetDex(72, 150);
              this.SetInt(505, 750);
  
              this.SetHits(12000);
              this.SetStam(102, 300);
              this.SetMana(505, 750);
  
              this.SetDamage(29, 38);
  
              this.SetDamageType(ResistanceType.Physical, 100);
  
              this.SetResistance(ResistanceType.Physical, 65, 75);
              this.SetResistance(ResistanceType.Fire, 70, 80);
              this.SetResistance(ResistanceType.Cold, 65, 80);
              this.SetResistance(ResistanceType.Poison, 70, 75);
              this.SetResistance(ResistanceType.Energy, 70, 80);
  
              this.SetSkill(SkillName.MagicResist, 100.0);
              this.SetSkill(SkillName.Tactics, 118.3, 120.2);
              this.SetSkill(SkillName.Wrestling, 118.4, 122.7);
  
              this.Fame = 22500;
              this.Karma = -22500;
  
              this.VirtualArmor = 70;
  
              this.AddItem(new FancyShirt(Utility.RandomGreenHue()));
              this.AddItem(new LongPants(Utility.RandomYellowHue()));
              this.AddItem(new JesterHat(Utility.RandomPinkHue()));
              this.AddItem(new Cloak(Utility.RandomPinkHue()));
              this.AddItem(new Sandals());
  
              this.HairItemID = 0x203B; // Short Hair
              this.HairHue = 0x94;
  
              this.m_SpecialSlayerMechanics = true;
          }
  
          public Barracoon(Serial serial)
              : base(serial)
          {
          }
  
          public override ChampionSkullType SkullType
          {
              get
              {
                  return ChampionSkullType.Greed;
              }
          }
          public override Type[] UniqueList
          {
              get
              {
                  return new Type[] { typeof(FangOfRactus) };
              }
          }
          public override Type[] SharedList
          {
              get
              {
                  return new Type[]
                  {
                      typeof(EmbroideredOakLeafCloak),
                      typeof(DjinnisRing),
                      typeof(DetectiveBoots),
                      typeof(GauntletsOfAnger)
                  };
              }
          }
          public override Type[] DecorativeList
          {
              get
              {
                  return new Type[] { typeof(SwampTile), typeof(MonsterStatuette) };
              }
          }
          public override MonsterStatuetteType[] StatueTypes
          {
              get
              {
                  return new MonsterStatuetteType[] { MonsterStatuetteType.Slime };
              }
          }
          public override bool AlwaysMurderer
          {
              get
              {
                  return true;
              }
          }
          public override bool AutoDispel
          {
              get
              {
                  return true;
              }
          }
          public override double AutoDispelChance
          {
              get
              {
                  return 1.0;
              }
          }
          public override bool BardImmune
          {
              get
              {
                  return !Core.SE;
              }
          }
          public override bool Unprovokable
          {
              get
              {
                  return Core.SE;
              }
          }
          public override bool Uncalmable
          {
              get
              {
                  return Core.SE;
              }
          }
          public override Poison PoisonImmune
          {
              get
              {
                  return Poison.Deadly;
              }
          }
          public override bool ShowFameTitle
          {
              get
              {
                  return false;
              }
          }
          public override bool ClickTitle
          {
              get
              {
                  return false;
              }
          }
          public override void GenerateLoot()
          {
              this.AddLoot(LootPack.UltraRich, 3);
          }
  
          public void Polymorph(Mobile m)
          {
              if (!m.CanBeginAction(typeof(PolymorphSpell)) || !m.CanBeginAction(typeof(IncognitoSpell)) || m.IsBodyMod)
                  return;
  
              IMount mount = m.Mount;
  
              if (mount != null)
                  mount.Rider = null;
  
              if (m.Mounted)
                  return;
  
              if (m.BeginAction(typeof(PolymorphSpell)))
              {
                  m.BodyMod = 42;
                  m.HueMod = 0;
                  if (m == this) { 
                      m_SlayerVulnerabilities.Add("Vermin");
                      m_SlayerVulnerabilities.Add("Repond");
                  }
     
                  new ExpirePolymorphTimer(m).Start();
              }
          }
  
          public void SpawnRatmen(Mobile target)
          {
              Map map = this.Map;
  
              if (map == null)
                  return;
  
              int rats = 0;
  
              foreach (Mobile m in this.GetMobilesInRange(10))
              {
                  if (m is Ratman || m is RatmanArcher || m is RatmanMage)
                      ++rats;
              }
  
              if (rats < 16)
              {
                  this.PlaySound(0x3D);
  
                  int newRats = Utility.RandomMinMax(3, 6);
  
                  for (int i = 0; i < newRats; ++i)
                  {
                      BaseCreature rat;
  
                      switch ( Utility.Random(5) )
                      {
                          default:
                          case 0:
                          case 1:
                              rat = new Ratman();
                              break;
                          case 2:
                          case 3:
                              rat = new RatmanArcher();
                              break;
                          case 4:
  
gt:                             rat = new RatmanMage();