Example #1
0
            private void AddPotions()
            {
                var buyInfo = new InternalBuyInfo();

                foreach (CraftItem item in DefAlchemy.CraftSystem.CraftItems)
                {
                    var price = 0;
                    foreach (CraftRes res in item.Resources)
                    {
                        var info = buyInfo.FirstOrDefault(x => x.Type == res.ItemType);
                        if (info != null)
                        {
                            price += info.Price;
                        }
                    }
                    //Modify the price based on difficulty to craft, for scribe this ranges from  25-125 for mage scrolls
                    // gives us a price mod of 1.25-6.25
                    //so lvl 1-2-3 will lose cash then you make more and more higher you go
                    price += (int)item.Skills.GetAt(0).MaxSkill / 20;
                    price += 3; // Add 3 to the base price so now profit will be 4-10 depending on circle.
                    if (price != 0)
                    {
                        Add(item.ItemType, price);
                    }
                }
            }
Example #2
0
            public InternalSellInfo()
            {
                Add(typeof(BlackPearl), 3);
                Add(typeof(Bloodmoss), 3);
                Add(typeof(MandrakeRoot), 2);
                Add(typeof(Garlic), 2);
                Add(typeof(Ginseng), 2);
                Add(typeof(Nightshade), 2);
                Add(typeof(SpidersSilk), 2);
                Add(typeof(SulfurousAsh), 2);
                Add(typeof(RecallRune), 8);
                Add(typeof(Spellbook), 9);
                Add(typeof(BlankScroll), 3);

                /*Add( typeof( NightSightPotion ), 7 );
                *               Add( typeof( AgilityPotion ), 7 );
                *               Add( typeof( StrengthPotion ), 7 );
                *               Add( typeof( RefreshPotion ), 7 );
                *               Add( typeof( LesserCurePotion ), 7 );
                *               Add( typeof( LesserHealPotion ), 7 );*/
                AddPotions();


                Type[] types   = Loot.RegularScrollTypes;
                var    buyInfo = new InternalBuyInfo();

                for (int i = 0; i < types.Length; ++i)
                {
                    var cItem = Engines.Craft.DefInscription.CraftSystem.CraftItems.SearchFor(types[i]);
                    var price = 0;
                    foreach (CraftRes res in cItem.Resources)
                    {
                        var info = buyInfo.FirstOrDefault(x => x.Type == res.ItemType);
                        if (info != null)
                        {
                            price += info.Price;
                        }
                    }
                    //Modify the price based on difficulty to craft, for scribe this ranges from  25-125 for mage scrolls
                    // gives us a price mod of 1.25-6.25
                    //so lvl 1-2-3 will lose cash then you make more and more higher you go
                    price += (int)cItem.Skills.GetAt(0).MaxSkill / 20;
                    price += 3; // Add 3 to the base price so now profit will be 4-10 depending on circle.

                    Add(types[i], price);
                    //Add(types[i], ((i / 8) + 2) * 2);
                }
            }
Example #3
0
            public InternalSellInfo()
            {
                Add(typeof(WizardsHat), 15);
                Add(typeof(BlackPearl), 3);
                Add(typeof(Bloodmoss), 4);
                Add(typeof(MandrakeRoot), 2);
                Add(typeof(Garlic), 2);
                Add(typeof(Ginseng), 2);
                Add(typeof(Nightshade), 2);
                Add(typeof(SpidersSilk), 2);
                Add(typeof(SulfurousAsh), 2);

                if (Core.AOS)
                {
                    Add(typeof(BatWing), 1);
                    Add(typeof(DaemonBlood), 3);
                    Add(typeof(PigIron), 2);
                    Add(typeof(NoxCrystal), 3);
                    Add(typeof(GraveDust), 1);
                }

                Add(typeof(RecallRune), 13);
                Add(typeof(Spellbook), 25);
                Add(typeof(BlankScroll), 3);
                Type[] types = Loot.RegularScrollTypes;
                //For this to work, all resources required for the item must already be listed under BuyInfo we use the prices vendors sell, not the price they pay
                var buyInfo = new InternalBuyInfo();

                for (int i = 0; i < types.Length; ++i)
                {
                    var cItem = Engines.Craft.DefInscription.CraftSystem.CraftItems.SearchFor(types[i]);
                    var price = 0;
                    foreach (CraftRes res in cItem.Resources)
                    {
                        var info = buyInfo.FirstOrDefault(x => x.Type == res.ItemType);
                        if (info != null)
                        {
                            price += info.Price;
                        }
                    }
                    //Modify the price based on difficulty to craft, for scribe this ranges from  25-125 for mage scrolls
                    // gives us a price mod of 1.25-6.25
                    //so lvl 1-2-3 will lose cash then you make more and more higher you go
                    price += (int)cItem.Skills.GetAt(0).MaxSkill / 20;
                    price += 3; // Add 3 to the base price so now profit will be 4-10 depending on circle.

                    Add(types[i], price);
                    //Add(types[i], ((i / 8) + 2) * 2);
                }

                if (Core.SE)
                {
                    Add(typeof(ExorcismScroll), 3);
                    Add(typeof(AnimateDeadScroll), 8);
                    Add(typeof(BloodOathScroll), 8);
                    Add(typeof(CorpseSkinScroll), 8);
                    Add(typeof(CurseWeaponScroll), 8);
                    Add(typeof(EvilOmenScroll), 8);
                    Add(typeof(PainSpikeScroll), 8);
                    Add(typeof(SummonFamiliarScroll), 8);
                    Add(typeof(HorrificBeastScroll), 8);
                    Add(typeof(MindRotScroll), 10);
                    Add(typeof(PoisonStrikeScroll), 10);
                    Add(typeof(WraithFormScroll), 15);
                    Add(typeof(LichFormScroll), 16);
                    Add(typeof(StrangleScroll), 16);
                    Add(typeof(WitherScroll), 16);
                    Add(typeof(VampiricEmbraceScroll), 20);
                    Add(typeof(VengefulSpiritScroll), 20);
                }
            }
Example #4
0
 public SBBrewer(bool moonglow = false)
 {
     _BuyInfo  = new InternalBuyInfo(moonglow);
     _SellInfo = new InternalSellInfo();
 }