Beispiel #1
0
        ////////////////

        private void RuinLootDropsIf(NPC npc, IList <int> itemWhos)
        {
            var   config            = RuinedItemsConfig.Instance;
            float npcLootRuinChance = config.Get <float>(nameof(config.NPCLootItemRuinPercentChance));

            byte ruinedPrefix = ModContent.PrefixType <RuinedPrefix>();

            foreach (int itemWho in itemWhos)
            {
                Item item = Main.item[itemWho];
                if (item?.active != true || !RuinedPrefix.IsItemRuinable(item))
                {
                    continue;
                }

                if (Main.rand.NextFloat() <= npcLootRuinChance)
                {
                    item.Prefix(ruinedPrefix);

                    if (Main.netMode == NetmodeID.Server)
                    {
                        NetMessage.SendData(MessageID.SyncItem, -1, -1, null, itemWho);
                    }
                }
            }
        }
 public override void ModifyTooltips(Item item, List <TooltipLine> tooltips)
 {
     if (item.prefix == ModContent.PrefixType <RuinedPrefix>())
     {
         this.ApplyRuinedTooltips(item, tooltips);
     }
 }
 public override int ChoosePrefix(Item item, UnifiedRandom rand)
 {
     if (item.damage > 1 && !item.accessory && item.notAmmo == true && GetInstance <AzercadmiumConfig>().azercadmiumPrefixes)
     {
         if (Main.rand.Next(25) == 0)
         {
             return(ModContent.PrefixType <Rough>());
         }
         if (Main.rand.Next(30) == 0)
         {
             return(ModContent.PrefixType <Blessed>());
         }
         if (Main.rand.Next(30) == 0)
         {
             return(ModContent.PrefixType <Cursed>());
         }
         if (item.knockBack > 0)
         {
             if (Main.rand.Next(30) == 0)
             {
                 return(ModContent.PrefixType <Epic>());
             }
             if (Main.rand.Next(30) == 0)
             {
                 return(ModContent.PrefixType <Odd>());
             }
             if (Main.rand.Next(30) == 0)
             {
                 return(ModContent.PrefixType <Egotistical>());
             }
             if (Main.rand.Next(75) == 0)
             {
                 return(ModContent.PrefixType <Exotic>());
             }
         }
         if (item.melee)
         {
             if (Main.rand.Next(30) == 0)
             {
                 return(ModContent.PrefixType <Tremendous>());
             }
             if (Main.rand.Next(30) == 0)
             {
                 return(ModContent.PrefixType <Atomic>());
             }
         }
         if (item.ranged)
         {
             if (Main.rand.Next(30) == 0)
             {
                 return(ModContent.PrefixType <Wasted>());
             }
             if (Main.rand.Next(30) == 0)
             {
                 return(ModContent.PrefixType <Empowered>());
             }
         }
     }
     return(-1);
 }
        public override Color?GetAlpha(Item item, Color lightColor)
        {
            if (item.prefix == ModContent.PrefixType <RuinedPrefix>())
            {
                if (!Main.item.Any(i => i == item))                         // inventory items only
                {
                    float pulse       = (float)Main.mouseTextColor / 255f;
                    float strongPulse = pulse * pulse * pulse;

                    bool isHovering = item == RuinedItemsMod.Instance.InventoryMouseHoverItem;

                    if (MagitechScrapItem.PickerActive && isHovering)
                    {
                        if (isHovering)
                        {
                            return(Color.Lime);
                        }
                        return(Color.Lime * strongPulse);
                    }
                    else
                    {
                        strongPulse *= 0.5f;

                        Color newColor = lightColor * (0.25f + strongPulse);
                        newColor.A = lightColor.A;
                        return(newColor);
                    }
                }
            }

            return(base.GetAlpha(item, lightColor));
        }
