예제 #1
0
        public Sacrifice()
        {
            // F**k me, this is a long list of configs.
            BaseDropChance = Config.Wrap(
                "Chances",
                "BaseDropChance",
                "The base percent chance of an item dropping.",
                1.0f);
            PlayerScaling = Config.Wrap(
                "Chances",
                "PlayerScaling",
                "The multiplier applied to the base drop chance per player. 0 to disable.",
                0.3f);
            ReverseScaling = Config.Wrap(
                "Chances",
                "ReverseScaling",
                "Scale back drop chances. Note that reverse scaling can quickly backfire. You should find yourself adjusting ReverseScalingRate a lot.",
                false);
            ReverseScalingRate = Config.Wrap(
                "Chances",
                "ReverseScalingRate",
                "Rate at which to scale back drop chances in relation to time played.",
                0.1f);
            eliteDropWeights = new DropWeights(
                Config.Wrap(
                    "Chances.Elite",
                    "Lunar",
                    "The weight of a lunar item dropping (in comparison to other item catagories) on elite kills.",
                    0.05f
                    ),
                Config.Wrap(
                    "Chances.Elite",
                    "Tier1",
                    "The weight of a white item dropping (in comparison to other item catagories) on elite kills.",
                    0.0f
                    ),
                Config.Wrap(
                    "Chances.Elite",
                    "Tier2",
                    "The weight of a green item dropping (in comparison to other item catagories) on elite kills.",
                    0.3f
                    ),
                Config.Wrap(
                    "Chances.Elite",
                    "Tier3",
                    "The weight of a red item dropping (in comparison to other item catagories) on elite kills.",
                    0.1f
                    ),
                Config.Wrap(
                    "Chances.Elite",
                    "Equipment",
                    "The weight of an equipment item dropping (in comparison to other item catagories) on elite kills.",
                    0.0f
                    )
                );
            bossDropWeights = new DropWeights(
                Config.Wrap(
                    "Chances.Boss",
                    "Lunar",
                    "The weight of a lunar item dropping (in comparison to other item catagories) on boss kills.",
                    0.0f
                    ),
                Config.Wrap(
                    "Chances.Boss",
                    "Tier1",
                    "The weight of a white item dropping (in comparison to other item catagories) on boss kills.",
                    0.05f
                    ),
                Config.Wrap(
                    "Chances.Boss",
                    "Tier2",
                    "The weight of a green item dropping (in comparison to other item catagories) on boss kills.",
                    0.6f
                    ),
                Config.Wrap(
                    "Chances.Boss",
                    "Tier3",
                    "The weight of a red item dropping (in comparison to other item catagories) on boss kills.",
                    0.3f
                    ),
                Config.Wrap(
                    "Chances.Boss",
                    "Equipment",
                    "The weight of an equipment item dropping (in comparison to other item catagories) on boss kills.",
                    0.0f
                    )
                );
            normalDropWeights = new DropWeights(
                Config.Wrap(
                    "Chances.Normal",
                    "Lunar",
                    "The weight of a lunar item dropping (in comparison to other item catagories) on kills.",
                    0.0f
                    ),
                Config.Wrap(
                    "Chances.Normal",
                    "Tier1",
                    "The weight of a white item dropping (in comparison to other item catagories) on kills.",
                    0.8f
                    ),
                Config.Wrap(
                    "Chances.Normal",
                    "Tier2",
                    "The weight of a green item dropping (in comparison to other item catagories) on kills.",
                    0.2f
                    ),
                Config.Wrap(
                    "Chances.Normal",
                    "Tier3",
                    "The weight of a red item dropping (in comparison to other item catagories) on kills.",
                    0.01f
                    ),
                Config.Wrap(
                    "Chances.Normal",
                    "Equipment",
                    "The weight of an equipment item dropping (in comparison to other item catagories) on kills.",
                    0.05f
                    )
                );
            CloverRerollDrops = Config.Wrap(
                "Other",
                "CloversRerollDrops",
                "Can clovers reroll the chance of an item dropping.",
                true);
            InteractableSpawnMultiplier = Config.Wrap(
                "Interactables",
                "InteractableSpawnMultiplier",
                "A multiplier on the amount of interactables that will spawn in a level.",
                1.0f);
            InteractableCostMultiplier = Config.Wrap(
                "Interactables",
                "InteractableCostMultiplier",
                "A multiplier applied to the cost of all interactables.",
                1.0f);
            ConfigWrapper <float> Chest1 = Config.Wrap(
                "Interactables.Chances",
                "Chest",
                "The multiplier for this item to spawn.",
                0.0f);
            ConfigWrapper <float> Chest2 = Config.Wrap(
                "Interactables.Chances",
                "Chest2",
                "The multiplier for this item to spawn.",
                0.0f);
            ConfigWrapper <float> CategoryChestDamage = Config.Wrap(
                "Interactables.Chances",
                "CategoryChestDamage",
                "The multiplier for this item to spawn.",
                0.0f);
            ConfigWrapper <float> CategoryChestHealing = Config.Wrap(
                "Interactables.Chances",
                "CategoryChestHealing",
                "The multiplier for this item to spawn.",
                0.0f);
            ConfigWrapper <float> CategoryChestUtility = Config.Wrap(
                "Interactables.Chances",
                "CategoryChestUtility",
                "The multiplier for this item to spawn.",
                0.0f);
            ConfigWrapper <float> EquipmentBarrel = Config.Wrap(
                "Interactables.Chances",
                "EquipmentBarrel",
                "The multiplier for this item to spawn.",
                0.0f);
            ConfigWrapper <float> TripleShop = Config.Wrap(
                "Interactables.Chances",
                "TripleShop",
                "The multiplier for this item to spawn.",
                0.0f);
            ConfigWrapper <float> TripleShopLarge = Config.Wrap(
                "Interactables.Chances",
                "TripleShopLarge",
                "The multiplier for this item to spawn.",
                0.0f);
            ConfigWrapper <float> GoldChest = Config.Wrap(
                "Interactables.Chances",
                "GoldChest",
                "The multiplier for this item to spawn.",
                0.0f);
            ConfigWrapper <float> LunarChest = Config.Wrap(
                "Interactables.Chances",
                "LunarChest",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> Barrel1 = Config.Wrap(
                "Interactables.Chances",
                "Barrel1",
                "The multiplier for this item to spawn.",
                0.5f);
            ConfigWrapper <float> ShrineHealing = Config.Wrap(
                "Interactables.Chances",
                "ShrineHealing",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> ShrineBlood = Config.Wrap(
                "Interactables.Chances",
                "ShrineBlood",
                "The multiplier for this item to spawn.",
                0.0f);
            ConfigWrapper <float> ShrineBoss = Config.Wrap(
                "Interactables.Chances",
                "ShrineBoss",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> ShrineChance = Config.Wrap(
                "Interactables.Chances",
                "ShrineChance",
                "The multiplier for this item to spawn.",
                0.0f);
            ConfigWrapper <float> ShrineCombat = Config.Wrap(
                "Interactables.Chances",
                "ShrineCombat",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> ShrineRestack = Config.Wrap(
                "Interactables.Chances",
                "ShrineRestack",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> Drone1Broken = Config.Wrap(
                "Interactables.Chances",
                "BrokenDrone1",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> Drone2Broken = Config.Wrap(
                "Interactables.Chances",
                "BrokenDrone2",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> MegaDroneBroken = Config.Wrap(
                "Interactables.Chances",
                "BrokenMegaDrone",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> MissileDroneBroken = Config.Wrap(
                "Interactables.Chances",
                "BrokenMissileDrone",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> EquipmentDroneBroken = Config.Wrap(
                "Interactables.Chances",
                "EquipmentDroneBroken",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> FlameDroneBroken = Config.Wrap(
                "Interactables.Chances",
                "FlameDroneBroken",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> Turret1Broken = Config.Wrap(
                "Interactables.Chances",
                "BrokenTurret1",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> Chest1Stealthed = Config.Wrap(
                "Interactables.Chances",
                "Chest1Stealthed",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> RadarTower = Config.Wrap(
                "Interactables.Chances",
                "RadarTower",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> ShrineGoldshoresAccess = Config.Wrap(
                "Interactables.Chances",
                "ShrineGoldshoresAccess",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> Duplicator = Config.Wrap(
                "Interactables.Chances",
                "Duplicator",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> DuplicatorLarge = Config.Wrap(
                "Interactables.Chances",
                "DuplicatorLarge",
                "The multiplier for this item to spawn.",
                1.0f);
            ConfigWrapper <float> DuplicatorMilitary = Config.Wrap(
                "Interactables.Chances",
                "DuplicatorMilitary",
                "The multiplier for this item to spawn.",
                1.0f);

            baseDropChance              = BaseDropChance.Value;
            playerScaling               = PlayerScaling.Value;
            reverseScaling              = ReverseScaling.Value;
            reverseScalingRate          = ReverseScalingRate.Value;
            cloverRerollDrops           = CloverRerollDrops.Value;
            interactableSpawnMultiplier = InteractableSpawnMultiplier.Value;
            interactableCostMultiplier  = InteractableCostMultiplier.Value;
            interactables               = new List <InteractableConfig>
            {
                new InteractableConfig("Chest1", Chest1.Value),
                new InteractableConfig("Chest2", Chest2.Value),
                new InteractableConfig("GoldChest", GoldChest.Value),
                new InteractableConfig("LunarChest", LunarChest.Value),
                new InteractableConfig("Barrel1", Barrel1.Value),
                new InteractableConfig("EquipmentBarrel", EquipmentBarrel.Value),
                new InteractableConfig("Duplicator", Duplicator.Value),
                new InteractableConfig("DuplicatorLarge", DuplicatorLarge.Value),
                new InteractableConfig("DuplicatorMilitary", DuplicatorMilitary.Value),
                new InteractableConfig("ShrineGoldshoresAccess", ShrineGoldshoresAccess.Value),
                new InteractableConfig("RadarTower", RadarTower.Value),
                new InteractableConfig("Chest1Stealthed", Chest1Stealthed.Value),
                new InteractableConfig("Drone1Broken", Drone1Broken.Value),
                new InteractableConfig("Drone2Broken", Drone2Broken.Value),
                new InteractableConfig("MegaDroneBroken", MegaDroneBroken.Value),
                new InteractableConfig("MissileDroneBroken", MissileDroneBroken.Value),
                new InteractableConfig("EquipmentDroneBroken", EquipmentDroneBroken.Value),
                new InteractableConfig("FlameDroneBroken", FlameDroneBroken.Value),
                new InteractableConfig("Turret1Broken", Turret1Broken.Value),
                new InteractableConfig("ShrineBlood", ShrineBlood.Value),
                new InteractableConfig("ShrineBoss", ShrineBoss.Value),
                new InteractableConfig("ShrineCombat", ShrineCombat.Value),
                new InteractableConfig("ShrineChance", ShrineChance.Value),
                new InteractableConfig("ShrineRestack", ShrineRestack.Value),
                new InteractableConfig("ShrineHealing", ShrineHealing.Value),
                new InteractableConfig("TripleShop", TripleShop.Value),
                new InteractableConfig("TripleShopLarge", TripleShopLarge.Value),
                new InteractableConfig("CategoryChestDamage", CategoryChestDamage.Value),
                new InteractableConfig("CategoryChestHealing", CategoryChestHealing.Value),
                new InteractableConfig("CategoryChestUtility", CategoryChestUtility.Value),
            };
            interactablesCategories = new string[]
            {
                "Chests",
                "Barrels",
                "Shrines",
                "Drones",
                "Misc",
                "Rare",
                "Duplicator"
            };
        }
예제 #2
0
 private static void AddDropWeights(WeightedSelection <List <PickupIndex> > weightedSelection, DropWeights dropWeights)
 {
     weightedSelection.AddChoice(Run.instance.availableLunarDropList, dropWeights.LunarDropWeight);
     weightedSelection.AddChoice(Run.instance.availableTier1DropList, dropWeights.Tier1DropWeight);
     weightedSelection.AddChoice(Run.instance.availableTier2DropList, dropWeights.Tier2DropWeight);
     weightedSelection.AddChoice(Run.instance.availableTier3DropList, dropWeights.Tier3DropWeight);
     weightedSelection.AddChoice(Run.instance.availableEquipmentDropList, dropWeights.EquipmentDropWeight);
 }