/// <summary>
 /// Remove a reward from this quest
 /// </summary>
 /// <param name="Reward">Reward which should be removed</param>
 public void RemoveReward(BaseReward Reward)
 {
     if (Rewards.Contains(Reward))
     {
         Rewards.Remove(Reward);
     }
 }
예제 #2
0
파일: Rewards.cs 프로젝트: pallop/Servuo
        public EodonianRewardBag()
        {
            Hue = BaseReward.RewardBagHue();

            switch (Utility.Random(4))
            {
            default:
            case 0: DropItem(new MonsterStatuette(MonsterStatuetteType.SakkhranBirdOfPrey)); break;

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

            case 2: DropItem(new RecipeScroll(1000)); break;

            case 3:
                if (0.5 > Utility.RandomDouble())
                {
                    DropItem(new RawMoonstoneLargeAddonDeed());
                }
                else
                {
                    DropItem(new RawMoonstoneSmallAddonDeed());
                }
                break;
            }
        }
예제 #3
0
 public MinersQuestSatchel()
     : base(0xE75)
 {
     Hue    = BaseReward.SatchelHue();
     Layer  = Layer.Backpack;
     Weight = 3.0;
     AddItem(new Pickaxe());
     AddItem(new Pickaxe());
 }
예제 #4
0
 public LumberjacksSatchel()
     : base(0xE75)
 {
     Hue    = BaseReward.SatchelHue();
     Layer  = Layer.Backpack;
     Weight = 3.0;
     AddItem(new Gold(15));
     AddItem(new Hatchet());
 }
예제 #5
0
 public FletchersSatchel()
     : base(0xE75)
 {
     Hue    = BaseReward.SatchelHue();
     Layer  = Layer.Backpack;
     Weight = 3.0;
     AddItem(new Feather(10));
     AddItem(new FletcherTools());
 }
예제 #6
0
 public SmithsSatchel()
     : base(0xE75)
 {
     Hue    = BaseReward.SatchelHue();
     Layer  = Layer.Backpack;
     Weight = 3.0;
     DropItem(new IronIngot(10));
     DropItem(new SmithHammer());
 }
예제 #7
0
 public CarpentersSatchel()
     : base(0xE75)
 {
     Hue    = BaseReward.SatchelHue();
     Layer  = Layer.Backpack;
     Weight = 3.0;
     AddItem(new Board(10));
     AddItem(new DovetailSaw());
 }
예제 #8
0
 public ChefsSatchel()
     : base(0xE75)
 {
     Hue    = BaseReward.SatchelHue();
     Layer  = Layer.Backpack;
     Weight = 3.0;
     AddItem(new SackFlour());
     AddItem(new Skillet());
 }
예제 #9
0
 public AlchemistsSatchel()
     : base(0xE75)
 {
     Hue    = BaseReward.SatchelHue();
     Layer  = Layer.Backpack;
     Weight = 3.0;
     AddItem(new Bloodmoss(10));
     AddItem(new MortarPestle());
 }
예제 #10
0
        public BaseRewardBackpack()
            : base()
        {
            Hue = 1127;

            DropItem(new Gold(Level * 2000));
            DropItem(new TerMurQuestRewardBook());

            int itemDrop;

            switch (Level)
            {
            case 3: itemDrop = 5; break;

            default: itemDrop = 3; break;
            }

            for (int i = 0; i < itemDrop; i++)
            {
                Item item = Loot.RandomArmorOrShieldOrWeaponOrJewelry(false, false, true);

                if (item != null)
                {
                    BaseReward.ApplyMods(item);
                    DropItem(item);
                }
            }

            itemDrop = Utility.RandomMinMax(2, 3);

            for (int i = 0; i < itemDrop; i++)
            {
                if (Level == 1)
                {
                    DropItemStacked(Loot.RandomGem());
                }
                else
                {
                    DropItemStacked(Loot.RandomRareGem());
                }
            }

            switch (Level)
            {
            case 1: DropItem(new MagicalResidue(20)); break;

            case 2: DropItem(new EnchantedEssence(10)); break;

            case 3: DropItem(new RelicFragment()); break;
            }
        }