Beispiel #5
0
        public override void PostWorldGen()
        {
            var  config       = RuinedItemsConfig.Instance;
            byte ruinedPrefix = ModContent.PrefixType <RuinedPrefix>();

            for (int i = 0; i < Main.chest.Length; i++)
            {
                Item[] items = Main.chest[i]?.item;
                if (items == null)
                {
                    continue;
                }

                for (int j = 0; j < items.Length; j++)
                {
                    Item item = items[j];
                    if (item?.active != true)
                    {
                        continue;
                    }

                    if (WorldGen.genRand.NextFloat() > config.Get <float>(nameof(config.WorldGenChestItemRuinPercentChance)))
                    {
                        continue;
                    }

                    if (RuinedPrefix.IsItemRuinable(item))
                    {
                        item.Prefix(ruinedPrefix);
                    }
                }
            }
        }
        ////////////////

        internal void UpdateRuinedAccessoriesForPlayer(Player player)
        {
            for (int i = PlayerItemLibraries.VanillaAccessorySlotFirst; PlayerItemLibraries.IsAccessorySlot(player, i); i++)
            {
                Item accItem = player.armor[i];
                if (accItem?.active != true || accItem.prefix != ModContent.PrefixType <RuinedPrefix>())
                {
                    continue;
                }

                this.ConveyRuinedAccessoryStatsToPlayer(player);
            }
        }
Beispiel #7
0
        public override bool ConsumeItem(Item item, Player player)
        {
            var config = RuinedItemsConfig.Instance;

            if (config.Get <bool>(nameof(config.RuinedItemsLockedFromUse)))
            {
                if (item.prefix == ModContent.PrefixType <RuinedPrefix>())
                {
                    return(false);
                }
            }
            return(base.ConsumeItem(item, player));
        }
Beispiel #8
0
        public override bool CanRightClick(Item item)
        {
            var config = RuinedItemsConfig.Instance;

            if (config.Get <bool>(nameof(config.RuinedItemsLockedFromUse)))
            {
                if (item.prefix == ModContent.PrefixType <RuinedPrefix>())
                {
                    return(false);
                }
            }
            return(base.CanRightClick(item));
        }
        ////////////////

        /// @private
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            if (!RuinedItemsConfig.Instance.DebugMode)
            {
                caller.Reply("Debug mode must be enabled in mod settings.", Color.Yellow);
                return;
            }

            Vector2 pos = caller.Player.position;

            ItemLibraries.CreateItem(pos, ItemID.HermesBoots, 1, 16, 16, ModContent.PrefixType <RuinedPrefix>());
            ItemLibraries.CreateItem(pos, ModContent.ItemType <MagitechScrapItem>(), 1, 16, 16);
        }
Beispiel #10
0
        ////////////////

        private void ProcessBagItem(Player plr, Item item)
        {
            if (RuinedPrefix.IsItemRuinable(item))
            {
                var   config     = RuinedItemsConfig.Instance;
                float ruinChance = config.Get <float>(nameof(config.NPCLootItemRuinPercentChance));

                if (Main.rand.NextFloat() < ruinChance)
                {
                    item.Prefix(ModContent.PrefixType <RuinedPrefix>());
                }
            }
        }
Beispiel #11
0
        public override void OnCraft(Item item, Recipe recipe)
        {
            if (!RuinedPrefix.IsItemRuinable(item))
            {
                return;
            }

            var   config          = RuinedItemsConfig.Instance;
            float craftRuinChance = config.Get <float>(nameof(config.CraftRuinPercentChance));

            if (Main.rand.NextFloat() <= craftRuinChance)
            {
                item.Prefix(ModContent.PrefixType <RuinedPrefix>());
            }
        }
Beispiel #12
0
        ////////////////

        public override void UpdateInventory(Item item, Player player)
        {
            if (item.prefix == ModContent.PrefixType <RuinedPrefix>())
            {
                this.WasRuinedSinceLastCheck = true;
            }
            else
            {
                if (this.WasRuinedSinceLastCheck)
                {
                    this.WasRuinedSinceLastCheck = false;

                    RuinedPrefix.RemoveRuinedStats(item);
                }
            }
        }
 //Tooltip stuff
 public override void ModifyTooltips(Item item, List <TooltipLine> tooltips)
 {
     // Clicker radius accessory prefix tooltip
     if (item.accessory && !item.social && item.prefix == ModContent.PrefixType <ClickerRadius>())
     {
         int index = tooltips.FindLastIndex(tt => (tt.mod.Equals("Terraria") || tt.mod.Equals(mod.Name)) &&
                                            (tt.Name.Equals("Material") || tt.Name.StartsWith("Tooltip") || tt.Name.Equals("Defense") || tt.Name.Equals("Equipable")));
         if (index != -1)
         {
             tooltips.Insert(index + 1, new TooltipLine(mod, "PrefixAccClickerRadius", LangHelper.GetText("Prefix.ClickerRadius.Tooltip"))
             {
                 isModifier = true
             });
         }
     }
 }
