Пример #1
0
        protected override void OnAfterDeath(Container c)
        {
            base.OnAfterDeath(c);

            c.DropItem(new StygianDragonHead());

            double random = Utility.RandomDouble();

            Item artifact = null;

            if (0.025 > random)               // 2.5% of getting a unique artifact
            {
                artifact = CreateArtifact(UniqueArtifacts);
            }
            else if (0.20 > random)               // 17.5% of getting a shared artifact
            {
                artifact = CreateArtifact(SharedArtifacts);
            }

            if (artifact != null)
            {
                Mobile m = MonsterHelper.GetTopAttacker(this);

                if (m != null)
                {
                    MonsterHelper.GiveArtifactTo(m, artifact);
                }
                else
                {
                    artifact.Delete();
                }
            }
        }
Пример #2
0
        public override void OnDamage(int amount, Mobile from, bool willKill)
        {
            base.OnDamage(amount, from, willKill);

            if (DateTime.Now > m_NextAbilityTime && 0.1 > Utility.RandomDouble())
            {
                Mobile target = from;

                if (target == null)
                {
                    target = Combatant;
                }

                if (target == null)
                {
                    return;
                }

                int random = Utility.Random(10);

                switch (random)
                {
                case 0:
                case 1:
                {
                    Say(true, "*Ul Flam*");
                    MonsterHelper.StygianFireball(this, target, 0x5DE, 0x36D4, 0, 100, 0, 0, 0);
                    break;
                }

                case 2:
                {
                    RockRain(target);
                    break;
                }

                case 3:
                {
                    MonsterHelper.FireWall(this, target);
                    break;
                }

                default:
                {
                    SpellChain();
                    break;
                }
                }

                m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds(Utility.RandomMinMax(MinDelay, MaxDelay));
            }
        }
Пример #3
0
        protected override void OnAfterDeath(Container c)
        {
            base.OnAfterDeath(c);

            c.DropItem(new ClawOfSlasherOfVeils());

            // These 2 drop always
            c.DropItem(new AxesOfFury());
            c.DropItem(new StandardOfChaos());

            double random = Utility.RandomDouble();

            Item artifact = null;

            if (0.05 > random)               // 5% of getting a unique artifact
            {
                artifact = CreateArtifact(UniqueArtifacts);
            }
            else if (0.20 > random)               // 15% of getting a shared artifact
            {
                artifact = CreateArtifact(SharedArtifacts);
            }
            else if (0.50 > random)               // 30% of getting a cursed doom artifact
            {
                artifact = CreateArtifact(Engines.Doom.DoomArtifactGiver.Artifacts);

                if (artifact != null)
                {
                    artifact.LootType = LootType.Cursed;
                }
            }

            if (artifact != null)
            {
                Mobile m = MonsterHelper.GetTopAttacker(this);

                if (m != null)
                {
                    MonsterHelper.GiveArtifactTo(m, artifact);
                }
                else
                {
                    artifact.Delete();
                }
            }
        }
Пример #4
0
        public override void OnDamage(int amount, Mobile from, bool willKill)
        {
            base.OnDamage(amount, from, willKill);

            if (DateTime.Now > m_NextMeteorTime && 0.1 > Utility.RandomDouble())
            {
                Say(true, "*Des-ailem Flam*");
                MonsterHelper.CrimsonMeteor(this);

                m_NextMeteorTime = DateTime.Now + TimeSpan.FromSeconds(Utility.RandomMinMax(MinDelay, MaxDelay));
            }

            if (0.1 > Utility.RandomDouble())
            {
                Mobile target = from;

                if (target == null)
                {
                    target = Combatant;
                }

                if (target == null)
                {
                    return;
                }

                int random = Utility.Random(2);

                switch (random)
                {
                default:
                case 0:
                {
                    MonsterHelper.StygianFireball(this, target, 0, 0x46E9, 0, 50, 0, 0, 50);
                    break;
                }

                case 1:
                {
                    MonsterHelper.FireWall(this, target);
                    break;
                }
                }
            }
        }
Пример #5
0
        protected override void OnAfterDeath(Container c)
        {
            base.OnAfterDeath(c);

            double random = Utility.RandomDouble();

            Item artifact = null;

            if (0.05 > random)               // 5% of getting a unique artifact
            {
                artifact = new Subdue();
            }
            else if (0.15 > random)               // 10% of getting a shared artifact
            {
                switch (Utility.Random(2))
                {
                case 0:
                    artifact = new TheMostKnowledgePerson();
                    break;

                case 1:
                    artifact = new OblivionsNeedle();
                    break;

                case 2:
                    artifact = new RoyalGuardSurvivalKnife();
                    break;
                }
            }
            else if (0.30 > random)               // 15% of getting a decorative item
            {
                switch (Utility.Random(2))
                {
                case 0:
                    artifact = new ArtifactLargeVase();
                    break;

                case 1:
                    artifact = new ArtifactVase();
                    break;

                case 2:
                    artifact = new MonsterStatuette(MonsterStatuetteType.TormentedMinotaur);
                    break;
                }
            }

            if (artifact != null)
            {
                Mobile m = MonsterHelper.GetTopAttacker(this);

                if (m != null)
                {
                    MonsterHelper.GiveArtifactTo(m, artifact);
                }
                else
                {
                    artifact.Delete();
                }
            }
        }