From c79830b69b71e8d509fe0a886ce1ae185fea59c1 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Thu, 31 Aug 2023 18:58:50 -0600 Subject: [PATCH 1/5] Fixed Utensil Poker only firing forks and made the order of utensils static --- Items/Weapons/Rogue/UtensilPoker.cs | 15 ++++++++------- .../Mods.CalamityMod.Items.Weapons.Rogue.hjson | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Items/Weapons/Rogue/UtensilPoker.cs b/Items/Weapons/Rogue/UtensilPoker.cs index 1ace51a26d..ba75465275 100644 --- a/Items/Weapons/Rogue/UtensilPoker.cs +++ b/Items/Weapons/Rogue/UtensilPoker.cs @@ -5,6 +5,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Particles; namespace CalamityMod.Items.Weapons.Rogue { @@ -45,23 +46,23 @@ namespace CalamityMod.Items.Weapons.Rogue } else { - int utensil = ModContent.ProjectileType(); + type = ModContent.ProjectileType(); double dmgMult = 1D; float kbMult = 1f; - switch (Main.rand.Next(3)) + switch (counter) { case 0: - utensil = ModContent.ProjectileType(); + type = ModContent.ProjectileType(); dmgMult = 1.1; kbMult = 2f; break; case 1: - utensil = ModContent.ProjectileType(); + type = ModContent.ProjectileType(); dmgMult = 1.2; kbMult = 1f; break; case 2: - utensil = ModContent.ProjectileType(); + type = ModContent.ProjectileType(); dmgMult = 1D; kbMult = 1f; break; @@ -70,7 +71,8 @@ namespace CalamityMod.Items.Weapons.Rogue } damage = (int)(damage * dmgMult); knockback = knockback * kbMult; - } + + } } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) @@ -80,7 +82,6 @@ namespace CalamityMod.Items.Weapons.Rogue int idx = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); if (idx.WithinBounds(Main.maxProjectiles)) Main.projectile[idx].Calamity().stealthStrike = mp.StealthStrikeAvailable(); - counter++; if (counter == 3) counter = 0; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index d672b623a1..b75593716d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -1337,7 +1337,7 @@ UtensilPoker: { DisplayName: Utensil Poker Tooltip: ''' - Fires random utensils in bursts of three + Fires utensils in bursts of three Stealth strikes replace any utensil with a powerful butcher knife 'Space chickens, that is all' ''' From 0d020c260a162ebd57c9de8d184869fe8aaaffd8 Mon Sep 17 00:00:00 2001 From: AquaSG Date: Thu, 31 Aug 2023 22:28:57 -0400 Subject: [PATCH 2/5] restoring turret tooltips that were missing for some reason --- .../Mods.CalamityMod.Items.Placeables.hjson | 56 ++++++++++++++----- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 2 +- 2 files changed, 43 insertions(+), 15 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index d2815713ef..0f2df3541f 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -3930,70 +3930,98 @@ HardenedEutrophicSand: { FireTurret: { DisplayName: Fire Turret - Tooltip: "" + Tooltip: + ''' + Roasts nearby enemies with a flamethrower at full blast + Cannot attack while a boss is alive + ''' } HostileFireTurret: { DisplayName: Hostile Fire Turret - Tooltip: "" + Tooltip: Roasts nearby players with a flamethrower at full blast } HostileIceTurret: { DisplayName: Hostile Ice Turret - Tooltip: "" + Tooltip: Lobs fragile ice mist bombs at nearby players } HostileLabTurret: { DisplayName: Hostile Lab Turret - Tooltip: "" + Tooltip: Shoots laser beams at nearby players } HostileLaserTurret: { DisplayName: Hostile Laser Turret - Tooltip: "" + Tooltip: Blasts nearby players with lightning-fast laser beams } HostileOnyxTurret: { DisplayName: Hostile Onyx Turret - Tooltip: "" + Tooltip: Shoots a shotgun spread of bullets at nearby players } HostilePlagueTurret: { DisplayName: Hostile Plague Turret - Tooltip: "" + Tooltip: Ejects homing plague missiles towards nearby players } HostileWaterTurret: { DisplayName: Hostile Water Turret - Tooltip: "" + Tooltip: Shoots high-speed water blasts at nearby players } IceTurret: { DisplayName: Ice Turret - Tooltip: "" + Tooltip: + ''' + Lobs fragile ice mist bombs at nearby enemies + Cannot attack while a boss is alive + ''' } LabTurret: { DisplayName: Lab Turret - Tooltip: "" + Tooltip: + ''' + Shoots laser beams at nearby enemies + Cannot attack while a boss is alive + ''' } LaserTurret: { DisplayName: Laser Turret - Tooltip: "" + Tooltip: + ''' + Blasts nearby enemies with lightning-fast laser beams + Cannot attack while a boss is alive + ''' } OnyxTurret: { DisplayName: Onyx Turret - Tooltip: "" + Tooltip: + ''' + Shoots a shotgun spread of bullets at nearby enemies + Cannot attack while a boss is alive + ''' } PlagueTurret: { DisplayName: Plague Turret - Tooltip: "" + Tooltip: + ''' + Ejects homing plague missiles towards nearby enemies + Cannot attack while a boss is alive + ''' } WaterTurret: { DisplayName: Water Turret - Tooltip: "" + Tooltip: + ''' + Shoots high-speed water blasts at nearby enemies + Cannot attack while a boss is alive + ''' } \ No newline at end of file diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 65e8c606eb..b40cc452aa 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -1285,4 +1285,4 @@ WulfrumBlunderbuss: { [c/83B87E:'The good thing about Wulfrum is that while it breaks fast, it can be reused even faster.] [c/83B87E:In fact, it is quite common for a robot to be turned into ammo right after it stops functioning.'] ''' -} +} \ No newline at end of file From 88d9f92d52cffb1d3fea0b404d6a61a9406d5d82 Mon Sep 17 00:00:00 2001 From: Done2222 Date: Fri, 1 Sep 2023 07:20:42 +0300 Subject: [PATCH 3/5] Purity and Rampart of Deities recipe fixes --- Items/Accessories/Purity.cs | 4 ++-- Items/Accessories/RampartofDeities.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Accessories/Purity.cs b/Items/Accessories/Purity.cs index a0d2242d05..620e58a2c6 100644 --- a/Items/Accessories/Purity.cs +++ b/Items/Accessories/Purity.cs @@ -45,8 +45,8 @@ namespace CalamityMod.Items.Accessories CreateRecipe(). AddIngredient(). AddIngredient(). - AddIngredient(4). - AddIngredient(5). + AddIngredient(5). + AddIngredient(4). AddTile(ModContent.TileType()). Register(); } diff --git a/Items/Accessories/RampartofDeities.cs b/Items/Accessories/RampartofDeities.cs index 6ac921ae46..b3dfb4b051 100644 --- a/Items/Accessories/RampartofDeities.cs +++ b/Items/Accessories/RampartofDeities.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Items.Accessories AddIngredient(ItemID.FrozenShield). AddIngredient(). AddIngredient(5). - AddIngredient(5). + AddIngredient(4). AddTile(). Register(); } From 5cfc71cddf9ecc79f8c17ea99b9e0394ef9e7bf4 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Thu, 31 Aug 2023 22:57:31 -0600 Subject: [PATCH 4/5] Failsave for Utensil Poker's count reset --- Items/Weapons/Rogue/UtensilPoker.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/UtensilPoker.cs b/Items/Weapons/Rogue/UtensilPoker.cs index ba75465275..dba6b5b87e 100644 --- a/Items/Weapons/Rogue/UtensilPoker.cs +++ b/Items/Weapons/Rogue/UtensilPoker.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Items.Weapons.Rogue if (idx.WithinBounds(Main.maxProjectiles)) Main.projectile[idx].Calamity().stealthStrike = mp.StealthStrikeAvailable(); counter++; - if (counter == 3) + if (counter >= 3) counter = 0; return false; } From fcdc93c9f49e6513d6ae9d6b381ce04de493036a Mon Sep 17 00:00:00 2001 From: Mishiro Usui Date: Fri, 1 Sep 2023 13:25:28 +0100 Subject: [PATCH 5/5] Fixed shield sounds playing when they shouldn't --- CalPlayer/CalamityPlayerMiscEffects.cs | 3 +-- Cooldowns/CooldownHandler.cs | 5 +++++ Cooldowns/LunicCorpsShieldCooldowns.cs | 1 + Cooldowns/SpongeCooldowns.cs | 1 + Cooldowns/WulfrumRoverDriveCooldowns.cs | 3 ++- 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 9c195f13ba..b297593fea 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1152,7 +1152,7 @@ namespace CalamityMod.CalPlayer if (instance.timeLeft < 0) { handler.OnCompleted(); - if (handler.EndSound != null) + if (handler.EndSound != null && handler.ShouldPlayEndSound) SoundEngine.PlaySound(handler.EndSound.GetValueOrDefault()); expiredCooldowns.Add(id); } @@ -3612,7 +3612,6 @@ namespace CalamityMod.CalPlayer { CooldownInstance durabilityCooldown = Player.AddCooldown(WulfrumRoverDriveDurability.ID, RoverDrive.ShieldDurabilityMax); durabilityCooldown.timeLeft = RoverDriveShieldDurability; - SoundEngine.PlaySound(RoverDrive.ActivationSound, Player.Center); } // Add light if this shield is currently active diff --git a/Cooldowns/CooldownHandler.cs b/Cooldowns/CooldownHandler.cs index 4fe1a63e97..f9d83b7837 100644 --- a/Cooldowns/CooldownHandler.cs +++ b/Cooldowns/CooldownHandler.cs @@ -49,6 +49,11 @@ namespace CalamityMod.Cooldowns /// When the cooldown instance ends, this sound is played. Leave at null for no sound. /// public virtual SoundStyle? EndSound => null; + + /// + /// Set this to true to have the cooldown instance end sound play upon expiration. Defaults to true + /// + public virtual bool ShouldPlayEndSound => true; #endregion #region Display & Rendering diff --git a/Cooldowns/LunicCorpsShieldCooldowns.cs b/Cooldowns/LunicCorpsShieldCooldowns.cs index 8834314338..dbee30e4a1 100644 --- a/Cooldowns/LunicCorpsShieldCooldowns.cs +++ b/Cooldowns/LunicCorpsShieldCooldowns.cs @@ -90,6 +90,7 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion); public override Color CooldownEndColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion); public override SoundStyle? EndSound => LunicCorpsHelmet.ActivationSound; + public override bool ShouldPlayEndSound => instance.player.Calamity().lunicCorpsSet; public override void Tick() => instance.player.Calamity().playedLunicCorpsShieldSound = false; // When the recharge period completes, grant 1 point of shielding immediately so the rest my refill normally. diff --git a/Cooldowns/SpongeCooldowns.cs b/Cooldowns/SpongeCooldowns.cs index 6484749021..b9429b1bac 100644 --- a/Cooldowns/SpongeCooldowns.cs +++ b/Cooldowns/SpongeCooldowns.cs @@ -90,6 +90,7 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion); public override Color CooldownEndColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion); public override SoundStyle? EndSound => TheSponge.ActivationSound; + public override bool ShouldPlayEndSound => instance.player.Calamity().sponge; public override void Tick() => instance.player.Calamity().playedSpongeShieldSound = false; // When the recharge period completes, grant 1 point of shielding immediately so the rest my refill normally. diff --git a/Cooldowns/WulfrumRoverDriveCooldowns.cs b/Cooldowns/WulfrumRoverDriveCooldowns.cs index 894e7dd7f9..e4c6485992 100644 --- a/Cooldowns/WulfrumRoverDriveCooldowns.cs +++ b/Cooldowns/WulfrumRoverDriveCooldowns.cs @@ -98,6 +98,7 @@ namespace CalamityMod.Cooldowns if (modPlayer.roverDrive) modPlayer.RoverDriveShieldDurability = RoverDrive.ShieldDurabilityMax; } - public override SoundStyle? EndSound => null; + public override SoundStyle? EndSound => RoverDrive.ActivationSound; + public override bool ShouldPlayEndSound => instance.player.Calamity().roverDrive; } }