Beispiel #14
0
 public override void ModifyTooltips(Item item, List <TooltipLine> tooltips)
 {
     if (ModContent.GetInstance <rTerrariaModConfig>().skeletonImmunityConfig)
     {
         if (item.type == ModContent.ItemType <SkeletonSkull>() || item.type == ModContent.ItemType <SummonersMask>())
         {
             TooltipLine line = new TooltipLine(mod, "SkeletonImmunity", "Makes most pre-hardmode skeletons friendly")
             {
                 overrideColor = Color.White
             };
             tooltips.Add(line);
         }
     }
     if (item.prefix == ModContent.PrefixType <Affluent>())
     {
         TooltipLine line = new TooltipLine(mod, "PrefixAffluent", "Hitting enemies will sometimes drop extra coins\nAffect does not stack")
         {
             isModifier = true
         };
         tooltips.Add(line);
     }
     if (item.prefix == ModContent.PrefixType <Shamanic>())
     {
         item.rare = ItemRarityID.Red;
         TooltipLine line = new TooltipLine(mod, "PrefixShamanic", "10% increased minion damage\nIncreased minion knockback")
         {
             isModifier = true
         };
         tooltips.Add(line);
     }
     if (item.prefix == ModContent.PrefixType <Sparkling>())
     {
         TooltipLine line = new TooltipLine(mod, "PrefixSparkling", "15% increased minion damage\nMax minions increased by 2")
         {
             isModifier = true
         };
         tooltips.Add(line);
     }
     if (item.type == ItemID.CrystalBall)
     {
         TooltipLine line = new TooltipLine(mod, "GrindUp", "Can be ground up in a mortar")
         {
             overrideColor = Color.White
         };
         tooltips.Add(line);
     }
 }
Beispiel #15
0
        public override int ChoosePrefix(Item item, UnifiedRandom rand)
        {
            if (item.accessory && item.stack == 1 && rand.NextBool(80))
            {
                byte pref;

                switch (rand.Next(4))
                {
                /*case 0:
                 *  pref = ModContent.PrefixType<Swift>();
                 *  break;
                 * case 1:
                 *  pref = ModContent.PrefixType<Speedy>();
                 *  break;
                 * case 2:
                 *  pref = ModContent.PrefixType<Zippy>();
                 *  break;*/
                default:
                    pref = ModContent.PrefixType <Yeeting>();
                    break;
                }

                return(pref);
            }
            if (item.ranged && Main.rand.Next(30) == 0)
            {
                return(ModContent.PrefixType <CarefulPrefix>());
            }
            if (item.melee && Main.rand.Next(30) == 0)
            {
                if (Main.rand.Next(2) == 0)
                {
                    return(ModContent.PrefixType <ColossalPrefix>());
                }
                return(ModContent.PrefixType <HallowedPrefix>());
            }
            if (item.magic && Main.rand.Next(30) == 0)
            {
                return(ModContent.PrefixType <KnowledgeablePrefix>());
            }

            return(-1);
        }
        ////////////////

        public override void PostDrawInInventory(
            Item item,
            SpriteBatch sb,
            Vector2 position,
            Rectangle frame,
            Color drawColor,
            Color itemColor,
            Vector2 origin,
            float scale)
        {
            if (item == null || item.IsAir)
            {
                return;
            }
            if (item.prefix != ModContent.PrefixType <RuinedPrefix>())
            {
                return;
            }

            var config = RuinedItemsConfig.Instance;
            var mymod  = (RuinedItemsMod)this.mod;

            if (!config.Get <bool>(nameof(config.RuinedItemsLockedFromUse)))
            {
                return;
            }

            float posX = position.X;

            posX += ((float)frame.Width / 2f) * scale;
            posX -= ((float)mymod.DisabledItemTex.Width / 2f) * scale;
            float posY = position.Y;

            posY += ((float)frame.Height / 2f) * scale;
            posY -= ((float)mymod.DisabledItemTex.Height / 2f) * scale;
            var pos = new Vector2(posX, posY);

            var rect  = new Rectangle(0, 0, mymod.DisabledItemTex.Width, mymod.DisabledItemTex.Height);
            var color = Color.White * 0.625f;

            sb.Draw(mymod.DisabledItemTex, pos, rect, color, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f);
        }
