Example #1
0
        public override void PostUpdate()
        {
            if (zombieQuestStart)
            {
                QuestManager.UnlockQuest <ZombieOriginQuest>(true);
            }

            if (Main.hardMode)
            {
                QuestManager.UnlockQuest <ExplorerQuestBlueMoon>(true);
                QuestManager.UnlockQuest <SlayerQuestVultureMatriarch>(true);

                if (Main.bloodMoon && QuestManager.GetQuest <SlayerQuestClown>().IsUnlocked)
                {
                    AddQuestQueue(NPCID.PartyGirl, QuestManager.GetQuest <SlayerQuestClown>());
                }

                AddQuestQueue(NPCID.Dryad, QuestManager.GetQuest <OlympiumQuest>());
                AddQuestQueue(NPCID.Mechanic, QuestManager.GetQuest <GranitechQuest>());
                AddQuestQueue(ModContent.NPCType <NPCs.Town.Adventurer>(), QuestManager.GetQuest <AuroraStagQuest>());


                if (NPC.downedMechBoss1 || NPC.downedMechBoss2 || NPC.downedMechBoss3)
                {
                    AddQuestQueue(NPCID.Dryad, QuestManager.GetQuest <CritterCaptureSoulOrb>());
                }
            }

            if (NPC.downedBoss2)
            {
                AddQuestQueue(NPCID.Stylist, QuestManager.GetQuest <StylistQuestMeteor>());
            }
        }
Example #2
0
 public override void CatchFish(Item fishingRod, Item bait, int power, int liquidType, int poolSize, int worldLayer, int questFish, ref int caughtType, ref bool junk)
 {
     if (player.ZoneJungle && QuestManager.GetQuest <ItsNoSalmon>().IsActive&& Main.rand.NextBool(10))
     {
         caughtType = ModContent.ItemType <Items.Consumable.Quest.HornetfishQuest>();
     }
 }
Example #3
0
        public override void NPCLoot(NPC npc)
        {
            if (npc.type == NPCID.Zombie || npc.type == NPCID.BaldZombie || npc.type == NPCID.SlimedZombie || npc.type == NPCID.SwampZombie || npc.type == NPCID.TwiggyZombie || npc.type == NPCID.ZombieRaincoat || npc.type == NPCID.PincushionZombie || npc.type == NPCID.ZombieEskimo)
            {
                if (!QuestWorld.zombieQuestStart && QuestManager.GetQuest <FirstAdventure>().IsCompleted)
                {
                    if (Main.rand.Next(40) == 0)
                    {
                        Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemType <OccultistMap>());
                    }
                }
            }

            if (npc.type == NPCID.EyeofCthulhu || npc.type == NPCID.EaterofWorldsHead || npc.type == NPCID.SkeletronHead || npc.type == NPCType <NPCs.Boss.Scarabeus.Scarabeus>() ||
                npc.type == NPCType <NPCs.Boss.AncientFlyer>() || npc.type == NPCType <NPCs.Boss.MoonWizard.MoonWizard>() || npc.type == NPCType <NPCs.Boss.SteamRaider.SteamRaiderHead>())
            {
                GetInstance <QuestWorld>().AddQuestQueue(NPCType <Adventurer>(), QuestManager.GetQuest <SlayerQuestOccultist>());
                GetInstance <QuestWorld>().AddQuestQueue(NPCType <Adventurer>(), QuestManager.GetQuest <UnidentifiedFloatingObjects>());
            }

            if (npc.type == NPCID.EaterofWorldsHead)
            {
                GetInstance <QuestWorld>().AddQuestQueue(NPCType <Adventurer>(), QuestManager.GetQuest <SlayerQuestMarble>());
            }

            if (npc.type == NPCID.SkeletronHead)
            {
                GetInstance <QuestWorld>().AddQuestQueue(NPCType <Adventurer>(), QuestManager.GetQuest <RaidingTheStars>());
                GetInstance <QuestWorld>().AddQuestQueue(NPCType <Adventurer>(), QuestManager.GetQuest <StrangeSeas>());
                GetInstance <QuestWorld>().AddQuestQueue(NPCType <RuneWizard>(), QuestManager.GetQuest <IceDeityQuest>());
            }
            OnNPCLoot?.Invoke(npc);
        }
