コード例 #1
0
 public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
 {
     if (npc.type == NPCID.UndeadMiner)
     {
         npcLoot.Add(ItemDropRule.Common(ModContent.ItemType <MinersBackpack>(), 5));
     }
 }
コード例 #2
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.Present, 1, 1, 5));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ModContent.ItemType <IceQueensCrown>(), 5));
        }
コード例 #3
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            string patreonDescription = $"[i:{ModContent.ItemType<Gittle.RoombaPet>()}]Patreon Drop";

            void AddPatreonDrop(Func <bool> condition, int item, int chanceDenominator = 1, string extra = default)
コード例 #4
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.DesertFossil, 3, 1, 10));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.FlyingCarpet, 100));
        }
コード例 #5
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.GoodieBag, 1, 1, 5));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.BloodyMachete, 10));
        }
コード例 #6
0
        //Mimics ItemDropRule.ExpertGetsRerolls but with custom % instead of #rerolls
        //Wrapper for other rules ontop
        internal static void NPCExpertGetsRerolls(NPCLoot npcLoot, int itemId, int chanceDenominator = 1, int minimumDropped = 1, int maximumDropped = 1, int chanceNumerator = 1, IItemDropRule ruleExpert = null, IItemDropRule ruleNormal = null, float rerollChance = 0.5f)
        {
            //Since the conditions are exclusive, only one of them will show up
            IItemDropRule expertRule = new LeadingConditionRule(new Conditions.IsExpert());
            IItemDropRule ruleToAdd  = expertRule;

            if (ruleExpert != null)
            {
                ruleToAdd  = ruleExpert;                //If a rule is specified, use that to add it (Always add the "baseline" rule first)
                expertRule = ruleToAdd.OnSuccess(expertRule);
            }
            expertRule.OnSuccess(new CommonDropWithReroll(itemId, chanceDenominator, minimumDropped, maximumDropped, chanceNumerator, rerollChance));
            npcLoot.Add(ruleToAdd);

            //Vanilla example
            //Conditions.IsPumpkinMoon condition2 = new Conditions.IsPumpkinMoon();
            //Conditions.FromCertainWaveAndAbove condition3 = new Conditions.FromCertainWaveAndAbove(15);

            //LeadingConditionRule entry = new LeadingConditionRule(condition2);
            //LeadingConditionRule ruleToChain = new LeadingConditionRule(condition3);
            //npcLoot.Add(entry).OnSuccess(ruleToChain).OnSuccess(ItemDropRule.Common(1856));

            IItemDropRule notExpertRule = new LeadingConditionRule(new Conditions.NotExpert());

            ruleToAdd = notExpertRule;
            if (ruleNormal != null)
            {
                ruleToAdd     = ruleNormal;
                notExpertRule = ruleToAdd.OnSuccess(notExpertRule);
            }
            notExpertRule.OnSuccess(new CommonDrop(itemId, chanceDenominator, minimumDropped, maximumDropped, chanceNumerator));
            npcLoot.Add(ruleToAdd);
        }
コード例 #7
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.Starfish, 10, 1, 3));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.Seashell, 10, 1, 3));
        }
コード例 #8
0
 public override void ModifyNPCLoot(NPCLoot npcLoot)
 {
     npcLoot.Add(ItemDropRule.Common(ModContent.ItemType <elsasHeart>(), 1, 2, 5));
     npcLoot.Add(ItemDropRule.Common(ModContent.ItemType <Items.Weapons.Keyblade_ice>()));
     npcLoot.Add(ItemDropRule.Common(ModContent.ItemType <Items.Materials.frostCrystal>(), 1, 1, 15));
     npcLoot.Add(ItemDropRule.Common(ModContent.ItemType <Items.Materials.frostStone>(), 1, 15, 50));
 }
コード例 #9
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.FrogLeg, 10));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.BalloonPufferfish, 10));
        }
コード例 #10
0
 public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
 {
     if (npc.type == NPCID.Mothron)
     {
         npcLoot.Add(ItemDropRule.Common(ItemType <Items.BrokenStaff>(), 4));
     }
 }