Beispiel #17
0
        public override void PostBuyItem(NPC vendor, Item[] shopInventory, Item item)
        {
            if (!RuinedPrefix.IsItemRuinable(item))
            {
                return;
            }

            var   config             = RuinedItemsConfig.Instance;
            float purchaseRuinChance = config.Get <float>(nameof(config.PurchasedItemRuinPercentChance));

            if (purchaseRuinChance <= 0f)
            {
                return;
            }

            if (Main.rand.NextFloat() < purchaseRuinChance)
            {
                item.Prefix(ModContent.PrefixType <RuinedPrefix>());
            }
        }
Beispiel #18
0
        private bool IsItemPoolItemRuined(Recipe recipe, Item reqItem, Item[] pool, int maxPool)
        {
            for (int j = 0; j < maxPool; j++)
            {
                Item ingItem    = pool[j];
                bool isIngMatch = ingItem.IsTheSameAs(reqItem) ||
                                  recipe.useWood(ingItem.type, reqItem.type) ||
                                  recipe.useSand(ingItem.type, reqItem.type) ||
                                  recipe.useFragment(ingItem.type, reqItem.type) ||
                                  recipe.useIronBar(ingItem.type, reqItem.type) ||
                                  recipe.usePressurePlate(ingItem.type, reqItem.type) ||
                                  recipe.AcceptedByItemGroups(ingItem.type, reqItem.type);

                if (isIngMatch && ingItem.prefix == ModContent.PrefixType <RuinedPrefix>())
                {
                    return(true);
                }
            }

            return(false);
        }
Beispiel #19
0
        private void LoadOn()
        {
            On.Terraria.Item.Prefix += (On.Terraria.Item.orig_Prefix orig, Item item, int pre) => {
                bool ret = orig.Invoke(item, pre);
                if (item.prefix == ModContent.PrefixType <RuinedPrefix>())
                {
                    this.PostApply(item);
                }
                return(ret);
            };


            On.Terraria.Recipe.Create += (On.Terraria.Recipe.orig_Create orig, Recipe recipe) => {
                bool isResultRuined = this.IsRecipeIngredientRuined(recipe);

                orig.Invoke(recipe);

                if (isResultRuined)
                {
                    Main.mouseItem.Prefix(ModContent.PrefixType <RuinedPrefix>());
                }
            };
        }
        private void BlockEquipsIf()
        {
            var config = RuinedItemsConfig.Instance;

            if (!config.Get <bool>(nameof(config.RuinedItemsLockedFromUse)))
            {
                return;
            }

            for (int i = 0; i < this.player.armor.Length; i++)
            {
                Item item = this.player.armor[i];
                if (item == null || item.IsAir)
                {
                    continue;
                }

                if (item.prefix == ModContent.PrefixType <RuinedPrefix>())
                {
                    PlayerItemLibraries.DropEquippedArmorItem(player, i);
                }
            }

            for (int i = 0; i < this.player.miscEquips.Length; i++)
            {
                Item item = this.player.armor[i];
                if (item == null || item.IsAir)
                {
                    continue;
                }

                if (item.prefix == ModContent.PrefixType <RuinedPrefix>())
                {
                    PlayerItemLibraries.DropEquippedMiscItem(player, i);
                }
            }
        }
Beispiel #21
0
        private bool RuinReforge(Item item)
        {
            item.SetDefaults(item.type);

            if (item.accessory)
            {
                var resetItem = new Item();
                resetItem.SetDefaults(item.type, true);

                item.rare    = resetItem.rare;
                item.defense = 0;
                item.crit    = 0;
            }

            item.Prefix(ModContent.PrefixType <RuinedPrefix>());

            /*if( Main.netMode == NetmodeID.MultiplayerClient ) {
             *      int itemWho = Array.FindIndex( Main.item, i => i == item );
             *      if( itemWho != -1 ) {
             *              NetMessage.SendData( MessageID.SyncItem, -1, -1, null, itemWho );
             *      }
             * }*/
            return(true);
        }