예제 #11
0
파일: Rewards.cs 프로젝트: pallop/Servuo
        public MyrmidexRewardBag()
        {
            Hue = BaseReward.RewardBagHue();

            switch (Utility.Random(4))
            {
            default:
            case 0: DropItem(new RecipeScroll(Utility.RandomMinMax(900, 905))); break;

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

            case 2: DropItem(new RecipeScroll(455)); break;

            case 3: DropItem(new MoonstoneCrystal()); break;
            }
        }
예제 #12
0
        public TinkersSatchel()
            : base(0xE75)
        {
            Hue    = BaseReward.SatchelHue();
            Layer  = Layer.Backpack;
            Weight = 3.0;
            AddItem(new TinkerTools());

            switch (Utility.Random(5))
            {
            case 0: AddItem(new Springs(3)); break;

            case 1: AddItem(new Axle(3)); break;

            case 2: AddItem(new Hinge(3)); break;

            case 3: AddItem(new Key()); break;

            case 4: AddItem(new Scissors()); break;
            }
        }
예제 #13
0
        //public string OwnerQuest;

        public BCMQuestReward(BaseReward reward)
        {
            Type  = reward.GetType().ToString();
            Id    = reward.ID;
            Value = reward.Value;
        }
예제 #14
0
        public static void Fill(LockableContainer cont, int level)
        {
            cont.Movable = false;
            cont.Locked  = true;
            int numberItems;

            if (level == 0)
            {
                cont.LockLevel = 0;                 // Can't be unlocked

                cont.DropItem(new Gold(Utility.RandomMinMax(50, 100)));

                if (Utility.RandomDouble() < 0.75)
                {
                    cont.DropItem(new TreasureMap(0, Map.Trammel));
                }
            }
            else
            {
                cont.TrapType  = TrapType.ExplosionTrap;
                cont.TrapPower = level * 25;
                cont.TrapLevel = level;

                switch (level)
                {
                case 1: cont.RequiredSkill = 36; break;

                case 2: cont.RequiredSkill = 76; break;

                case 3: cont.RequiredSkill = 84; break;

                case 4: cont.RequiredSkill = 92; break;

                case 5: cont.RequiredSkill = 100; break;

                case 6: cont.RequiredSkill = 100; break;
                }

                cont.LockLevel    = cont.RequiredSkill - 10;
                cont.MaxLockLevel = cont.RequiredSkill + 40;

                //Publish 67 gold change
                //if ( Core.SA )
                //	cont.DropItem( new Gold( level * 5000 ) );
                //else
                cont.DropItem(new Gold(level * 1000));

                for (int i = 0; i < level * 5; ++i)
                {
                    cont.DropItem(Loot.RandomScroll(0, 63, SpellbookType.Regular));
                }

                if (Core.SE)
                {
                    switch (level)
                    {
                    case 1: numberItems = 5; break;

                    case 2: numberItems = 10; break;

                    case 3: numberItems = 15; break;

                    case 4: numberItems = 38; break;

                    case 5: numberItems = 50; break;

                    case 6: numberItems = 60; break;

                    default: numberItems = 0; break;
                    }
                    ;
                }
                else
                {
                    numberItems = level * 6;
                }

                for (int i = 0; i < numberItems; ++i)
                {
                    Item item;

                    if (Core.AOS)
                    {
                        item = Loot.RandomArmorOrShieldOrWeaponOrJewelry();
                    }
                    else
                    {
                        item = Loot.RandomArmorOrShieldOrWeapon();
                    }

                    if (item is BaseWeapon)
                    {
                        BaseWeapon weapon = (BaseWeapon)item;

                        if (Core.AOS)
                        {
                            int attributeCount;
                            int min, max;

                            GetRandomAOSStats(out attributeCount, out min, out max);

                            BaseRunicTool.ApplyAttributesTo(weapon, attributeCount, min, max);
                        }
                        else
                        {
                            weapon.DamageLevel     = (WeaponDamageLevel)Utility.Random(6);
                            weapon.AccuracyLevel   = (WeaponAccuracyLevel)Utility.Random(6);
                            weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(6);
                        }

                        item.ItemValue = GearScore.GetItemValue(item);
                        cont.DropItem(item);
                    }
                    else if (item is BaseArmor)
                    {
                        BaseArmor armor = (BaseArmor)item;

                        if (Core.AOS)
                        {
                            int attributeCount;
                            int min, max;

                            GetRandomAOSStats(out attributeCount, out min, out max);

                            BaseRunicTool.ApplyAttributesTo(armor, attributeCount, min, max);
                        }
                        else
                        {
                            armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random(6);
                            armor.Durability      = (ArmorDurabilityLevel)Utility.Random(6);
                        }

                        item.ItemValue = GearScore.GetItemValue(item);
                        cont.DropItem(item);
                    }
                    else if (item is BaseHat)
                    {
                        BaseHat hat = (BaseHat)item;

                        if (Core.AOS)
                        {
                            int attributeCount;
                            int min, max;

                            GetRandomAOSStats(out attributeCount, out min, out max);

                            BaseRunicTool.ApplyAttributesTo(hat, attributeCount, min, max);
                        }

                        item.ItemValue = GearScore.GetItemValue(item);
                        cont.DropItem(item);
                    }
                    else if (item is BaseJewel)
                    {
                        int attributeCount;
                        int min, max;

                        GetRandomAOSStats(out attributeCount, out min, out max);

                        BaseRunicTool.ApplyAttributesTo((BaseJewel)item, attributeCount, min, max);

                        item.ItemValue = GearScore.GetItemValue(item);
                        cont.DropItem(item);
                    }
                }
            }

            int reagents;

            if (level == 0)
            {
                reagents = 12;
            }
            else
            {
                reagents = level * 3;
            }

            for (int i = 0; i < reagents; i++)
            {
                Item item = Loot.RandomPossibleReagent();
                item.Amount = Utility.RandomMinMax(40, 60);
                cont.DropItem(item);
            }

            int gems;

            if (level == 0)
            {
                gems = 2;
            }
            else
            {
                gems = level * 3;
            }

            for (int i = 0; i < gems; i++)
            {
                Item item = Loot.RandomGem();
                cont.DropItem(item);
            }

            int bonus = level * 2;

            if (level > 0 && Utility.Random(100) < 15 + bonus)
            {
                switch (Utility.Random(6))
                {
                case 1: cont.DropItem(BaseReward.FletcherRecipe()); break;

                case 2: cont.DropItem(BaseReward.TailorRecipe()); break;

                case 3: cont.DropItem(BaseReward.SmithRecipe()); break;

                case 4: cont.DropItem(BaseReward.TinkerRecipe()); break;

                case 5: cont.DropItem(BaseReward.CarpRecipe()); break;

                case 6: cont.DropItem(new RecipeScroll(Utility.RandomMinMax(10001, 10001))); break;
                }
            }

            if (level == 6 && Core.AOS)
            {
                cont.DropItem((Item)Activator.CreateInstance(m_Artifacts[Utility.Random(m_Artifacts.Length)]));
            }
        }
 /// <summary>
 /// Add a reward to this quest
 /// </summary>
 /// <param name="Reward">Reward which shuld be added</param>
 public void AddReward(BaseReward Reward)
 {
     Reward.ParentQuest = this;
     Rewards.Add(Reward);
 }
예제 #16
0
            //public string OwnerQuest;

            public BCMReward(BaseReward reward)
            {
                Id    = reward.ID;
                Value = reward.Value;
            }