예제 #1
0
        protected virtual void GenerateTreasure()
        {
            DropItem(new Gold(1500, 3000));

            Item item = null;

            for (int i = 0; i < Loot.GemTypes.Length; i++)
            {
                item = Activator.CreateInstance(Loot.GemTypes[i]) as Item;

                if (item != null)
                {
                    item.Amount = Utility.Random(1, 6);

                    DropItem(item);
                }
            }

            if (0.25 > Utility.RandomDouble())
            {
                item = new SmokeBomb(Utility.Random(3, 6));
                DropItem(item);
            }

            if (0.25 > Utility.RandomDouble())
            {
                switch (Utility.Random(2))
                {
                case 0:
                    item = new ParasiticPotion(Utility.Random(1, 3)); break;

                case 1:
                    item = new InvisibilityPotion(Utility.Random(1, 3)); break;
                }

                DropItem(item);
            }

            if (0.2 > Utility.RandomDouble())
            {
                item        = Loot.RandomEssence();
                item.Amount = Utility.Random(3, 6);
                DropItem(item);
            }

            if (0.1 > Utility.RandomDouble())
            {
                switch (Utility.Random(4))
                {
                case 0: DropItem(new Taint()); break;

                case 1: DropItem(new Corruption()); break;

                case 2: DropItem(new Blight()); break;

                case 3: DropItem(new LuminescentFungi()); break;
                }
            }
        }
 protected override void OnTick()
 {
     if (DateTime.Now >= m_Expire)
     {
         InvisibilityPotion.RemoveEffect(m_m);
         Stop();
     }
 }
예제 #3
0
        public virtual void Fill()
        {
            Reset();

            List <Item> contains = new List <Item>(Items);

            foreach (var i in contains)
            {
                i.Delete();
            }

            ColUtility.Free(contains);

            for (int i = 0; i < Utility.RandomMinMax(6, 12); i++)
            {
                DropItem(Loot.RandomGem());
            }

            DropItem(new Gold(Utility.RandomMinMax(800, 1100)));

            Item item = null;

            if (0.30 > Utility.RandomDouble())
            {
                switch (Utility.Random(7))
                {
                case 0:
                    item = new Bandage(Utility.Random(10, 30)); break;

                case 1:
                    item        = new SmokeBomb();
                    item.Amount = Utility.Random(3, 6);
                    break;

                case 2:
                    item        = new InvisibilityPotion();
                    item.Amount = Utility.Random(1, 3);
                    break;

                case 3:
                    item = new Lockpick(Utility.Random(1, 10)); break;

                case 4:
                    item = new DreadHornMane(Utility.Random(1, 2)); break;

                case 5:
                    item = new Corruption(Utility.Random(1, 2)); break;

                case 6:
                    item = new Taint(Utility.Random(1, 2)); break;
                }

                DropItem(item);
            }

            if (0.25 > Utility.RandomDouble())
            {
                DropItem(new CounterfeitPlatinum());
            }

            if (0.2 > Utility.RandomDouble())
            {
                switch (Utility.Random(3))
                {
                case 0:
                    item = new ZombiePainting(); break;

                case 1:
                    item = new SkeletonPortrait(); break;

                case 2:
                    item = new LichPainting(); break;

                case 3:
                    item = new RelicOfHydros(); break;

                case 4:
                    item = new RelicOfLithos(); break;

                case 5:
                    item = new RelicOfPyros(); break;

                case 6:
                    item = new RelicOfStratos(); break;
                }

                DropItem(item);
            }

            if (0.1 > Utility.RandomDouble())
            {
                item = Loot.RandomArmorOrShieldOrWeaponOrJewelry(LootPackEntry.IsInTokuno(this), LootPackEntry.IsMondain(this), LootPackEntry.IsStygian(this));

                if (item != null)
                {
                    TreasureMapChest.GetRandomItemStat(out int min, out int max, 1.0);

                    RunicReforging.GenerateRandomItem(item, null, Utility.RandomMinMax(min, max), 0, ReforgedPrefix.None, ReforgedSuffix.Khaldun, Map);

                    DropItem(item);
                }
            }
        }
예제 #4
0
        public BasePotion FillBottle()
        {
            BasePotion pot;

            switch (m_Type)
            {
            default:
            case PotionEffect.Nightsight: pot = new NightSightPotion(); break;

            case PotionEffect.CureLesser: pot = new LesserCurePotion(); break;

            case PotionEffect.Cure: pot = new CurePotion(); break;

            case PotionEffect.CureGreater: pot = new GreaterCurePotion(); break;

            case PotionEffect.Agility: pot = new AgilityPotion(); break;

            case PotionEffect.AgilityGreater: pot = new GreaterAgilityPotion(); break;

            case PotionEffect.Strength: pot = new StrengthPotion(); break;

            case PotionEffect.StrengthGreater: pot = new GreaterStrengthPotion(); break;

            case PotionEffect.PoisonLesser: pot = new LesserPoisonPotion(); break;

            case PotionEffect.Poison: pot = new PoisonPotion(); break;

            case PotionEffect.PoisonGreater: pot = new GreaterPoisonPotion(); break;

            case PotionEffect.PoisonDeadly: pot = new DeadlyPoisonPotion(); break;

            case PotionEffect.Refresh: pot = new RefreshPotion(); break;

            case PotionEffect.RefreshGreater: pot = new GreaterRefreshPotion(); break;

            case PotionEffect.HealLesser: pot = new LesserHealPotion(); break;

            case PotionEffect.Heal: pot = new HealPotion(); break;

            case PotionEffect.HealGreater: pot = new GreaterHealPotion(); break;

            case PotionEffect.ExplosionLesser: pot = new LesserExplosionPotion(); break;

            case PotionEffect.Explosion: pot = new ExplosionPotion(); break;

            case PotionEffect.ExplosionGreater: pot = new GreaterExplosionPotion(); break;

            case PotionEffect.Conflagration: pot = new ConflagrationPotion(); break;

            case PotionEffect.ConflagrationGreater: pot = new GreaterConflagrationPotion(); break;

            case PotionEffect.MaskOfDeath: pot = new MaskOfDeathPotion(); break;

            case PotionEffect.MaskOfDeathGreater: pot = new GreaterMaskOfDeathPotion(); break;

            case PotionEffect.ConfusionBlast: pot = new ConfusionBlastPotion(); break;

            case PotionEffect.ConfusionBlastGreater: pot = new GreaterConfusionBlastPotion(); break;

            case PotionEffect.Invisibility: pot = new InvisibilityPotion(); break;

            case PotionEffect.ParasiticPoison: pot = new ParasiticPotion(); break;

            case PotionEffect.DarkglowPoison: pot = new DarkglowPotion(); break;
            }

            return(pot);
        }