Beispiel #22
0
        ////////////////

        public override bool NewPreReforge(Item item)
        {
            RuinedItemsItem.IsCurrentPreReforgeItemRuined = item.prefix == ModContent.PrefixType <RuinedPrefix>();

            return(base.NewPreReforge(item));
        }
        public static bool ApplyRepairIf(Player player, Item item)
        {
            if (item?.active != true || item.stack == 0)
            {
                return(false);
            }

            int  scrapItemType = ModContent.ItemType <MagitechScrapItem>();
            Item scrapItem     = PlayerItemFinderLibraries.FindFirstOfPossessedItemFor(
                player,
                new HashSet <int> {
                scrapItemType
            },
                false
                );

            var myScrapItem = scrapItem?.modItem as MagitechScrapItem;

            if (myScrapItem == null)
            {
                Main.NewText("No repair scrap items in player's possession.", Color.Yellow);
                return(false);
            }

            int ruinedPrefixType = ModContent.PrefixType <RuinedPrefix>();

            if (item.prefix != ruinedPrefixType)
            {
                return(false);
            }

            var  config   = RuinedItemsConfig.Instance;
            var  myitem   = item.GetGlobalItem <RuinedItemsItem>();
            bool onlyOnce = config.Get <bool>(nameof(config.MagitechScrapAttemptsRepairOnlyOncePerItem));

            if (onlyOnce && myitem.IsScrapUsedUpon)
            {
                Main.NewText("Cannot repair this with scrap more than once. Use reforging instead.", Color.Yellow);
                return(false);
            }

            if (PlayerItemLibraries.RemoveInventoryItemQuantity(Main.LocalPlayer, scrapItemType, 1) <= 0)
            {
                Main.NewText("Could not use player's scrap items for repairing.", Color.Yellow);
                return(false);
            }

            if (Main.rand.NextFloat() < config.Get <float>(nameof(config.MagitechScrapRepairChance)))
            {
                float rollChance = config.Get <float>(nameof(config.GeneralRuinRollChance));

                config.SetOverride(nameof(config.GeneralRuinRollChance), 0f);
                item.Prefix(-1);
                config.SetOverride(nameof(config.GeneralRuinRollChance), rollChance);

                CombatText.NewText(Main.LocalPlayer.getRect(), Color.Lime, "Repair success!", true);
                Main.NewText("Repair success!", Color.Lime);
            }
            else
            {
                CombatText.NewText(Main.LocalPlayer.getRect(), Color.DimGray, "Repair failed!", true);
                Main.NewText("Repair failed! Item can now only be repaired via. reforging.", Color.OrangeRed);
            }

            myitem.IsScrapUsedUpon = true;

            Main.PlaySound(SoundID.Item37, Main.LocalPlayer.Center);
            Main.PlaySound(SoundID.Grab, Main.LocalPlayer.Center);

            return(true);
        }
