public override bool IsEnemy(Mobile m)
        {
            BaseEquipableLight lightsource = m.FindItemOnLayer(Layer.TwoHanded) as BaseEquipableLight;

            if (lightsource != null && lightsource.Burning)
            {
                return(false);
            }

            return(base.IsEnemy(m));
        }
예제 #2
0
        public override void Damage(Mobile m)
        {
            base.Damage(m);

            if (m.Alive)
            {
                BaseEquipableLight lightsource = m.FindItemOnLayer(Layer.TwoHanded) as BaseEquipableLight;

                if (lightsource != null && lightsource.Burning)
                {
                    // Wind
                    if (Utility.RandomDouble() < 0.09)
                    {
                        m.PlaySound(Utility.RandomList(0x014, 0x15, 0x016, 0x5C7));
                        AOS.Damage(m, 0, 0, 0, 0, 0, 0);
                    }
                }
                else
                {
                    // Wind
                    if (Utility.RandomDouble() < 0.09)
                    {
                        m.PlaySound(Utility.RandomList(0x014, 0x15, 0x016, 0x5C7));
                        AOS.Damage(m, 0, 0, 0, 0, 0, 0);
                    }

                    // Anchimayen Ambush 1
                    if (Utility.RandomDouble() < 0.00002)
                    {
                        if (m.Map == Map.Malas)
                        {
                            int x1 = m.X + 10;
                            int y1 = m.Y + 10;
                            int z1 = Map.Malas.GetAverageZ(x1, y1);

                            if (Map.Malas.CanSpawnMobile(x1, y1, z1))
                            {
                                BaseCreature ghoul = new Anchimayen();
                                ghoul.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas);
                                ghoul.PlaySound(1534);

                                AOS.Damage(m, 0, 0, 0, 0, 0, 0);
                                Timer.DelayCall(TimeSpan.FromMinutes(3.0), new TimerStateCallback(DeleteGhoul), ghoul);
                            }
                        }
                    }

                    // Anchimayen Ambush 2
                    if (Utility.RandomDouble() < 0.00002)
                    {
                        if (m.Map == Map.Malas)
                        {
                            int x2 = m.X - 10;
                            int y2 = m.Y - 10;
                            int z2 = Map.Malas.GetAverageZ(x2, y2);

                            if (Map.Malas.CanSpawnMobile(x2, y2, z2))
                            {
                                BaseCreature ghoul = new Anchimayen();
                                ghoul.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas);
                                ghoul.PlaySound(1534);

                                AOS.Damage(m, 0, 0, 0, 0, 0, 0);
                                Timer.DelayCall(TimeSpan.FromMinutes(3.0), new TimerStateCallback(DeleteGhoul), ghoul);
                            }
                        }
                    }

                    // Gualichu Ambush 1
                    if (Utility.RandomDouble() < 0.00002)
                    {
                        if (m.Map == Map.Malas)
                        {
                            int x1 = m.X + 8;
                            int y1 = m.Y + 8;
                            int z1 = Map.Malas.GetAverageZ(x1, y1);

                            if (Map.Malas.CanSpawnMobile(x1, y1, z1))
                            {
                                BaseCreature skeleton = new Gualichu();
                                skeleton.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas);
                                skeleton.PlaySound(0x48D);

                                AOS.Damage(m, 0, 0, 0, 0, 0, 0);
                                Timer.DelayCall(TimeSpan.FromMinutes(3.0), new TimerStateCallback(DeleteSkeleton), skeleton);
                            }
                        }
                    }

                    // Gualichu Ambush 2
                    if (Utility.RandomDouble() < 0.00002)
                    {
                        if (m.Map == Map.Malas)
                        {
                            int x2 = m.X - 8;
                            int y2 = m.Y - 8;
                            int z2 = Map.Malas.GetAverageZ(x2, y2);

                            if (Map.Malas.CanSpawnMobile(x2, y2, z2))
                            {
                                BaseCreature skeleton = new Gualichu();
                                skeleton.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas);
                                skeleton.PlaySound(0x48D);

                                AOS.Damage(m, 0, 0, 0, 0, 0, 0);
                                Timer.DelayCall(TimeSpan.FromMinutes(3.0), new TimerStateCallback(DeleteSkeleton), skeleton);
                            }
                        }
                    }

                    // Wekufe Ambush 1
                    if (Utility.RandomDouble() < 0.00002)
                    {
                        if (m.Map == Map.Malas)
                        {
                            int x1 = m.X + 20;
                            int y1 = m.Y + 20;
                            int z1 = Map.Malas.GetAverageZ(x1, y1);

                            if (Map.Malas.CanSpawnMobile(x1, y1, z1))
                            {
                                BaseCreature wraith = new Wekufe();
                                wraith.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas);
                                wraith.PlaySound(748);

                                AOS.Damage(m, 0, 0, 0, 0, 0, 0);
                                Timer.DelayCall(TimeSpan.FromMinutes(3.0), new TimerStateCallback(DeleteWraith), wraith);
                            }
                        }
                    }

                    // Wekufe Ambush 2
                    if (Utility.RandomDouble() < 0.00002)
                    {
                        if (m.Map == Map.Malas)
                        {
                            int x2 = m.X - 20;
                            int y2 = m.Y - 20;
                            int z2 = Map.Malas.GetAverageZ(x2, y2);

                            if (Map.Malas.CanSpawnMobile(x2, y2, z2))
                            {
                                BaseCreature wraith = new Wekufe();
                                wraith.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas);
                                wraith.PlaySound(748);

                                AOS.Damage(m, 0, 0, 0, 0, 0, 0);
                                Timer.DelayCall(TimeSpan.FromMinutes(3.0), new TimerStateCallback(DeleteWraith), wraith);
                            }
                        }
                    }

                    // Umkhovu Ambush 1
                    if (Utility.RandomDouble() < 0.00002)
                    {
                        if (m.Map == Map.Malas)
                        {
                            int x1 = m.X + 12;
                            int y1 = m.Y + 12;
                            int z1 = Map.Malas.GetAverageZ(x1, y1);

                            if (Map.Malas.CanSpawnMobile(x1, y1, z1))
                            {
                                BaseCreature zombie = new Umkhovu();
                                zombie.MoveToWorld(new Point3D(x1, y1, z1), Map.Malas);
                                zombie.PlaySound(471);

                                AOS.Damage(m, 0, 0, 0, 0, 0, 0);
                                Timer.DelayCall(TimeSpan.FromMinutes(3.0), new TimerStateCallback(DeleteZombie), zombie);
                            }
                        }
                    }

                    // Umkhovu Ambush 2
                    if (Utility.RandomDouble() < 0.00002)
                    {
                        if (m.Map == Map.Malas)
                        {
                            int x2 = m.X - 12;
                            int y2 = m.Y - 12;
                            int z2 = Map.Malas.GetAverageZ(x2, y2);

                            if (Map.Malas.CanSpawnMobile(x2, y2, z2))
                            {
                                BaseCreature zombie = new Umkhovu();
                                zombie.MoveToWorld(new Point3D(x2, y2, z2), Map.Malas);
                                zombie.PlaySound(471);

                                AOS.Damage(m, 0, 0, 0, 0, 0, 0);
                                Timer.DelayCall(TimeSpan.FromMinutes(3.0), new TimerStateCallback(DeleteZombie), zombie);
                            }
                        }
                    }
                }
            }
        }