コード例 #11
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            switch (npc.type)
            {
            case NPCID.Medusa:
                npcLoot.RemoveWhere(rule => rule is CommonDrop drop && drop.itemId == ItemID.MedusaHead && FargoSoulsUtil.LockEarlyBirdDrop(npcLoot, rule));
                break;

            case NPCID.WyvernHead:
                npcLoot.RemoveWhere(rule => rule is DropBasedOnExpertMode drop && drop.ruleForNormalMode is CommonDrop drop2 && drop2.itemId == ItemID.SoulofFlight && FargoSoulsUtil.LockEarlyBirdDrop(npcLoot, rule));
                break;

            case NPCID.PigronHallow:
            case NPCID.PigronCorruption:
            case NPCID.PigronCrimson:
                npcLoot.RemoveWhere(rule => rule is ItemDropWithConditionRule drop && drop.condition is Conditions.DontStarveIsUp && drop.itemId == ItemID.HamBat && FargoSoulsUtil.LockEarlyBirdDrop(npcLoot, rule));
                npcLoot.RemoveWhere(rule => rule is ItemDropWithConditionRule drop && drop.condition is Conditions.DontStarveIsNotUp && drop.itemId == ItemID.HamBat && FargoSoulsUtil.LockEarlyBirdDrop(npcLoot, rule));
                break;

            case NPCID.RedDevil:
                npcLoot.RemoveWhere(rule => rule is CommonDrop drop && drop.itemId == ItemID.UnholyTrident && FargoSoulsUtil.LockEarlyBirdDrop(npcLoot, rule));
                FargoSoulsUtil.AddEarlyBirdDrop(npcLoot, ItemDropRule.Common(ItemID.DemonScythe, 3));
                break;

            case NPCID.IchorSticker:
                npcLoot.RemoveWhere(rule => rule is CommonDrop drop && drop.itemId == ItemID.Ichor && FargoSoulsUtil.LockEarlyBirdDrop(npcLoot, rule));
                FargoSoulsUtil.AddEarlyBirdDrop(npcLoot, ItemDropRule.OneFromOptions(1, ItemID.TheUndertaker, ItemID.TheRottedFork, ItemID.CrimsonRod, ItemID.CrimsonHeart, ItemID.PanicNecklace));
                break;

            case NPCID.SeekerHead:
                npcLoot.RemoveWhere(rule => rule is CommonDrop drop && drop.itemId == ItemID.CursedFlame && FargoSoulsUtil.LockEarlyBirdDrop(npcLoot, rule));
                FargoSoulsUtil.AddEarlyBirdDrop(npcLoot, ItemDropRule.OneFromOptions(1, ItemID.BallOHurt, ItemID.BandofStarpower, ItemID.Musket, ItemID.ShadowOrb, ItemID.Vilethorn));
                break;

            case NPCID.Mimic:
                npcLoot.RemoveWhere(rule => rule is OneFromOptionsDropRule drop && drop.dropIds.Contains(ItemID.DualHook) && FargoSoulsUtil.LockEarlyBirdDrop(npcLoot, rule));
                FargoSoulsUtil.AddEarlyBirdDrop(npcLoot, ItemDropRule.OneFromOptions(1, ItemID.TitanGlove, ItemID.PhilosophersStone, ItemID.CrossNecklace, ItemID.DualHook));
                break;

            case NPCID.IceMimic:
                npcLoot.RemoveWhere(rule => rule is CommonDrop drop && drop.itemId == ItemID.ToySled && FargoSoulsUtil.LockEarlyBirdDrop(npcLoot, rule));
                FargoSoulsUtil.AddEarlyBirdDrop(npcLoot, ItemDropRule.OneFromOptions(1, ItemID.TitanGlove, ItemID.PhilosophersStone, ItemID.CrossNecklace, ItemID.DualHook));
                break;

            case NPCID.AngryNimbus:
                npcLoot.RemoveWhere(rule => rule is CommonDrop drop && drop.itemId == ItemID.NimbusRod && FargoSoulsUtil.LockEarlyBirdDrop(npcLoot, rule));
                FargoSoulsUtil.AddEarlyBirdDrop(npcLoot, ItemDropRule.Common(ItemID.FloatingIslandFishingCrate));
                break;

            case NPCID.DuneSplicerHead:
                FargoSoulsUtil.AddEarlyBirdDrop(npcLoot, ItemDropRule.Common(ItemID.SandstorminaBottle, 3));
                FargoSoulsUtil.AddEarlyBirdDrop(npcLoot, ItemDropRule.Common(ItemID.OasisCrate));
                break;

            default: break;
            }
        }
