示例#1
0
 public static IItemDropRule NormalvsExpertOneFromOptions(
     int dropsOutOfXNormalMode,
     int dropsOutOfXExpertMode,
     params int[] options)
 {
     return((IItemDropRule) new DropBasedOnExpertMode(ItemDropRule.OneFromOptions(dropsOutOfXNormalMode, options), ItemDropRule.OneFromOptions(dropsOutOfXExpertMode, options)));
 }
        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;
            }
        }
示例#3
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));
        }
示例#4
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));
        }
示例#5
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));
        }
示例#6
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));
        }
示例#7
0
        public override void ModifyNPCLoot(NPCLoot npcLoot)
        {
            //Bestiary
            int[] possibleItems = new int[] { ModContent.ItemType <Items.Materials.blazingShard>(), ModContent.ItemType <Items.Materials.betwixtShard>(), ModContent.ItemType <Items.Materials.frostShard>(), ModContent.ItemType <Items.Materials.frostShard>(), ModContent.ItemType <Items.Materials.lucidShard>(), ModContent.ItemType <Items.Materials.mythrilShard>(), ModContent.ItemType <Items.Materials.pulsingShard>(), ModContent.ItemType <Items.Materials.lightningShard>(), ModContent.ItemType <Items.Materials.twilightShard>() };

            npcLoot.Add(ItemDropRule.OneFromOptions(1, possibleItems));

            possibleItems = new int[] { ItemID.CopperOre, ItemID.SilverOre, ItemID.GoldOre, ItemID.LeadOre, ItemID.IronOre, ItemID.TinOre };

            npcLoot.Add(ItemDropRule.OneFromOptions(1, possibleItems));
        }
        public override void ModifyNPCLoot(NPCLoot npcLoot)
        {
            npcLoot.Add(ItemDropRule.BossBag(ModContent.ItemType <TrojanSquirrelBag>()));
            npcLoot.Add(ItemDropRule.Common(ModContent.ItemType <TrojanSquirrelTrophy>(), 10));

            LeadingConditionRule rule = new LeadingConditionRule(new Conditions.NotExpert());

            rule.OnSuccess(ItemDropRule.OneFromOptions(1, ModContent.ItemType <TreeSword>(), ModContent.ItemType <MountedAcornGun>(), ModContent.ItemType <SnowballStaff>(), ModContent.ItemType <KamikazeSquirrelStaff>()));
            rule.OnSuccess(ItemDropRule.Common(ItemID.WoodenCrate, 1, 1, 5));
            rule.OnSuccess(ItemDropRule.Common(ItemID.HerbBag, 1, 1, 5));
            rule.OnSuccess(ItemDropRule.Common(ItemID.Acorn, 1, 100, 100));
            rule.OnSuccess(ItemDropRule.Common(ModContent.Find <ModItem>("Fargowiltas", "LumberJaxe").Type, 10));
            npcLoot.Add(rule);
        }
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            IItemDropRule BossDrop(int item)
            {
                return(new DropBasedOnEMode(ItemDropRule.Common(item, 3), ItemDropRule.Common(item, 10)));
            }

            switch (npc.type)
            {
            case NPCID.KingSlime:
                npcLoot.Add(BossDrop(ModContent.ItemType <SlimeKingsSlasher>()));
                break;

            case NPCID.EyeofCthulhu:
                npcLoot.Add(BossDrop(ModContent.ItemType <LeashOfCthulhu>()));
                break;

            case NPCID.EaterofWorldsHead:
            case NPCID.EaterofWorldsBody:
            case NPCID.EaterofWorldsTail:
            {
                LeadingConditionRule lastEater = new LeadingConditionRule(new Conditions.LegacyHack_IsABoss());
                lastEater.OnSuccess(BossDrop(ModContent.ItemType <EaterStaff>()));
                npcLoot.Add(lastEater);
            }
            break;

            case NPCID.BrainofCthulhu:
                npcLoot.Add(BossDrop(ModContent.ItemType <BrainStaff>()));
                break;

            case NPCID.QueenBee:
                npcLoot.Add(BossDrop(ModContent.ItemType <TheSmallSting>()));
                break;

            case NPCID.SkeletronHead:
                npcLoot.Add(BossDrop(ModContent.ItemType <BoneZone>()));
                //npcLoot.Add(BossDrop(ModContent.ItemType<BrittleBone>(), 200));
                break;

            case NPCID.WallofFlesh:
                npcLoot.Add(BossDrop(ModContent.ItemType <FleshHand>()));
                break;

            case NPCID.TheDestroyer:
                npcLoot.Add(BossDrop(ModContent.ItemType <DestroyerGun>()));
                break;

            case NPCID.SkeletronPrime:
                npcLoot.Add(BossDrop(ModContent.ItemType <RefractorBlaster>()));
                break;

            case NPCID.Retinazer:
            case NPCID.Spazmatism:
            {
                LeadingConditionRule noTwin = new LeadingConditionRule(new Conditions.MissingTwin());
                noTwin.OnSuccess(BossDrop(ModContent.ItemType <TwinRangs>()));
                npcLoot.Add(noTwin);
            }
            break;

            case NPCID.Plantera:
                npcLoot.Add(BossDrop(ModContent.ItemType <Dicer>()));
                break;

            case NPCID.Golem:
                npcLoot.Add(BossDrop(ModContent.ItemType <RockSlide>()));
                break;

            case NPCID.DukeFishron:
                npcLoot.Add(BossDrop(ModContent.ItemType <FishStick>()));
                break;

            case NPCID.DD2Betsy:
                npcLoot.Add(BossDrop(ModContent.ItemType <DragonBreath>()));
                break;

            case NPCID.BigMimicJungle:
                npcLoot.Add(ItemDropRule.OneFromOptions(1,
                                                        ModContent.ItemType <Vineslinger>(),
                                                        ModContent.ItemType <Mahoguny>(),
                                                        ModContent.ItemType <OvergrownKey>()));
                break;

            default:
                break;
            }

            //if (Fargowiltas.Instance.CalamityLoaded && Revengeance && FargoSoulsWorld.EternityMode && Main.bloodMoon && Main.moonPhase == 0 && Main.raining && Main.rand.NextBool(10))
            //{
            //    Mod calamity = ModLoader.GetMod("CalamityMod");

            //    if (npc.type == calamity.NPCType("DevourerofGodsHeadS"))
            //    {
            //        Item.NewItem(npc.Hitbox, calamity.ItemType("CosmicPlushie"));
            //    }
            //}
        }