Beispiel #24
0
        private bool UpdateRarity(On.Terraria.Item.orig_Prefix orig, Terraria.Item item, int pre)
        {
            orig(item, pre);
            Terraria.Item It = new Terraria.Item();
            It.SetDefaults(item.type);
            int baseRarity  = It.rare;
            int baseDamage  = It.damage;
            int baseUseTime = It.useTime;

            int   baseMana       = It.mana;
            float baseKnockback  = It.knockBack;
            float baseScale      = It.scale;
            float baseShootspeed = It.shootSpeed;
            int   baseCrit       = It.crit;

            item.rare = baseRarity;
            if (_isFixedRarity.Contains(item.rare))
            {
                return(true);
            }

            float DamageInc = 1;

            if (baseDamage != 0)
            {
                DamageInc = item.damage / baseDamage;
            }
            float KnockBack = 1;

            if (baseKnockback != 0)
            {
                KnockBack = item.knockBack / baseKnockback;
            }
            float UseTimeMult = 1;

            if (baseUseTime != 0)
            {
                UseTimeMult = item.useTime / baseUseTime;
            }
            float ScaleMult = 1;

            if (baseScale != 0)
            {
                ScaleMult = item.scale / baseScale;
            }
            float ShootspeedMult = 1;

            if (baseShootspeed != 0)
            {
                ShootspeedMult = item.shootSpeed / baseShootspeed;
            }
            float ManaMult = 1;

            if (baseMana != 0)
            {
                ManaMult = item.mana / baseMana;
            }
            float CritMult = 1;

            if (baseCrit != 0)
            {
                CritMult = item.crit / baseCrit;
            }
            ;



            int   i          = item.prefix;
            float TotalValue = 1f * DamageInc * (2f - UseTimeMult) * (2f - ManaMult) * ScaleMult * KnockBack * ShootspeedMult * (1f + (float)CritMult * 0.02f);

            if (i == 62 || i == 69 || i == 73 || i == 77)
            {
                TotalValue *= 1.05f;
            }
            if (i == 63 || i == 70 || i == 74 || i == 78 || i == 67)
            {
                TotalValue *= 1.1f;
            }
            if (i == 64 || i == 71 || i == 75 || i == 79 || i == 66)
            {
                TotalValue *= 1.15f;
            }
            if (i == PrefixID.Warding || i == PrefixID.Menacing || i == PrefixID.Lucky || i == PrefixID.Quick || i == PrefixID.Violent)
            {
                TotalValue *= 1.2f;
            }
            if (i == ModContent.PrefixType <Shielding>() || i == ModContent.PrefixType <Wrathful>() || i == ModContent.PrefixType <Weighted>() || i == ModContent.PrefixType <Rapid>() || i == ModContent.PrefixType <Beserk>())
            {
                TotalValue *= 1.5f;
            }
            if ((double)TotalValue >= 1.5)
            {
                item.rare += 3;
            }
            else if ((double)TotalValue >= 1.2)
            {
                item.rare += 2;
            }
            else if ((double)TotalValue >= 1.05)
            {
                item.rare++;
            }
            else if ((double)TotalValue <= 0.8)
            {
                item.rare -= 2;
            }
            else if ((double)TotalValue <= 0.95)
            {
                item.rare--;
            }

            if (item.rare > MaxRarity)
            {
                item.rare = MaxRarity;
            }
            return(true);
        }
        public override void UpdateEquip(Item item, Player player)
        {
            ClickerPlayer clickerPlayer = player.GetModPlayer <ClickerPlayer>();

            switch (item.prefix)
            {
            case PrefixID.Precise:
                clickerPlayer.clickerCrit += 2;
                break;

            case PrefixID.Lucky:
                clickerPlayer.clickerCrit += 4;
                break;
            }

            if (item.prefix == ModContent.PrefixType <ClickerRadius>())
            {
                clickerPlayer.clickerRadius += 0.3f;
            }

            switch (item.type)
            {
            case ItemID.Gi:
                clickerPlayer.clickerCrit += 5;
                break;

            case ItemID.CobaltBreastplate:
                clickerPlayer.clickerCrit += 3;
                break;

            case ItemID.PalladiumBreastplate:
                clickerPlayer.clickerDamage += 0.03f;
                clickerPlayer.clickerCrit   += 2;
                break;

            case ItemID.PalladiumLeggings:
                clickerPlayer.clickerDamage += 0.02f;
                clickerPlayer.clickerCrit   += 1;
                break;

            case ItemID.MythrilChainmail:
                clickerPlayer.clickerDamage += 0.05f;
                break;

            case ItemID.MythrilGreaves:
                clickerPlayer.clickerCrit += 3;
                break;

            case ItemID.OrichalcumBreastplate:
                clickerPlayer.clickerCrit += 6;
                break;

            case ItemID.AdamantiteBreastplate:
                clickerPlayer.clickerDamage += 0.06f;
                break;

            case ItemID.AdamantiteLeggings:
                clickerPlayer.clickerCrit += 4;
                break;

            case ItemID.TitaniumBreastplate:
                clickerPlayer.clickerDamage += 0.04f;
                clickerPlayer.clickerCrit   += 3;
                break;

            case ItemID.TitaniumLeggings:
                clickerPlayer.clickerDamage += 0.03f;
                clickerPlayer.clickerCrit   += 3;
                break;

            case ItemID.HallowedPlateMail:
                clickerPlayer.clickerCrit += 7;
                break;

            case ItemID.HallowedGreaves:
                clickerPlayer.clickerDamage += 0.07f;
                break;

            case ItemID.ChlorophytePlateMail:
                clickerPlayer.clickerDamage += 0.05f;
                clickerPlayer.clickerCrit   += 7;
                break;

            case ItemID.ChlorophyteGreaves:
                clickerPlayer.clickerCrit += 8;
                break;

            case ItemID.DestroyerEmblem:
                clickerPlayer.clickerCrit += 8;
                break;

            case ItemID.EyeoftheGolem:
                clickerPlayer.clickerCrit += 10;
                break;

            case ItemID.PutridScent:
                clickerPlayer.clickerCrit += 5;
                break;

            case ItemID.SunStone:
                if (Main.dayTime)
                {
                    goto case ItemID.CelestialShell;
                }
                break;

            case ItemID.MoonStone:
                if (!Main.dayTime || Main.eclipse)
                {
                    goto case ItemID.CelestialShell;
                }
                break;

            case ItemID.CelestialStone:
            case ItemID.CelestialShell:
                clickerPlayer.clickerCrit += 2;
                break;
            }
        }