Пример #1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            switch (version)
            {
            case 1:
                m_HasDone2ndSpawn = reader.ReadBool();
                goto case 0;

            case 0:
                m_Altar = reader.ReadItem() as CorgulAltar;

                int cnt = reader.ReadInt();
                for (int i = 0; i < cnt; i++)
                {
                    BaseCreature bc = reader.ReadMobile() as BaseCreature;
                    if (bc != null)
                    {
                        m_Helpers.Add(bc);
                    }
                }
                break;
            }

            m_NextDismount = DateTime.UtcNow;
            m_NextArea     = DateTime.UtcNow;
        }
Пример #2
0
 public CorgulWarpRegion(CorgulAltar ped, Rectangle2D rec)
     : base("Corgul Warp Region", ped.Map, Region.DefaultPriority, new Rectangle2D[] { rec })
 {
     m_Pedestal = ped;
     m_Bounds   = rec;
     //MarkBounds(rec);
 }
Пример #3
0
 public CorgulRegion(Rectangle2D rec, CorgulAltar altar)
     : base("Corgul Boss Region", altar.Map, Region.DefaultPriority, new Rectangle2D[] { rec })
 {
     //MarkBounds(rec);
     m_Altar  = altar;
     m_Bounds = rec;
 }
Пример #4
0
        public void RemovePlayers(bool message)
        {
            List <Mobile> list = GetMobiles();

            foreach (Mobile m in list)
            {
                if (message && m is PlayerMobile)
                {
                    m.SendMessage("You have failed to meet the deadline.");
                }

                if (BaseBoat.FindBoatAt(m, m.Map) != null)
                {
                    continue;
                }

                if (m is PlayerMobile || (m is BaseCreature && ((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned))
                {
                    Point3D go = CorgulAltar.GetRandomPoint(CorgulAltar.LandKickLocation, this.Map);
                    BaseCreature.TeleportPets(m, go, this.Map);
                    m.MoveToWorld(go, this.Map);
                }
            }

            foreach (BaseBoat b in this.GetEnumeratedMultis().OfType <BaseBoat>())
            {
                if (b != null)
                {
                    RemoveBoat(b);
                }
            }
        }
Пример #5
0
        public CorgulTheSoulBinder(CorgulAltar altar)
            : base(null, AIType.AI_NecroMage, FightMode.Closest)
        {
            m_Altar     = altar;
            Name        = "Corgul the Soulbinder";
            BaseSoundID = 609;
            Body        = 0x4C;
            Hue         = 2076;

            m_NextDismount    = DateTime.UtcNow;
            m_NextArea        = DateTime.UtcNow;
            m_HasDone2ndSpawn = false;

            SetStr(800, 900);
            SetDex(121, 165);
            SetInt(300, 400);

            SetMana(4500);
            SetHits(65000);

            SetDamage(19, 24);

            SetDamageType(ResistanceType.Physical, 10);
            SetDamageType(ResistanceType.Fire, 10);
            SetDamageType(ResistanceType.Cold, 30);
            SetDamageType(ResistanceType.Poison, 40);
            SetDamageType(ResistanceType.Energy, 10);

            SetResistance(ResistanceType.Physical, 50, 60);
            SetResistance(ResistanceType.Fire, 80, 90);
            SetResistance(ResistanceType.Cold, 85, 95);
            SetResistance(ResistanceType.Poison, 80, 90);
            SetResistance(ResistanceType.Energy, 80, 90);

            SetSkill(SkillName.Wrestling, 110.0, 120.0);
            SetSkill(SkillName.Tactics, 110.0, 120.0);
            SetSkill(SkillName.Magery, 110.9, 120.0);
            SetSkill(SkillName.EvalInt, 110.9, 120.0);
            SetSkill(SkillName.Meditation, 110.9, 120.0);
            SetSkill(SkillName.Necromancy, 110.9, 120.0);
            SetSkill(SkillName.SpiritSpeak, 110.9, 120.0);

            Fame  = 25000;
            Karma = -25000;

            m_NextReturn = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(120, 180));

            if (IsSoulboundEnemies)
            {
                IsSoulbound = true;
            }
        }
Пример #6
0
        public static void OnLogin(LoginEventArgs e)
        {
            Mobile from = e.Mobile;

            Region reg = Region.Find(from.Location, from.Map);

            if (reg is CorgulRegion)
            {
                CorgulAltar altar = ((CorgulRegion)reg).Altar;

                if (altar != null && !altar.Activated)
                {
                    Point3D pnt = CorgulAltar.GetRandomPoint(CorgulAltar.LandKickLocation, from.Map);

                    BaseCreature.TeleportPets(from, pnt, from.Map);
                    from.MoveToWorld(pnt, from.Map);
                }
            }
        }
Пример #7
0
        public CorgulTheSoulBinder(CorgulAltar altar) : base(null, AIType.AI_Mage, FightMode.Closest)
        {
            //NoGoodies = true;
            m_Altar     = altar;
            Name        = "Corgul the Soulbinder";
            BaseSoundID = 609;
            Body        = 0x4C;
            Hue         = 2076;

            m_NextDismount    = DateTime.UtcNow;
            m_NextArea        = DateTime.UtcNow;
            m_HasDone2ndSpawn = false;

            SetStr(800, 900);
            SetDex(121, 165);
            SetInt(300, 400);

            SetMana(4500);
            SetHits(65000);

            SetDamage(19, 24);

            SetDamageType(ResistanceType.Physical, 10);
            SetDamageType(ResistanceType.Fire, 10);
            SetDamageType(ResistanceType.Cold, 30);
            SetDamageType(ResistanceType.Poison, 40);
            SetDamageType(ResistanceType.Energy, 10);

            SetResistance(ResistanceType.Physical, 50, 60);
            SetResistance(ResistanceType.Fire, 80, 90);
            SetResistance(ResistanceType.Cold, 85, 95);
            SetResistance(ResistanceType.Poison, 80, 90);
            SetResistance(ResistanceType.Energy, 80, 90);

            SetSkill(SkillName.Wrestling, 110.0, 120.0);
            SetSkill(SkillName.Tactics, 110.0, 120.0);
            SetSkill(SkillName.Magery, 110.9, 120.0);
            SetSkill(SkillName.EvalInt, 110.9, 120.0);
            SetSkill(SkillName.Meditation, 110.9, 120.0);

            Fame  = 25000;
            Karma = -25000;
        }
Пример #8
0
        public void RemoveBoat(BaseBoat boat)
        {
            if (boat == null)
            {
                return;
            }

            //First, we'll try and put the boat in the cooresponding location where it warped in
            if (boat.Map != null && boat.Map != Map.Internal && m_Altar != null && m_Altar.WarpRegion != null)
            {
                Map         map = boat.Map;
                Rectangle2D rec = m_Altar.WarpRegion.Bounds;

                int x = boat.X - m_Bounds.X;
                int y = boat.Y - m_Bounds.Y;
                int z = map.GetAverageZ(x, y);

                Point3D ePnt = new Point3D(rec.X + x, rec.Y + y, -5);

                int offsetX = ePnt.X - boat.X;
                int offsetY = ePnt.Y - boat.Y;
                int offsetZ = map.GetAverageZ(ePnt.X, ePnt.Y) - boat.Z;

                if (boat.CanFit(ePnt, this.Map, boat.ItemID))
                {
                    boat.Teleport(offsetX, offsetY, offsetZ);

                    //int z = this.Map.GetAverageZ(boat.X, boat.Y);
                    if (boat.Z != -5)
                    {
                        boat.Z = -5;
                    }

                    if (boat.TillerMan != null)
                    {
                        boat.TillerManSay(501425); //Ar, turbulent water!
                    }
                    return;
                }
            }

            //Plan B, lets kick to some random location who-knows-where
            for (int i = 0; i < 25; i++)
            {
                Rectangle2D rec  = CorgulAltar.BoatKickLocation;
                Point3D     ePnt = CorgulAltar.GetRandomPoint(rec, Map);

                int offsetX = ePnt.X - boat.X;
                int offsetY = ePnt.Y - boat.Y;
                int offsetZ = ePnt.Z - boat.Z;

                if (boat.CanFit(ePnt, this.Map, boat.ItemID))
                {
                    boat.Teleport(offsetX, offsetY, -5);
                    boat.SendMessageToAllOnBoard("A rough patch of sea has disoriented the crew!");

                    //int z = this.Map.GetAverageZ(boat.X, boat.Y);
                    if (boat.Z != -5)
                    {
                        boat.Z = -5;
                    }

                    if (boat.TillerMan != null)
                    {
                        boat.TillerManSay(501425); //Ar, turbulent water!
                    }
                    break;
                }
            }
        }
Пример #9
0
 public CorgulWarpRegion(CorgulAltar ped, Rectangle2D rec)
     : base("Corgul Warp Region", ped.Map, DefaultPriority, rec)
 {
     m_Bounds = rec;
 }