From 115ea116dcb1695dc0b3664fef1c211cb970497c Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 24 Jul 2024 16:30:10 -0400 Subject: [PATCH] Sand Cloak buff/rebalance * No longer requires rogue stealth to use, decreased cooldown from 30 seconds to 20 * Buffed veil base damage * Removed accessory's base defense boost and moved it to the sand veil defense boost * Changed veil's life regen boost to a crit chance boost --- CalPlayer/CalamityPlayer.cs | 11 +++++------ Items/Accessories/SandCloak.cs | 3 --- .../en-US/Mods.CalamityMod.Items.Accessories.hjson | 6 +++--- Projectiles/Typeless/SandCloakVeil.cs | 8 ++++---- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 7214819f90..e49c923993 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -2847,16 +2847,15 @@ namespace CalamityMod.CalPlayer Player.statLife = Player.statLifeMax2; } } - if (CalamityKeybinds.SandCloakHotkey.JustPressed && sandCloak && Main.myPlayer == Player.whoAmI && rogueStealth >= rogueStealthMax * 0.1f && - wearingRogueArmor && rogueStealthMax > 0 && !Player.HasCooldown(Cooldowns.SandCloak.ID)) + if (CalamityKeybinds.SandCloakHotkey.JustPressed && sandCloak && Main.myPlayer == Player.whoAmI && !Player.HasCooldown(Cooldowns.SandCloak.ID)) { - Player.AddCooldown(Cooldowns.SandCloak.ID, CalamityUtils.SecondsToFrames(30)); + Player.AddCooldown(Cooldowns.SandCloak.ID, CalamityUtils.SecondsToFrames(20)); var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType())); - rogueStealth -= rogueStealthMax * 0.1f; - int damage = Player.ApplyArmorAccDamageBonusesTo(7); + int damage = Player.ApplyArmorAccDamageBonusesTo(12); + float knockback = 2.5f; - int veil = Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 8, Player.whoAmI); + int veil = Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, Player.whoAmI); Main.projectile[veil].Center = Player.Center; SoundEngine.PlaySound(SoundID.Item45, Player.Center); } diff --git a/Items/Accessories/SandCloak.cs b/Items/Accessories/SandCloak.cs index 9097563d19..4f69f242e0 100644 --- a/Items/Accessories/SandCloak.cs +++ b/Items/Accessories/SandCloak.cs @@ -7,8 +7,6 @@ namespace CalamityMod.Items.Accessories { public class SandCloak : ModItem, ILocalizedModType { - public static float KnockbackStrength = 0.3f; - public new string LocalizationCategory => "Items.Accessories"; public override void SetDefaults() { @@ -17,7 +15,6 @@ namespace CalamityMod.Items.Accessories Item.value = CalamityGlobalItem.RarityGreenBuyPrice; Item.rare = ItemRarityID.Green; Item.accessory = true; - Item.defense = 2; } public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.SandCloakHotkey); diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 51bd59b22c..f5c02e7b45 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1454,9 +1454,9 @@ SandCloak: { Tooltip: ''' 5% increased movement speed - Press [KEY] to consume 10% of your maximum stealth to create a protective dust veil - While inside the veil, you gain 6 defense and +1 HP/s life regen - This effect has a 30 second cooldown before it can be used again + Press [KEY] to create a protective sand veil which damages enemies inside it + While inside the veil, you gain 6 defense and 3% critical strike chance + This effect has a 20 second cooldown before it can be used again ''' } diff --git a/Projectiles/Typeless/SandCloakVeil.cs b/Projectiles/Typeless/SandCloakVeil.cs index 35ff4a2359..a68256bee6 100644 --- a/Projectiles/Typeless/SandCloakVeil.cs +++ b/Projectiles/Typeless/SandCloakVeil.cs @@ -33,12 +33,12 @@ namespace CalamityMod.Projectiles.Typeless { Projectile.rotation += 0.01f; - Player player = Main.player[Main.myPlayer]; + Player player = Main.LocalPlayer; Vector2 posDiff = player.Center - Projectile.Center; if (posDiff.Length() <= radius) { - player.statDefense += 6; - player.lifeRegen += 2; + player.statDefense += 8; + player.GetCritChance() += 3; } } @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Typeless // 12AUG2023: Ozzatron: TML was giving NaN knockback, probably due to 0 base knockback. Do not use hit.Knockback if (CalamityGlobalNPC.ShouldAffectNPC(target)) { - float knockbackMultiplier = SandCloak.KnockbackStrength * MathHelper.Clamp(1f - target.knockBackResist, 0f, 1f); + float knockbackMultiplier = MathHelper.Clamp(1f - target.knockBackResist, 0f, 1f); Vector2 trueKnockback = target.Center - Projectile.Center; trueKnockback.Normalize(); target.velocity = trueKnockback * knockbackMultiplier;