コード例 #12
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.ByCondition(new Conditions.IsHardmode(), ItemID.FloatingIslandFishingCrateHard));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ModContent.ItemType <WyvernFeather>(), 5));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.CloudinaBottle, 20));
        }
コード例 #13
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.FrozenCrateHard));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ModContent.ItemType <Items.Accessories.Masomode.FrigidGemstone>(), 5));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.BlizzardinaBottle, 20));
        }
コード例 #14
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.GlowingMushroom, 1, 1, 5));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.MushroomGrassSeeds, 5));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.TruffleWorm, 20));
        }
コード例 #15
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ModContent.ItemType <Items.Accessories.Masomode.SecurityWallet>(), 5));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.CoinGun, 50));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.LuckyCoin, 50));
        }
コード例 #16
0
        public static void EModeDrop(NPCLoot npcLoot, IItemDropRule rule)
        {
            EModeDropCondition dropCondition   = new EModeDropCondition();
            IItemDropRule      conditionalRule = new LeadingConditionRule(dropCondition);

            conditionalRule.OnSuccess(rule);
            npcLoot.Add(conditionalRule);
        }
コード例 #17
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.GoodieBag, 1, 1, 5));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.BladedGlove, 10));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ModContent.ItemType <PumpkingsCape>(), 5));
        }
コード例 #18
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ModContent.ItemType <Items.Accessories.Masomode.SandsofTime>(), 5));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.OasisCrateHard));
            FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.SandstorminaBottle, 20));
        }
コード例 #19
0
 public override void ModifyNPCLoot(NPCLoot npcLoot)
 {
     //TODO, this use to reference an item called CrystalCharm, was it suppose to be CrystiliumHelmet? Also, old commented out code had GEM but didn't have PrismaticBoomstick or "CrystalCharm"/CrystiliumHelmet
     int[] lootTable = { ItemType <Items.Accessories.CrystalMonocle>(), ItemType <Items.Weapons.PrismBlade>(),     ItemType <Items.Weapons.Gemshot>(),
                         ItemType <Items.Weapons.Crystishae>(),         ItemType <Items.Weapons.QuartzBlade>(),    ItemType <Items.Weapons.DiamondSceptor>(),
                         ItemType <Items.Weapons.ManaDrainer>(),        ItemType <Items.Armor.CrystiliumHelmet>(), ItemType <Items.Weapons.PrismaticBoomstick>() };
     npcLoot.Add(new OneFromOptionsDropRule(lootTable.Length, 1, lootTable));
 }
コード例 #20
0
        public override void ModifyNPCLoot(NPCLoot npcLoot)
        {
            int[] dropOptions = new int[] { ModContent.ItemType <Items.Weapons.Keyblade_Kingdom>(), ModContent.ItemType <Items.Armor.orgCoat>(), ModContent.ItemType <Items.seasaltIcecream>() };
            npcLoot.Add(ItemDropRule.OneFromOptions(3, dropOptions));


            npcLoot.Add(ItemDropRule.Common(ModContent.ItemType <Items.Materials.twilightGem>(), 1, 15, 35));
        }
コード例 #21
0
        public override void ModifyNPCLoot(NPCLoot npcLoot)
        {
            int[] dropOptions = new int[] { ModContent.ItemType <Items.Weapons.Keyblade_Lionheart>(), ModContent.ItemType <Items.Weapons.Org13.Xigbar.sharpshooter>(), ModContent.ItemType <Items.Armor.orgCoat>(), ModContent.ItemType <Items.glide>() };
            npcLoot.Add(ItemDropRule.OneFromOptions(1, dropOptions));


            npcLoot.Add(ItemDropRule.Common(ModContent.ItemType <xigbarSpawner>()));
            npcLoot.Add(ItemDropRule.Common(ModContent.ItemType <Items.Materials.twilightShard>(), 1, 5, 15));
        }
