diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 8a5b884f66..ba3f644881 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4744,6 +4744,14 @@ namespace CalamityMod.CalPlayer public override void ModifyHitNPCWithProj(Projectile proj, NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { + if (proj.Calamity().rogue) + { + crit = Main.rand.Next(1, 101) < player.Calamity().throwingCrit; + } + + if (proj.npcProj || proj.trap) + return; + bool isTrueMelee = proj.Calamity().trueMelee; bool isSummon = proj.minion || proj.sentry || CalamityMod.projectileMinionList.Contains(proj.type); bool hasClassType = proj.melee || proj.ranged || proj.magic || isSummon || proj.Calamity().rogue; @@ -4763,11 +4771,6 @@ namespace CalamityMod.CalPlayer player.wingTime = player.wingTimeMax; } - if (proj.Calamity().rogue) - { - crit = Main.rand.Next(1, 101) < player.Calamity().throwingCrit; - } - #region MultiplierBoosts double damageMult = 1.0; if (isSummon) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 7edeac02bb..a4a5945710 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -4534,7 +4534,8 @@ namespace CalamityMod.NPCs { if (type == NPCID.Merchant) { - SetShopItem(ref shop, ref nextSlot, ItemID.Flare, Main.LocalPlayer.HasItem(ModContent.ItemType()) || Main.LocalPlayer.HasItem(ModContent.ItemType())); + SetShopItem(ref shop, ref nextSlot, ItemID.Flare, (Main.LocalPlayer.HasItem(ModContent.ItemType()) || Main.LocalPlayer.HasItem(ModContent.ItemType())) && !Main.LocalPlayer.HasItem(ItemID.FlareGun)); + SetShopItem(ref shop, ref nextSlot, ItemID.BlueFlare, (Main.LocalPlayer.HasItem(ModContent.ItemType()) || Main.LocalPlayer.HasItem(ModContent.ItemType())) && !Main.LocalPlayer.HasItem(ItemID.FlareGun)); SetShopItem(ref shop, ref nextSlot, ItemID.ApprenticeBait, NPC.downedBoss1); SetShopItem(ref shop, ref nextSlot, ItemID.JourneymanBait, NPC.downedBoss2); SetShopItem(ref shop, ref nextSlot, WorldGen.crimson ? ItemID.Vilethorn : ItemID.CrimsonRod, WorldGen.shadowOrbSmashed || NPC.downedBoss2); @@ -4617,7 +4618,7 @@ namespace CalamityMod.NPCs SetShopItem(ref shop, ref nextSlot, ItemID.MechanicalWorm, NPC.downedMechBoss1 && CalamityMod.CalamityConfig.SellBossSummons, Item.buyPrice(0, 20)); SetShopItem(ref shop, ref nextSlot, ItemID.MechanicalEye, NPC.downedMechBoss2 && CalamityMod.CalamityConfig.SellBossSummons, Item.buyPrice(0, 20)); SetShopItem(ref shop, ref nextSlot, ItemID.MechanicalSkull, NPC.downedMechBoss3 && CalamityMod.CalamityConfig.SellBossSummons, Item.buyPrice(0, 20)); - SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), Main.hardMode, Item.buyPrice(0, 0, 5)); + SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), price: Item.buyPrice(0, 0, 5)); } if (type == NPCID.Wizard)