Example #4
0
        public override void SetupShop(int type, Chest shop, ref int nextSlot)
        {
            if (type == NPCType <RuneWizard>() && QuestManager.GetQuest <FirstAdventure>().IsCompleted&& !Main.dayTime)
            {
                shop.item[nextSlot++].SetDefaults(ItemType <OccultistMap>(), false);
            }

            if (type == NPCID.Stylist)
            {
                if (QuestManager.GetQuest <StylistQuestSeafoam>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <Items.Sets.DyesMisc.HairDye.SeafoamDye>(), false);
                }

                if (QuestManager.GetQuest <StylistQuestMeteor>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <Items.Sets.DyesMisc.HairDye.MeteorDye>(), false);
                }
                if (QuestManager.GetQuest <StylistQuestCorrupt>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <Items.Sets.DyesMisc.HairDye.CystalDye>(), false);
                }
                if (QuestManager.GetQuest <StylistQuestCrimson>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <Items.Sets.DyesMisc.HairDye.ViciousDye>(), false);
                }
            }
            if (type == NPCID.Merchant)
            {
                if (QuestManager.GetQuest <AnglerStatueQuest>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <Items.Placeable.Furniture.GiantAnglerStatue>(), false);
                }
            }
            if (type == NPCID.Demolitionist)
            {
                if (QuestManager.GetQuest <RescueQuestStylist>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <Items.Accessory.LongFuse>(), false);
                }
            }
            if (type == NPCType <Adventurer>())
            {
                if (QuestManager.GetQuest <FirstAdventure>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <DurasilkSheaf>(), false);
                }

                if (QuestManager.GetQuest <ExplorerQuestAsteroid>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <ExplorerScrollAsteroidFull>(), false);
                }
                if (QuestManager.GetQuest <ExplorerQuestGranite>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <ExplorerScrollGraniteFull>(), false);
                }
                if (QuestManager.GetQuest <ExplorerQuestMarble>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <ExplorerScrollMarbleFull>(), false);
                }
                if (QuestManager.GetQuest <ExplorerQuestHive>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <ExplorerScrollHiveFull>(), false);
                }
                if (QuestManager.GetQuest <ExplorerQuestMushroom>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <ExplorerScrollMushroomFull>(), false);
                }

                if (QuestManager.GetQuest <CritterCaptureFloater>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <Items.Weapon.Magic.LuminanceSeacone.LuminanceSeacone>(), false);
                }

                if (QuestManager.GetQuest <ManicMage>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <Items.Sets.MagicMisc.Lightspire.AkaviriStaff>(), false);
                }

                if (QuestManager.GetQuest <SkyHigh>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <Tiles.Furniture.JadeDragonStatue.DragonStatueItem>(), false);
                }

                if (QuestManager.GetQuest <SlayerQuestCavern>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <Items.Weapon.Thrown.ClatterSpear>(), false);
                }

                if (QuestManager.GetQuest <ZombieOriginQuest>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <Items.Weapon.Swung.Punching_Bag.Punching_Bag>(), false);
                }

                if (QuestManager.GetQuest <DecrepitDepths>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <SepulchreArrow>(), false);
                    shop.item[nextSlot++].SetDefaults(ItemType <SepulchreBannerItem>(), false);
                    shop.item[nextSlot++].SetDefaults(ItemType <SepulchreChest>(), false);
                }

                if (QuestManager.GetQuest <SkyHigh>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <PottedSakura>(), false);
                    shop.item[nextSlot++].SetDefaults(ItemType <PottedWillow>(), false);
                }
                if (QuestManager.GetQuest <ItsNoSalmon>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <Items.Accessory.KoiTotem>(), false);
                }
                if (QuestManager.GetQuest <SporeSalvage>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <Tiles.Furniture.Critters.VibeshroomJarItem>(), false);
                }
                if (QuestManager.GetQuest <SlayerQuestDrBones>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <Items.Consumable.SeedBag>(), false);
                }
                if (QuestManager.GetQuest <IceDeityQuest>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <Items.Weapon.Thrown.CryoKnife>(), false);
                }
                if (QuestManager.GetQuest <IceDeityQuest>().IsCompleted)
                {
                    shop.item[nextSlot++].SetDefaults(ItemType <Items.Placeable.IceSculpture.IceDeitySculpture>(), false);
                }
            }
            OnSetupShop?.Invoke(type, shop, nextSlot);
        }