コード例 #22
0
        public static bool LockEarlyBirdDrop(NPCLoot npcLoot, IItemDropRule rule)
        {
            EModeEarlyBirdLockDropCondition lockCondition = new EModeEarlyBirdLockDropCondition();
            IItemDropRule conditionalRule = new LeadingConditionRule(lockCondition);

            conditionalRule.OnSuccess(rule);
            npcLoot.Add(conditionalRule);
            return(true);
        }
コード例 #23
0
        public override void ModifyNPCLoot(NPCLoot npcLoot)
        {
            int[] dropOptions = new int[] { ModContent.ItemType <Items.Weapons.Keyblade_FinalXion>(), ModContent.ItemType <Items.Armor.orgCoat>(), ModContent.ItemType <Items.seasaltIcecream>() };
            npcLoot.Add(ItemDropRule.OneFromOptions(3, dropOptions));

            npcLoot.Add(ItemDropRule.Common(ModContent.ItemType <Items.Materials.twilightCrystal>(), 1, 50, 137));

            npcLoot.Add(ItemDropRule.Common(ItemID.BlueSolution, 1, 10, 15));
        }
コード例 #24
0
        public override void ModifyNPCLoot(NPCLoot npcLoot)
        {
            npcLoot.Add(ItemDropRule.Common(ModContent.ItemType <Items.Materials.blazingShard>(), 5, 1, 6));

            if (Main.player[NPC.target].Center.Y > Main.UnderworldLayer)
            {
                npcLoot.Add(ItemDropRule.Common(ItemID.Hellstone, 1, 1, 5));
            }
        }
コード例 #25
0
        public override void ModifyNPCLoot(NPCLoot npcLoot)
        {
            int[] dropOptions = new int[] { ModContent.ItemType <Items.Weapons.Keyblade_flameFrolic>(), ModContent.ItemType <Items.Weapons.Org13.Axel.Chacrams_EternalFlames>(), ModContent.ItemType <Items.Armor.orgCoat>(), ModContent.ItemType <Items.seasaltIcecream>() };
            npcLoot.Add(ItemDropRule.OneFromOptions(1, dropOptions));


            npcLoot.Add(ItemDropRule.Common(ModContent.ItemType <AxelSpawner>()));
            npcLoot.Add(ItemDropRule.Common(ModContent.ItemType <Items.Materials.blazingShard>(), 1, 5, 15));
        }
コード例 #26
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            if (npc.type == NPCID.BlackRecluse || npc.type == NPCID.BlackRecluseWall)
            {
                FargoSoulsUtil.EModeDrop(npcLoot, ItemDropRule.Common(ItemID.SpiderEgg, 50));
            }
        }
コード例 #27
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            foreach (EModeNPCBehaviour behaviour in EModeNpcBehaviours)
            {
                behaviour.ModifyNPCLoot(npc, npcLoot);
            }
        }
コード例 #28
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            LeadingConditionRule emodeRule = new LeadingConditionRule(new EModeDropCondition());

            emodeRule.OnSuccess(FargoSoulsUtil.BossBagDropCustom(ModContent.ItemType <NecromanticBrew>()));
            emodeRule.OnSuccess(FargoSoulsUtil.BossBagDropCustom(ItemID.DungeonFishingCrate, 5));
            npcLoot.Add(emodeRule);
        }
コード例 #29
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            LeadingConditionRule emodeRule = new LeadingConditionRule(new EModeDropCondition());

            emodeRule.OnSuccess(FargoSoulsUtil.BossBagDropCustom(ModContent.ItemType <GalacticGlobe>()));
            emodeRule.OnSuccess(FargoSoulsUtil.BossBagDropCustom(ItemID.LunarOre, 150));
            npcLoot.Add(emodeRule);
        }
コード例 #30
0
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            base.ModifyNPCLoot(npc, npcLoot);

            LeadingConditionRule emodeRule = new LeadingConditionRule(new EModeDropCondition());

            emodeRule.OnSuccess(FargoSoulsUtil.BossBagDropCustom(ModContent.ItemType <PrecisionSeal>()));
            emodeRule.OnSuccess(FargoSoulsUtil.BossBagDropCustom(ItemID.HallowedFishingCrateHard, 5));
            npcLoot.Add(emodeRule);
        }