diff --git a/CalPlayer/CalamityPlayerFishing.cs b/CalPlayer/CalamityPlayerFishing.cs index ca94674777..9a8fc073c9 100644 --- a/CalPlayer/CalamityPlayerFishing.cs +++ b/CalPlayer/CalamityPlayerFishing.cs @@ -286,17 +286,25 @@ namespace CalamityMod.CalPlayer if (attempt.legendary) { - List legendaryCatches = new List() - { + List legendaryCatches = + [ ModContent.ItemType() - }; - legendaryCatches.AddWithCondition(ModContent.ItemType(), DownedBossSystem.downedDesertScourge); - legendaryCatches.AddWithCondition(ModContent.ItemType(), DownedBossSystem.downedDesertScourge); + ]; + legendaryCatches.AddWithCondition(ModContent.ItemType(), Main.hardMode); itemDrop = legendaryCatches[Main.rand.Next(legendaryCatches.Count)]; } else if (attempt.veryrare) - itemDrop = ModContent.ItemType(); + { + List veryRareCatches = + [ + ModContent.ItemType() + ]; + + veryRareCatches.AddWithCondition(ModContent.ItemType(), DownedBossSystem.downedDesertScourge); + veryRareCatches.AddWithCondition(ModContent.ItemType(), DownedBossSystem.downedDesertScourge); + itemDrop = veryRareCatches[Main.rand.Next(veryRareCatches.Count)]; + } // Quest fish hover around this priority else if (questFish == ModContent.ItemType() && attempt.uncommon) itemDrop = ModContent.ItemType(); diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index f127572d0a..c7139b6df8 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1805,7 +1805,7 @@ namespace CalamityMod.CalPlayer { handler.OnCompleted(); if (handler.EndSound != null && handler.ShouldPlayEndSound) - SoundEngine.PlaySound(handler.EndSound.GetValueOrDefault()); + SoundEngine.PlaySound(handler.EndSound.GetValueOrDefault(), Player.Center); expiredCooldowns.Add(id); } } diff --git a/Items/Armor/Vanity/AnahitaMask.cs b/Items/Armor/Vanity/AnahitaMask.cs index e34bb084e0..d0e4ddd1be 100644 --- a/Items/Armor/Vanity/AnahitaMask.cs +++ b/Items/Armor/Vanity/AnahitaMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/ApolloMask.cs b/Items/Armor/Vanity/ApolloMask.cs index a8a803c4a0..afc0ea202e 100644 --- a/Items/Armor/Vanity/ApolloMask.cs +++ b/Items/Armor/Vanity/ApolloMask.cs @@ -24,6 +24,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } diff --git a/Items/Armor/Vanity/AquaticScourgeMask.cs b/Items/Armor/Vanity/AquaticScourgeMask.cs index 6376110756..e9b9122e74 100644 --- a/Items/Armor/Vanity/AquaticScourgeMask.cs +++ b/Items/Armor/Vanity/AquaticScourgeMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/AresMask.cs b/Items/Armor/Vanity/AresMask.cs index 7a00162411..55990036be 100644 --- a/Items/Armor/Vanity/AresMask.cs +++ b/Items/Armor/Vanity/AresMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/ArtemisMask.cs b/Items/Armor/Vanity/ArtemisMask.cs index 25ed7aca01..bd26d7cf43 100644 --- a/Items/Armor/Vanity/ArtemisMask.cs +++ b/Items/Armor/Vanity/ArtemisMask.cs @@ -24,6 +24,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } diff --git a/Items/Armor/Vanity/AstrumAureusMask.cs b/Items/Armor/Vanity/AstrumAureusMask.cs index 6302db15c8..f6d7c70af8 100644 --- a/Items/Armor/Vanity/AstrumAureusMask.cs +++ b/Items/Armor/Vanity/AstrumAureusMask.cs @@ -21,6 +21,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 30; Item.height = 28; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/AstrumDeusMask.cs b/Items/Armor/Vanity/AstrumDeusMask.cs index b69d950e2d..defb99a107 100644 --- a/Items/Armor/Vanity/AstrumDeusMask.cs +++ b/Items/Armor/Vanity/AstrumDeusMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/BrimstoneWaifuMask.cs b/Items/Armor/Vanity/BrimstoneWaifuMask.cs index eb0be7c6be..f71c4a3de6 100644 --- a/Items/Armor/Vanity/BrimstoneWaifuMask.cs +++ b/Items/Armor/Vanity/BrimstoneWaifuMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 30; Item.height = 28; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/BumblefuckMask.cs b/Items/Armor/Vanity/BumblefuckMask.cs index 4b3cc4d5f2..481ff50a11 100644 --- a/Items/Armor/Vanity/BumblefuckMask.cs +++ b/Items/Armor/Vanity/BumblefuckMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/CalamitasCloneMask.cs b/Items/Armor/Vanity/CalamitasCloneMask.cs index e7b9028f0f..1f75c613ff 100644 --- a/Items/Armor/Vanity/CalamitasCloneMask.cs +++ b/Items/Armor/Vanity/CalamitasCloneMask.cs @@ -21,6 +21,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/CeaselessVoidMask.cs b/Items/Armor/Vanity/CeaselessVoidMask.cs index 59eebc330a..d4899c0b68 100644 --- a/Items/Armor/Vanity/CeaselessVoidMask.cs +++ b/Items/Armor/Vanity/CeaselessVoidMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/CrabulonMask.cs b/Items/Armor/Vanity/CrabulonMask.cs index 20104d4fbc..a8c620fc2d 100644 --- a/Items/Armor/Vanity/CrabulonMask.cs +++ b/Items/Armor/Vanity/CrabulonMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/CryogenMask.cs b/Items/Armor/Vanity/CryogenMask.cs index 7b5ff08c9b..12741e7ead 100644 --- a/Items/Armor/Vanity/CryogenMask.cs +++ b/Items/Armor/Vanity/CryogenMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/DesertScourgeMask.cs b/Items/Armor/Vanity/DesertScourgeMask.cs index 38f27aff27..b37f3cb573 100644 --- a/Items/Armor/Vanity/DesertScourgeMask.cs +++ b/Items/Armor/Vanity/DesertScourgeMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/DevourerofGodsMask.cs b/Items/Armor/Vanity/DevourerofGodsMask.cs index a6d1ce5b97..b6bbfcc6f4 100644 --- a/Items/Armor/Vanity/DevourerofGodsMask.cs +++ b/Items/Armor/Vanity/DevourerofGodsMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/DraedonMask.cs b/Items/Armor/Vanity/DraedonMask.cs index 4600a31152..7bb08b12a8 100644 --- a/Items/Armor/Vanity/DraedonMask.cs +++ b/Items/Armor/Vanity/DraedonMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/HiveMindMask.cs b/Items/Armor/Vanity/HiveMindMask.cs index b8f888d5ed..1baf6973ee 100644 --- a/Items/Armor/Vanity/HiveMindMask.cs +++ b/Items/Armor/Vanity/HiveMindMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/LeviathanMask.cs b/Items/Armor/Vanity/LeviathanMask.cs index 8b3f4008f9..1b6b038443 100644 --- a/Items/Armor/Vanity/LeviathanMask.cs +++ b/Items/Armor/Vanity/LeviathanMask.cs @@ -18,6 +18,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/OldDukeMask.cs b/Items/Armor/Vanity/OldDukeMask.cs index 01d8b8168c..4472de8a11 100644 --- a/Items/Armor/Vanity/OldDukeMask.cs +++ b/Items/Armor/Vanity/OldDukeMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/PerforatorMask.cs b/Items/Armor/Vanity/PerforatorMask.cs index 7cdd7dfb70..dc96749f0a 100644 --- a/Items/Armor/Vanity/PerforatorMask.cs +++ b/Items/Armor/Vanity/PerforatorMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/PlaguebringerGoliathMask.cs b/Items/Armor/Vanity/PlaguebringerGoliathMask.cs index 45f97fd825..0b9a9eea9e 100644 --- a/Items/Armor/Vanity/PlaguebringerGoliathMask.cs +++ b/Items/Armor/Vanity/PlaguebringerGoliathMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/PolterghastMask.cs b/Items/Armor/Vanity/PolterghastMask.cs index 2c6fdea8c3..f5dd75fad8 100644 --- a/Items/Armor/Vanity/PolterghastMask.cs +++ b/Items/Armor/Vanity/PolterghastMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/ProfanedGuardianMask.cs b/Items/Armor/Vanity/ProfanedGuardianMask.cs index 2f5efd9e07..ea757ab72b 100644 --- a/Items/Armor/Vanity/ProfanedGuardianMask.cs +++ b/Items/Armor/Vanity/ProfanedGuardianMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/ProvidenceMask.cs b/Items/Armor/Vanity/ProvidenceMask.cs index 4167a58cc0..91bfcdfc53 100644 --- a/Items/Armor/Vanity/ProvidenceMask.cs +++ b/Items/Armor/Vanity/ProvidenceMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/RavagerMask.cs b/Items/Armor/Vanity/RavagerMask.cs index 0aa28dcd63..bf83218b34 100644 --- a/Items/Armor/Vanity/RavagerMask.cs +++ b/Items/Armor/Vanity/RavagerMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/SignusMask.cs b/Items/Armor/Vanity/SignusMask.cs index c67217c8e1..1cf13e9b43 100644 --- a/Items/Armor/Vanity/SignusMask.cs +++ b/Items/Armor/Vanity/SignusMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/SlimeGodMask.cs b/Items/Armor/Vanity/SlimeGodMask.cs index 2c9504bf3e..b4c7746934 100644 --- a/Items/Armor/Vanity/SlimeGodMask.cs +++ b/Items/Armor/Vanity/SlimeGodMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/SlimeGodMask2.cs b/Items/Armor/Vanity/SlimeGodMask2.cs index 3a4cbc553c..8a140ead83 100644 --- a/Items/Armor/Vanity/SlimeGodMask2.cs +++ b/Items/Armor/Vanity/SlimeGodMask2.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/StormWeaverMask.cs b/Items/Armor/Vanity/StormWeaverMask.cs index d32c21b1d6..6f073edefa 100644 --- a/Items/Armor/Vanity/StormWeaverMask.cs +++ b/Items/Armor/Vanity/StormWeaverMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/ThanatosMask.cs b/Items/Armor/Vanity/ThanatosMask.cs index eced97d9d5..30c4fc2c26 100644 --- a/Items/Armor/Vanity/ThanatosMask.cs +++ b/Items/Armor/Vanity/ThanatosMask.cs @@ -18,6 +18,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Armor/Vanity/YharonMask.cs b/Items/Armor/Vanity/YharonMask.cs index 8e4beefe10..2cf26c7715 100644 --- a/Items/Armor/Vanity/YharonMask.cs +++ b/Items/Armor/Vanity/YharonMask.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.width = 28; Item.height = 20; Item.rare = ItemRarityID.Blue; + Item.value = Item.sellPrice(silver: 75); Item.vanity = true; } } diff --git a/Items/Materials/Necroplasm.cs b/Items/Materials/Necroplasm.cs index de9ef301e8..6796178608 100644 --- a/Items/Materials/Necroplasm.cs +++ b/Items/Materials/Necroplasm.cs @@ -17,6 +17,7 @@ namespace CalamityMod.Items.Materials Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 6)); ItemID.Sets.AnimatesAsSoul[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 110; + ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.Ectoplasm; } public override void SetDefaults() diff --git a/Items/Placeables/Walls/DriftwoodWall.cs b/Items/Placeables/Walls/DriftwoodWall.cs index c7b64eb2fa..6f4217b604 100644 --- a/Items/Placeables/Walls/DriftwoodWall.cs +++ b/Items/Placeables/Walls/DriftwoodWall.cs @@ -1,4 +1,4 @@ -using Terraria.ModLoader; +using Terraria.ModLoader; using WallTiles = CalamityMod.Walls; using Terraria.ID; using CalamityMod.Items.Placeables.SunkenSea; @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Placeables.Walls public override void AddRecipes() { - CreateRecipe(4). + CreateRecipe(). AddIngredient(). AddTile(TileID.WorkBenches). Register(); diff --git a/Items/Potions/Food/Barberry.cs b/Items/Potions/Food/Barberry.cs index 19716ffed1..f81b940201 100644 --- a/Items/Potions/Food/Barberry.cs +++ b/Items/Potions/Food/Barberry.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Items.Potions.Food new Color(160, 32, 95) }; ItemID.Sets.IsFood[Type] = true; + ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.Ambrosia; } public override void SetDefaults() @@ -28,4 +29,4 @@ namespace CalamityMod.Items.Potions.Food Item.rare = ItemRarityID.Blue; } } -} \ No newline at end of file +} diff --git a/Items/Potions/Food/Cometfruit.cs b/Items/Potions/Food/Cometfruit.cs index ddf1698412..8b80cdc0d6 100644 --- a/Items/Potions/Food/Cometfruit.cs +++ b/Items/Potions/Food/Cometfruit.cs @@ -19,7 +19,8 @@ namespace CalamityMod.Items.Potions.Food new Color(147, 200, 221) }; ItemID.Sets.IsFood[Type] = true; - } + ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.Ambrosia; + } public override void SetDefaults() { @@ -28,4 +29,4 @@ namespace CalamityMod.Items.Potions.Food Item.rare = ItemRarityID.Blue; } } -} \ No newline at end of file +} diff --git a/Items/Potions/Food/Jackfruit.cs b/Items/Potions/Food/Jackfruit.cs index c586f0f319..97477e2b7e 100644 --- a/Items/Potions/Food/Jackfruit.cs +++ b/Items/Potions/Food/Jackfruit.cs @@ -19,7 +19,8 @@ namespace CalamityMod.Items.Potions.Food new Color(147, 176, 54) }; ItemID.Sets.IsFood[Type] = true; - } + ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.Ambrosia; + } public override void SetDefaults() { @@ -28,4 +29,4 @@ namespace CalamityMod.Items.Potions.Food Item.rare = ItemRarityID.Blue; } } -} \ No newline at end of file +} diff --git a/Items/Potions/Food/Lotus.cs b/Items/Potions/Food/Lotus.cs index e434603427..ecabc71b53 100644 --- a/Items/Potions/Food/Lotus.cs +++ b/Items/Potions/Food/Lotus.cs @@ -19,7 +19,8 @@ namespace CalamityMod.Items.Potions.Food new Color(233, 184, 87) }; ItemID.Sets.IsFood[Type] = true; - } + ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.Ambrosia; + } public override void SetDefaults() { @@ -28,4 +29,4 @@ namespace CalamityMod.Items.Potions.Food Item.rare = ItemRarityID.Blue; } } -} \ No newline at end of file +} diff --git a/Items/Potions/Food/Mangosteen.cs b/Items/Potions/Food/Mangosteen.cs index 44de848075..4c77a549b0 100644 --- a/Items/Potions/Food/Mangosteen.cs +++ b/Items/Potions/Food/Mangosteen.cs @@ -19,7 +19,8 @@ namespace CalamityMod.Items.Potions.Food new Color(123, 99, 130) }; ItemID.Sets.IsFood[Type] = true; - } + ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.Ambrosia; + } public override void SetDefaults() { @@ -28,4 +29,4 @@ namespace CalamityMod.Items.Potions.Food Item.rare = ItemRarityID.Blue; } } -} \ No newline at end of file +} diff --git a/Items/Potions/Food/Salak.cs b/Items/Potions/Food/Salak.cs index e9db4b7b65..8b99e2e4f3 100644 --- a/Items/Potions/Food/Salak.cs +++ b/Items/Potions/Food/Salak.cs @@ -19,7 +19,8 @@ namespace CalamityMod.Items.Potions.Food new Color(253, 242, 233) }; ItemID.Sets.IsFood[Type] = true; - } + ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.Ambrosia; + } public override void SetDefaults() { @@ -28,4 +29,4 @@ namespace CalamityMod.Items.Potions.Food Item.rare = ItemRarityID.Blue; } } -} \ No newline at end of file +} diff --git a/Items/TreasureBags/MiscGrabBags/StarterBag.cs b/Items/TreasureBags/MiscGrabBags/StarterBag.cs index b097c5c08f..0398fbda0c 100644 --- a/Items/TreasureBags/MiscGrabBags/StarterBag.cs +++ b/Items/TreasureBags/MiscGrabBags/StarterBag.cs @@ -53,12 +53,11 @@ namespace CalamityMod.Items.TreasureBags.MiscGrabBags itemLoot.Add(ItemID.Rope, 1, 50, 50); // Potions - itemLoot.Add(ItemID.MiningPotion); - itemLoot.Add(ItemID.SpelunkerPotion, 1, 2, 2); - itemLoot.Add(ItemID.SwiftnessPotion, 1, 3, 3); - itemLoot.Add(ItemID.GillsPotion, 1, 2, 2); - itemLoot.Add(ItemID.ShinePotion); + LeadingConditionRule multiplayer = itemLoot.DefineConditionalDropSet(() => Main.netMode == NetmodeID.MultiplayerClient); + itemLoot.Add(ItemID.MiningPotion, 1, 3, 3); + itemLoot.Add(ItemID.SpelunkerPotion, 1, 3, 3); itemLoot.Add(ItemID.RecallPotion, 1, 3, 3); + multiplayer.Add(ItemID.WormholePotion, 1, 3, 3); // Tiles itemLoot.Add(ItemID.Torch, 1, 25, 25); diff --git a/Items/Weapons/Magic/TheDanceofLight.cs b/Items/Weapons/Magic/TheDanceofLight.cs index 8da2a249d3..32f4211022 100644 --- a/Items/Weapons/Magic/TheDanceofLight.cs +++ b/Items/Weapons/Magic/TheDanceofLight.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 40; Item.height = 42; - Item.damage = 415; + Item.damage = 515; Item.knockBack = 4f; Item.DamageType = DamageClass.Magic; Item.mana = 6; diff --git a/Items/Weapons/Melee/IllustriousKnives.cs b/Items/Weapons/Melee/IllustriousKnives.cs index 3ed6cb2d52..4ccb3cde94 100644 --- a/Items/Weapons/Melee/IllustriousKnives.cs +++ b/Items/Weapons/Melee/IllustriousKnives.cs @@ -23,9 +23,9 @@ namespace CalamityMod.Items.Weapons.Melee Item.DamageType = DamageClass.MeleeNoSpeed; Item.noMelee = true; Item.noUseGraphic = true; - Item.useAnimation = 10; + Item.useAnimation = 8; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 10; + Item.useTime = 8; Item.knockBack = 3f; Item.UseSound = SoundID.Item39; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/SomaPrime.cs b/Items/Weapons/Ranged/SomaPrime.cs index f9ebdfcb3a..b1b9159bfd 100644 --- a/Items/Weapons/Ranged/SomaPrime.cs +++ b/Items/Weapons/Ranged/SomaPrime.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.width = 94; Item.height = 34; - Item.damage = 400; + Item.damage = 488; Item.DamageType = DamageClass.Ranged; Item.useAnimation = Item.useTime = 5; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Ranged/Svantechnical.cs b/Items/Weapons/Ranged/Svantechnical.cs index 8694699bc9..da30c36b85 100644 --- a/Items/Weapons/Ranged/Svantechnical.cs +++ b/Items/Weapons/Ranged/Svantechnical.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.width = 60; Item.height = 26; - Item.damage = 200; + Item.damage = 222; Item.DamageType = DamageClass.Ranged; Item.useTime = 1; Item.useAnimation = 3; diff --git a/Items/Weapons/Rogue/AntlionSkewer.cs b/Items/Weapons/Rogue/AntlionSkewer.cs index ca86a4eb67..81a55c114d 100644 --- a/Items/Weapons/Rogue/AntlionSkewer.cs +++ b/Items/Weapons/Rogue/AntlionSkewer.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 58; Item.height = 56; - Item.damage = 18; + Item.damage = 19; Item.DamageType = RogueDamageClass.Instance; Item.useAnimation = Item.useTime = 28; Item.knockBack = 2f; diff --git a/Items/Weapons/Rogue/UrchinStinger.cs b/Items/Weapons/Rogue/UrchinStinger.cs index a4fea72bfc..606271f7d4 100644 --- a/Items/Weapons/Rogue/UrchinStinger.cs +++ b/Items/Weapons/Rogue/UrchinStinger.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 10; Item.height = 26; - Item.damage = 9; + Item.damage = 13; Item.DamageType = RogueDamageClass.Instance; Item.useAnimation = Item.useTime = 17; Item.knockBack = 1.5f; @@ -41,15 +41,9 @@ namespace CalamityMod.Items.Weapons.Rogue if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike { - for (int i = 0; i < 3; i++) - { - newVel = velocity.RotatedByRandom(MathHelper.ToRadians(23f)); - int stealth = Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI); - if (stealth.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[stealth].Calamity().stealthStrike = true; - } - } + int proj = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); + if (player.Calamity().StealthStrikeAvailable()) + Main.projectile[proj].Calamity().stealthStrike = true; return false; } return true; diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 41b755beaa..8b41e4affb 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -309,21 +309,21 @@ namespace CalamityMod.NPCs #region Aquatic / Ocean // Pink Jellyfish - // Life Jelly @ 14.29% Normal, 25% Expert+ + // Life Jelly @ 10% Normal, 14.29% Expert+ case NPCID.PinkJellyfish: - npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 7, 4)); + npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 10, 7)); break; // Blue Jellyfish - // Cleansing Jelly @ 14.29% Normal, 25% Expert+ + // Cleansing Jelly @ 10% Normal, 14.29% Expert+ case NPCID.BlueJellyfish: - npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 7, 4)); + npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 10, 7)); break; // Green Jellyfish - // Vital Jelly @ 14.29% Normal, 25% Expert+ + // Vital Jelly @ 12.5% Normal, 20% Expert+ case NPCID.GreenJellyfish: - npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 7, 4)); + npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 8, 5)); break; // Shark @@ -509,7 +509,7 @@ namespace CalamityMod.NPCs case NPCID.MaggotZombie: case NPCID.TheBride: case NPCID.TheGroom: - npcLoot.Add(ModContent.ItemType(), 10); + postEoC.Add(ModContent.ItemType(), 10); break; // Ghost Bracelet @ 5% (Dandy requests this drops at a "high chance" but inventory clutter is real so) @@ -519,13 +519,15 @@ namespace CalamityMod.NPCs #endregion #region Blood Moon - // All Blood Moon enemies + // After EoC, All Blood Moon enemies // Drop Blood Orbs @ 100% (25% for common enemies) case NPCID.BloodZombie: case NPCID.Drippler: - npcLoot.Add(ModContent.ItemType(), 4); + postEoC.Add(ModContent.ItemType(), 4); break; - + + //Hardmode enemies drop orbs even if EoC is not dead + //99% of players will not encounter this and challenge runners will appreciate it case NPCID.Clown: npcLoot.Add(ModContent.ItemType(), 1, 6, 12); break; @@ -534,11 +536,11 @@ namespace CalamityMod.NPCs // Bouncing Eyeball @ 10% Normal, 16.66% Expert+ case NPCID.EyeballFlyingFish: npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 10, 6)); - npcLoot.Add(ModContent.ItemType(), 1, 10, 12); + postEoC.Add(ModContent.ItemType(), 1, 10, 12); break; case NPCID.ZombieMerman: - npcLoot.Add(ModContent.ItemType(), 1, 10, 12); + postEoC.Add(ModContent.ItemType(), 1, 10, 12); break; case NPCID.GoblinShark: diff --git a/NPCs/VanillaNPCAIOverrides/RegularEnemies/RevengeanceAndDeathAI.cs b/NPCs/VanillaNPCAIOverrides/RegularEnemies/RevengeanceAndDeathAI.cs index 28e2b59b33..12cb14f419 100644 --- a/NPCs/VanillaNPCAIOverrides/RegularEnemies/RevengeanceAndDeathAI.cs +++ b/NPCs/VanillaNPCAIOverrides/RegularEnemies/RevengeanceAndDeathAI.cs @@ -7900,6 +7900,7 @@ PrepareToShoot: npc.velocity.Y -= 6f; } } + else if (npc.type == NPCID.Tumbleweed && npc.velocity.Y == 0f && Math.Abs(npc.velocity.X) > 3f && ((npc.Center.X < Main.player[npc.target].Center.X && npc.velocity.X > 0f) || (npc.Center.X > Main.player[npc.target].Center.X && npc.velocity.X < 0f))) { npc.velocity.Y -= 6f; @@ -7956,7 +7957,11 @@ PrepareToShoot: if (!flag && (npc.velocity.Y == 0f || npc.wet || (npc.velocity.X <= 0f && npc.direction < 0) || (npc.velocity.X >= 0f && npc.direction > 0))) { - if (npc.type == NPCID.Wolf || npc.type == ModContent.NPCType()) + if (npc.type == ModContent.NPCType()) + { + npc.velocity.X *= 0.99f; + } + if (npc.type == NPCID.Wolf) { if (npc.velocity.X > 0f && npc.direction < 0) { @@ -7971,11 +7976,11 @@ PrepareToShoot: { if (npc.velocity.X > 0f && npc.direction < 0) { - npc.velocity.X *= 0.8f; + npc.velocity.X *= 0.2f; } if (npc.velocity.X < 0f && npc.direction > 0) { - npc.velocity.X *= 0.8f; + npc.velocity.X *= 0.2f; } if (npc.direction > 0 && npc.velocity.X < 3f) { diff --git a/Projectiles/Magic/FireImplosion.cs b/Projectiles/Magic/FireImplosion.cs index 8f73984e37..83de69cf6c 100644 --- a/Projectiles/Magic/FireImplosion.cs +++ b/Projectiles/Magic/FireImplosion.cs @@ -113,10 +113,8 @@ namespace CalamityMod.Projectiles.Magic float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); modifiers.SourceDamage *= damageMult * (frigidFlash ? 0.5f : 1); // Frigidflash explosion are spawned at full power, so their damage is reduced here - if (target.CanBeMoved(false)) // The vortex sucks in enemies - { - target.velocity = (-pushVelocity); - } + // The vortex sucks in enemies + target.MoveNPC(-pushVelocity, customKnockback, frigidFlash); } public override void OnKill(int timeLeft) { diff --git a/Projectiles/Magic/PhantasmalFuryProj.cs b/Projectiles/Magic/PhantasmalFuryProj.cs index 92135f00a6..8eb1c426c2 100644 --- a/Projectiles/Magic/PhantasmalFuryProj.cs +++ b/Projectiles/Magic/PhantasmalFuryProj.cs @@ -102,12 +102,9 @@ namespace CalamityMod.Projectiles.Magic modifiers.SourceDamage *= (launched ? 1f : 0.4f); Player Owner = Main.player[Projectile.owner]; - if (target.CanBeMoved(true)) - { - // Custom knockback - Vector2 launchVel = (Owner.Center - target.Center).SafeNormalize(Vector2.UnitY) * -10 * (launched ? 0.5f : 1); - target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f); - } + + Vector2 launchVel = (Owner.Center - target.Center).SafeNormalize(Vector2.UnitY) * -10 * (launched ? 0.5f : 1); + target.MoveNPC(launchVel, 10 * (launched ? 0.5f : 1), true); } public override void OnKill(int timeLeft) diff --git a/Projectiles/Magic/Phantom.cs b/Projectiles/Magic/Phantom.cs index f3cd1a7704..34b9525e3e 100644 --- a/Projectiles/Magic/Phantom.cs +++ b/Projectiles/Magic/Phantom.cs @@ -104,12 +104,10 @@ namespace CalamityMod.Projectiles.Magic modifiers.SourceDamage *= (launched ? 1f : 0.4f); Player Owner = Main.player[Projectile.owner]; - if (target.CanBeMoved(true)) - { - // Custom knockback - Vector2 launchVel = (Owner.Center - target.Center).SafeNormalize(Vector2.UnitY) * -10 * (launched ? 0.5f : 1); - target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f); - } + + Vector2 launchVel = Utils.DirectionTo(Owner.Center, target.Center); + target.MoveNPC(launchVel, 10 * (launched ? 0.5f : 1), true); + } public override void OnKill(int timeLeft) { diff --git a/Projectiles/Magic/SHPB.cs b/Projectiles/Magic/SHPB.cs index b5e8b92d14..5713663db6 100644 --- a/Projectiles/Magic/SHPB.cs +++ b/Projectiles/Magic/SHPB.cs @@ -191,7 +191,7 @@ namespace CalamityMod.Projectiles.Magic { // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction Vector2 launchVel = (owner.Calamity().mouseWorld - owner.Center).SafeNormalize(Vector2.UnitY) * SHPC.MightKnockbackStrength - new Vector2(0, 3); - target.velocity = launchVel; + target.MoveNPC(launchVel, SHPC.MightKnockbackStrength, false); } } diff --git a/Projectiles/Magic/SHPExplosion.cs b/Projectiles/Magic/SHPExplosion.cs index 0dd7e51717..7b64dbe4e0 100644 --- a/Projectiles/Magic/SHPExplosion.cs +++ b/Projectiles/Magic/SHPExplosion.cs @@ -80,7 +80,8 @@ namespace CalamityMod.Projectiles.Magic // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction Player owner = Main.player[Projectile.owner]; Vector2 launchVel = (owner.Calamity().mouseWorld - owner.Center).SafeNormalize(Vector2.UnitY) * SHPC.MightKnockbackStrength - new Vector2(0, 3); - target.velocity = launchVel; + + target.MoveNPC(launchVel, SHPC.MightKnockbackStrength, false); } } diff --git a/Projectiles/Melee/BasherHoldout.cs b/Projectiles/Melee/BasherHoldout.cs index 8c01cc7d13..1e2b9dd04c 100644 --- a/Projectiles/Melee/BasherHoldout.cs +++ b/Projectiles/Melee/BasherHoldout.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Melee mousePos = Owner.Calamity().mouseWorld; } - if (CanHit) + if (CanHit && Owner.Calamity().mouseRight) fadeIn = MathHelper.Lerp(fadeIn, 1, 0.1f); else fadeIn = MathHelper.Lerp(fadeIn, 0, 0.15f); @@ -141,7 +141,7 @@ namespace CalamityMod.Projectiles.Melee { CanHit = true; - Vector2 particleVel = new Vector2(0, 10 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)); + Vector2 particleVel = new Vector2(0, 7 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)); Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(10, 90), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); Dust dust = Dust.NewDustPerfect(particlePos, 79); @@ -162,11 +162,13 @@ namespace CalamityMod.Projectiles.Melee if (CanHit) { - for (int i = 0; i < 2; i++) + for (int i = 0; i < (Owner.Calamity().mouseRight ? 3 : 2); i++) { - Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(90, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), DustID.JungleTorch, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 0.5f)); - dust2.scale = Main.rand.NextFloat(0.55f, 0.85f); - dust2.noGravity = true; + Vector2 dustPos = Owner.Center + (new Vector2(90, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)); + Dust dust2 = Dust.NewDustPerfect(dustPos, i == 2 ? 278 : DustID.JungleTorch, Utils.DirectionTo(Owner.Center, dustPos) * Main.rand.NextFloat(1.2f, 2.5f)); + dust2.scale = Main.rand.NextFloat(0.55f, 0.85f) * (Owner.Calamity().mouseRight ? 1.3f : 1); + dust2.noGravity = i == 2 ? false : true; + dust2.color = i == 2 ? Color.Chartreuse : default; } } } @@ -187,22 +189,22 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(ModContent.BuffType(), 300); target.AddBuff(BuffID.Poisoned, 90); - if (target.CanBeMoved(true)) - { - // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction - // Launch - Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -12; - target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f); - } + Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); + target.MoveNPC(launchVel, 7.5f * (Owner.Calamity().mouseRight ? 2.5f : 1), true); + if (Owner.Calamity().mouseRight) { + Owner.Calamity().GeneralScreenShakePower = 1.2f; + SoundStyle fire3 = new("CalamityMod/Sounds/Item/HolyFireBulletExplosion"); SoundEngine.PlaySound(fire3 with { Volume = 0.35f, Pitch = 0.7f }, Projectile.Center); for (int i = 0; i < MathHelper.Clamp(15 - Projectile.numHits * 3, 2, 15); i++) { - Dust dust2 = Dust.NewDustPerfect(target.Center, DustID.JungleTorch, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(3.5f, 7f)); - dust2.scale = Main.rand.NextFloat(0.65f, 1.35f); + bool dType = i % 4 == 0; + Dust dust2 = Dust.NewDustPerfect(target.Center, dType ? 278 : DustID.JungleTorch, launchVel.RotatedByRandom(0.5f) * Main.rand.NextFloat(3.5f, 7f) * (dType ? 2 : 1)); + dust2.scale = Main.rand.NextFloat(0.65f, 1.35f) * (dType ? 0.7f : 1f); dust2.noGravity = true; + dust2.color = dType ? Color.Chartreuse : default; } // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction Vector2 playerLaunchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * 10; @@ -232,6 +234,13 @@ namespace CalamityMod.Projectiles.Melee float r = FlipAsSword ? MathHelper.ToRadians(90) : 0f; + for (int i = 0; i < 8; i++) + { + Color auraColor = Color.Chartreuse with { A = 0 } * 0.35f * fadeIn; + Vector2 drawOffset = (MathHelper.TwoPi * i / 8f).ToRotationVector2() * 8 * fadeIn; + Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + drawOffset + new Vector2(0, Owner.gfxOffY), tex.Frame(1, FrameCount, 0, Frame), auraColor, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(tex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); + } + Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), tex.Frame(1, FrameCount, 0, Frame), lightColor, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(tex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); } return false; diff --git a/Projectiles/Melee/CometQuasherHoldout.cs b/Projectiles/Melee/CometQuasherHoldout.cs index a73f83d5a2..5ca4ddee4d 100644 --- a/Projectiles/Melee/CometQuasherHoldout.cs +++ b/Projectiles/Melee/CometQuasherHoldout.cs @@ -204,12 +204,8 @@ namespace CalamityMod.Projectiles.Melee SoundStyle fire2 = new("CalamityMod/Sounds/Item/MagicRockSound"); SoundEngine.PlaySound(fire2 with { Volume = 0.55f, Pitch = 0.7f }, Projectile.Center); - if (target.CanBeMoved(true)) - { - // Launch - Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -11; - target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f); - } + Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); + target.MoveNPC(launchVel, 11, true); for (int i = 0; i < MathHelper.Clamp(6 - Projectile.numHits * 2, 2, 6); i++) { diff --git a/Projectiles/Melee/DragoonBigBolt.cs b/Projectiles/Melee/DragoonBigBolt.cs index 57c5bbc58f..5ed32691a3 100644 --- a/Projectiles/Melee/DragoonBigBolt.cs +++ b/Projectiles/Melee/DragoonBigBolt.cs @@ -126,12 +126,9 @@ namespace CalamityMod.Projectiles.Melee GeneralParticleHandler.SpawnParticle(orb2); } } - if (target.CanBeMoved(true)) - { - // Launch - Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center).SafeNormalize(Vector2.UnitY) * -20; - target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f); - } + + Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center); + target.MoveNPC(launchVel, 20, true); } } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 45 * sizeMult * (Projectile.numHits > 0 ? 6 : 1), targetHitbox); diff --git a/Projectiles/Melee/EarthHoldout.cs b/Projectiles/Melee/EarthHoldout.cs index 78f36d9245..acd0ef96a1 100644 --- a/Projectiles/Melee/EarthHoldout.cs +++ b/Projectiles/Melee/EarthHoldout.cs @@ -257,12 +257,8 @@ namespace CalamityMod.Projectiles.Melee if ((damageDone <= 2 || (target.life <= 0 && target.realLife == -1)) && Projectile.numHits > 0) Projectile.numHits -= 1; - if (target.CanBeMoved(true)) - { - // Launch - Vector2 launchVel = (Projectile.ai[1] != 1 ? Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld) : Utils.DirectionTo(Owner.Center, target.Center)) * 37; - target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f); - } + Vector2 launchVel = (Projectile.ai[1] != 1 ? Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld) : Utils.DirectionTo(Owner.Center, target.Center)); + target.MoveNPC(launchVel, 37, true); if (spawnBoom) { @@ -301,8 +297,9 @@ namespace CalamityMod.Projectiles.Melee spawnBoom = false; } - int heal = (int)(MathHelper.Clamp(85 - Projectile.numHits * 65, 1, 85)); - if (Projectile.numHits < 15) + int healPower = (Projectile.ai[1] == -1 ? 100 : 85); + int heal = (int)(MathHelper.Clamp(healPower - Projectile.numHits * 75, 1, healPower)); + if (Projectile.numHits < 10) { Owner.HealPlayer(heal); } diff --git a/Projectiles/Melee/GrandDadHoldout.cs b/Projectiles/Melee/GrandDadHoldout.cs index 769789e314..9349fb84ee 100644 --- a/Projectiles/Melee/GrandDadHoldout.cs +++ b/Projectiles/Melee/GrandDadHoldout.cs @@ -242,8 +242,8 @@ namespace CalamityMod.Projectiles.Melee target.noTileCollide = false; // Launch the suckers - Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * (Main.zenithWorld ? -50 : -30) * (rightClicked ? 2 : 1); - target.velocity = launchVel * 0.5f; + Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); + target.MoveNPC(launchVel, (Main.zenithWorld ? 50 : 30) * (rightClicked ? 2 : 1), true); // Remove knockback resist, just like it used to target.knockBackResist = 1; diff --git a/Projectiles/Melee/GrandGuardianHoldout.cs b/Projectiles/Melee/GrandGuardianHoldout.cs index 4ea09387e7..5f95165126 100644 --- a/Projectiles/Melee/GrandGuardianHoldout.cs +++ b/Projectiles/Melee/GrandGuardianHoldout.cs @@ -193,12 +193,8 @@ namespace CalamityMod.Projectiles.Melee if ((damageDone <= 2 || (target.life <= 0 && target.realLife == -1)) && Projectile.numHits > 0) Projectile.numHits -= 1; - if (target.CanBeMoved(false)) - { - // Launch - Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -8; - target.velocity = launchVel; - } + Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); + target.MoveNPC(launchVel, 8, true); if (spawnBoom) { diff --git a/Projectiles/Melee/HellkiteHoldout.cs b/Projectiles/Melee/HellkiteHoldout.cs index 494c99114e..be6343049d 100644 --- a/Projectiles/Melee/HellkiteHoldout.cs +++ b/Projectiles/Melee/HellkiteHoldout.cs @@ -411,12 +411,8 @@ namespace CalamityMod.Projectiles.Melee } } - if (target.CanBeMoved(true)) - { - // Custom knockback - Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * (chargedSwing ? -24 : -19); - target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f); - } + Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); + target.MoveNPC(launchVel, (chargedSwing ? 24 : 19), true); } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { diff --git a/Projectiles/Melee/HolyColliderHoldout.cs b/Projectiles/Melee/HolyColliderHoldout.cs index 88b15b7092..483b0807d4 100644 --- a/Projectiles/Melee/HolyColliderHoldout.cs +++ b/Projectiles/Melee/HolyColliderHoldout.cs @@ -346,8 +346,8 @@ namespace CalamityMod.Projectiles.Melee Projectile projectile = Main.projectile[x]; if (Vector2.Distance(Owner.Center + (new Vector2(100, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))), projectile.Center) <= 100 && projectile.active && projectile.type == ModContent.ProjectileType() && projectile.ai[0] != 10) { - Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -2.5f; - projectile.velocity += launchVel; + Vector2 launch = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -2.5f; + projectile.velocity += launch; projectile.timeLeft = 300; projectile.owner = Owner.whoAmI; Particle orb2 = new CustomPulse(projectile.Center, Vector2.Zero, Color.Goldenrod, "CalamityMod/Particles/BloomRing", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 0.8f, 11); @@ -415,12 +415,8 @@ namespace CalamityMod.Projectiles.Melee } } - if (target.CanBeMoved(true)) - { - // Custom knockback - Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * (chargedSwing ? -35 : -23); - target.velocity = launchVel * (target.knockBackResist == 0 ? 0.3f : 1f); - } + Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); + target.MoveNPC(launchVel, (chargedSwing ? 35 : 23), true); } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { diff --git a/Projectiles/Melee/MajesticGuardHoldout.cs b/Projectiles/Melee/MajesticGuardHoldout.cs index 07b37fb4f0..c0a1cf85c9 100644 --- a/Projectiles/Melee/MajesticGuardHoldout.cs +++ b/Projectiles/Melee/MajesticGuardHoldout.cs @@ -192,12 +192,8 @@ namespace CalamityMod.Projectiles.Melee Owner.HealPlayer(heal); } - if (target.CanBeMoved(true)) - { - // Launch - Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -15; - target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f); - } + Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); + target.MoveNPC(launchVel, 15, true); for (int i = 0; i < MathHelper.Clamp(6 - Projectile.numHits * 2, 2, 6); i++) { diff --git a/Projectiles/Melee/SkytideDragoonHoldout.cs b/Projectiles/Melee/SkytideDragoonHoldout.cs index 64172d9a2d..9d0c626cb5 100644 --- a/Projectiles/Melee/SkytideDragoonHoldout.cs +++ b/Projectiles/Melee/SkytideDragoonHoldout.cs @@ -297,12 +297,8 @@ namespace CalamityMod.Projectiles.Melee SoundStyle fire2 = new("CalamityMod/Sounds/Custom/DefenseDamage"); SoundEngine.PlaySound(fire2 with { Volume = 0.65f, Pitch = 0.4f }, Projectile.Center); - if (target.CanBeMoved(true)) - { - // Launch - Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -23; - target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f); - } + Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); + target.MoveNPC(launchVel, 23, true); target.AddBuff(BuffID.Electrified, 230); } diff --git a/Projectiles/Melee/StellarStrikerHoldout.cs b/Projectiles/Melee/StellarStrikerHoldout.cs index ad92875bed..422b2e3936 100644 --- a/Projectiles/Melee/StellarStrikerHoldout.cs +++ b/Projectiles/Melee/StellarStrikerHoldout.cs @@ -200,12 +200,8 @@ namespace CalamityMod.Projectiles.Melee SoundStyle fire2 = new("CalamityMod/Sounds/Item/MagicRockSound"); SoundEngine.PlaySound(fire2 with { Volume = 0.55f, Pitch = 0.6f }, Projectile.Center); - if (target.CanBeMoved(true)) - { - // Launch - Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -17; - target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f); - } + Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); + target.MoveNPC(launchVel, 17, true); for (int i = 0; i < MathHelper.Clamp(10 - Projectile.numHits * 2, 2, 10); i++) { diff --git a/Projectiles/Melee/TriactisHammerProj.cs b/Projectiles/Melee/TriactisHammerProj.cs index 15c555b76b..1c22309d4c 100644 --- a/Projectiles/Melee/TriactisHammerProj.cs +++ b/Projectiles/Melee/TriactisHammerProj.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Melee public static readonly SoundStyle SmashSoundGFB = new("CalamityMod/Sounds/Item/TF2PanHit"); public static float ExplosionDamageKBMult = 2f; - public static float SuperHammerDamageMult = 4f; + public static float SuperHammerDamageMult = 3f; public static float SmashHomingRange = 800f; // 50 tiles public static float WindUpTime = 216f; // 1.2 seconds public static float ConvergeTime = 18f; // 0.1 seconds diff --git a/Projectiles/Ranged/ChargedBlast.cs b/Projectiles/Ranged/ChargedBlast.cs index abb9c2c20f..6f0cbfa965 100644 --- a/Projectiles/Ranged/ChargedBlast.cs +++ b/Projectiles/Ranged/ChargedBlast.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Ranged } baseVel = Projectile.velocity; if (Svant) - Projectile.ArmorPenetration = 100; + Projectile.ArmorPenetration = 200; if (Infinity) Projectile.ArmorPenetration = 25; } diff --git a/Projectiles/Ranged/HellbornProj.cs b/Projectiles/Ranged/HellbornProj.cs index 288d075844..357bbad717 100644 --- a/Projectiles/Ranged/HellbornProj.cs +++ b/Projectiles/Ranged/HellbornProj.cs @@ -82,12 +82,10 @@ namespace CalamityMod.Projectiles.Ranged public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { Player Owner = Main.player[Projectile.owner]; - if (target.CanBeMoved(true)) - { - // Launch - Vector2 launchVel = (Projectile.Center - target.Center).SafeNormalize(Vector2.UnitY) * -17; - target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f); - } + + // Launch + Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center); + target.MoveNPC(launchVel, 6, true); } public override void OnKill(int timeLeft) { diff --git a/Projectiles/Ranged/NullFlash.cs b/Projectiles/Ranged/NullFlash.cs index 5e3f49a99d..1b9bae9402 100644 --- a/Projectiles/Ranged/NullFlash.cs +++ b/Projectiles/Ranged/NullFlash.cs @@ -68,13 +68,9 @@ namespace CalamityMod.Projectiles.Ranged SoundStyle fire = new("CalamityMod/Sounds/Item/NullImpact"); SoundEngine.PlaySound(fire with { Volume = 0.5f, Pitch = 0.5f }, Projectile.Center); } - if (target.CanBeMoved(true)) - { - // 15NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction - // Custom knockback - Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -20; - target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f); - } + + Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); + target.MoveNPC(launchVel, 20, true); } public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/Rogue/DoomsdayDeviceProjectile.cs b/Projectiles/Rogue/DoomsdayDeviceProjectile.cs index db370d7ed7..cd6fc21372 100644 --- a/Projectiles/Rogue/DoomsdayDeviceProjectile.cs +++ b/Projectiles/Rogue/DoomsdayDeviceProjectile.cs @@ -331,11 +331,8 @@ namespace CalamityMod.Projectiles.Rogue { Vector2 launchDir = Utils.DirectionTo(Projectile.Center, target.Center); float launchPower = ((hasReachedFullCharge ? 9 : 0) + charge * 1.5f) * finalHitMult; - if (target.CanBeMoved(true)) - { - // Custom knockback - target.velocity = launchDir * launchPower * (target.knockBackResist == 0 ? 0.5f : 1f); - } + + target.MoveNPC(launchDir, launchPower, true); float extraPitch = (Owner.Calamity().rogueStealthMax > 0 ? (0.25f * (Owner.Calamity().rogueStealth / Owner.Calamity().rogueStealthMax)) : 0); diff --git a/Projectiles/Rogue/SupernovaBoom.cs b/Projectiles/Rogue/SupernovaBoom.cs index 0a285d4df6..c2e12a9887 100644 --- a/Projectiles/Rogue/SupernovaBoom.cs +++ b/Projectiles/Rogue/SupernovaBoom.cs @@ -170,7 +170,7 @@ namespace CalamityMod.Projectiles.Rogue } } - if (currentFrame < 13) + if (currentFrame < 13) // suck in enemies, or you if it's GFB { if (Main.zenithWorld) { @@ -183,7 +183,10 @@ namespace CalamityMod.Projectiles.Rogue if (target.CanBeMoved(true) && target.CanBeChasedBy(Projectile, false)) { if (Vector2.Distance(target.Center, Projectile.Center) > 40 && Vector2.Distance(target.Center, Projectile.Center) < 600) + { target.Center += target.Center.DirectionTo(Projectile.Center).SafeNormalize(Vector2.UnitX) * 22; + target.SyncMotionToServer(); + } } else if (target != null && CalamityPlayer.areThereAnyDamnBosses) { @@ -226,11 +229,9 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - if (!target.boss && target.IsAnEnemy(true, true) && !CalamityPlayer.areThereAnyDamnBosses && target.CanBeChasedBy(Projectile, false) && target != null) - { - Vector2 velToApply = target.Center.DirectionFrom(Projectile.Center).SafeNormalize(Vector2.UnitX) * 30; - target.velocity = velToApply + (velToApply.Y <= 0 ? new Vector2(0, -5) : Vector2.Zero); - } + Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center); + target.MoveNPC(launchVel, 30, true); + target.AddBuff(ModContent.BuffType(), 90); } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) diff --git a/Projectiles/Rogue/SupernovaStealthBoom.cs b/Projectiles/Rogue/SupernovaStealthBoom.cs index 8be9e7c970..d2f46b2302 100644 --- a/Projectiles/Rogue/SupernovaStealthBoom.cs +++ b/Projectiles/Rogue/SupernovaStealthBoom.cs @@ -227,7 +227,7 @@ namespace CalamityMod.Projectiles.Rogue } } - if (time < 80) + if (time < 80) // Suck in enemies { for (int i = 0; i < Main.maxNPCs; i++) { @@ -238,6 +238,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Vector2.Distance(target.Center, Projectile.Center) > 40 && Vector2.Distance(target.Center, Projectile.Center) < 2000) target.Center += target.Center.DirectionTo(Projectile.Center).SafeNormalize(Vector2.UnitX) * 38; + target.SyncMotionToServer(); } } } @@ -293,11 +294,8 @@ namespace CalamityMod.Projectiles.Rogue dust2.color = Color.Lerp(Color.White, randomColor, 0.9f); } - if (!target.boss && target.IsAnEnemy(true, true) && !CalamityPlayer.areThereAnyDamnBosses && target.CanBeChasedBy(Projectile, false) && target != null) - { - Vector2 velToApply = target.Center.DirectionFrom(Projectile.Center).SafeNormalize(Vector2.UnitX) * 40; - target.velocity = velToApply + (velToApply.Y <= 0 ? new Vector2(0, -5) : Vector2.Zero); - } + Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center); + target.MoveNPC(launchVel, 60, true); } } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) // Add to regular plz diff --git a/Projectiles/Rogue/WhitewaterAura.cs b/Projectiles/Rogue/WhitewaterAura.cs index b56b74e0ba..954ae22133 100644 --- a/Projectiles/Rogue/WhitewaterAura.cs +++ b/Projectiles/Rogue/WhitewaterAura.cs @@ -68,12 +68,9 @@ namespace CalamityMod.Projectiles.Rogue { target.AddBuff(BuffID.Wet, 300); target.AddBuff(ModContent.BuffType(), 300); - if (target.CanBeMoved(true)) - { - // Launch - Vector2 launchVel = (Projectile.Center - target.Center).SafeNormalize(Vector2.UnitY) * -6; - target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f); - } + + Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center); + target.MoveNPC(launchVel, 6, true); } public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/Summon/BrittleStarMinion.cs b/Projectiles/Summon/BrittleStarMinion.cs index d823ff07f2..c9feccb7dc 100644 --- a/Projectiles/Summon/BrittleStarMinion.cs +++ b/Projectiles/Summon/BrittleStarMinion.cs @@ -209,12 +209,8 @@ namespace CalamityMod.Projectiles.Summon float damageMult = MinionBuffMode ? 2f : 1; modifiers.SourceDamage *= damageMult; - if (target.CanBeMoved(false)) - { - // Custom knockback - Vector2 launchVel = Utils.DirectionTo(Owner.Center, target.Center) * (MinionBuffMode ? 5f : 0.5f); - target.velocity = launchVel; - } + Vector2 launchVel = Utils.DirectionTo(Owner.Center, target.Center); + target.MoveNPC(launchVel, (MinionBuffMode ? 5f : 0.5f), false); } public override bool MinionContactDamage() => !Reforming; } diff --git a/Projectiles/Typeless/LeviAmberDash.cs b/Projectiles/Typeless/LeviAmberDash.cs index 1a8559097a..ce78561a5f 100644 --- a/Projectiles/Typeless/LeviAmberDash.cs +++ b/Projectiles/Typeless/LeviAmberDash.cs @@ -35,13 +35,8 @@ namespace CalamityMod.Projectiles.Typeless public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - if (target.CanBeMoved(true)) - { - // 15NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction - // Launch - Vector2 launchVel = (Owner.Calamity().mouseWorld - target.Center).SafeNormalize(Vector2.UnitY) * 16; - target.velocity = launchVel; - } + Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); + target.MoveNPC(launchVel, 16, true); target.AddBuff(BuffID.Wet, 300); target.AddBuff(ModContent.BuffType(), 180); diff --git a/Projectiles/Typeless/PauldronExplosion.cs b/Projectiles/Typeless/PauldronExplosion.cs index ee33729569..ee02ad48c7 100644 --- a/Projectiles/Typeless/PauldronExplosion.cs +++ b/Projectiles/Typeless/PauldronExplosion.cs @@ -46,12 +46,8 @@ namespace CalamityMod.Projectiles.Typeless public override bool? CanDamage() => base.CanDamage(); public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - if (target.CanBeMoved(true)) - { - // Custom knockback - Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld) * 15; - target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f); - } + Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); + target.MoveNPC(launchVel, 15, true); } public override bool? CanCutTiles() => false; diff --git a/Projectiles/Typeless/TransformerBlob.cs b/Projectiles/Typeless/TransformerBlob.cs index bb62822e53..259d3e7eae 100644 --- a/Projectiles/Typeless/TransformerBlob.cs +++ b/Projectiles/Typeless/TransformerBlob.cs @@ -208,8 +208,7 @@ namespace CalamityMod.Projectiles.Typeless else modifiers.SourceDamage *= 0.2f; - if (target.CanBeMoved(true)) - target.velocity = Utils.DirectionTo(Owner.Center, target.Center) * (poweredTimer == 0 ? 7 : 3) * (target.knockBackResist == 0 ? 0.5f : 1f); + target.MoveNPC(Utils.DirectionTo(Owner.Center, target.Center), (poweredTimer == 0 ? 7 : 3)); if (Projectile.numHits == 0 && poweredTimer == 0) { diff --git a/Tiles/CalamityGlobalTile.cs b/Tiles/CalamityGlobalTile.cs index a52b059417..2a53c44771 100644 --- a/Tiles/CalamityGlobalTile.cs +++ b/Tiles/CalamityGlobalTile.cs @@ -38,6 +38,10 @@ namespace CalamityMod.Tiles { Main.tileSpelunker[TileID.LunarOre] = true; Main.tileOreFinderPriority[TileID.LunarOre] = 900; + + // Allow Queen Bee larvae to be protected by Guide to Environmental Protection + // Yes this naming is backwards. Do not blame me! + TileID.Sets.TileCutIgnore.IgnoreDontHurtNature[TileID.Larva] = true; } public override void KillTile(int i, int j, int type, ref bool fail, ref bool effectOnly, ref bool noItem) @@ -319,10 +323,10 @@ namespace CalamityMod.Tiles DropItem(i, j, ModContent.ItemType(), quantity: 1, asStack: true); } } - // Drop Golden Bombs at a 1.75% chance from Pots + // Drop Golden Bombs at a 0.5% chance from Pots if (type == TileID.Pots) { - if (Main.rand.NextBool(57)) + if (Main.rand.NextBool(200)) { DropItem(i, j, ModContent.ItemType(), quantity: 1, asStack: true); } diff --git a/Utilities/NPCUtils.cs b/Utilities/NPCUtils.cs index b8070b7235..bddf8b9e8d 100644 --- a/Utilities/NPCUtils.cs +++ b/Utilities/NPCUtils.cs @@ -749,11 +749,11 @@ namespace CalamityMod { if (target.CanBeMoved(ignoreKBImmune)) { - // Launch Vector2 launchVel = direction.SafeNormalize(Vector2.UnitX) * strength; float knockbackMult = Utils.Remap(target.knockBackResist, 0, 1, 0.5f, 1f, false); target.velocity = launchVel * (knockbackMult > 1 ? (float)Math.Pow(knockbackMult, 10) : knockbackMult); } + target.SyncMotionToServer(); } public static void Inflict246DebuffsNPC(NPC target, int buff, float timeBase = 2f) {