diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 435a7f659f..eec684cf59 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -2201,13 +2201,13 @@ namespace CalamityMod.CalPlayer #region Screen Position Movements public override void ModifyScreenPosition() { - if (!CalamityConfig.Instance.Screenshake) + if (CalamityConfig.Instance.ScreenshakePower == 0) return; if (GeneralScreenShakePower > 0f) { - Main.screenPosition += Main.rand.NextVector2Circular(GeneralScreenShakePower, GeneralScreenShakePower); - GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f); + Main.screenPosition += Main.rand.NextVector2Circular(GeneralScreenShakePower * CalamityConfig.Instance.ScreenshakePower, GeneralScreenShakePower * CalamityConfig.Instance.ScreenshakePower); + GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f * CalamityConfig.Instance.ScreenshakePower); } } #endregion diff --git a/CalamityConfig.cs b/CalamityConfig.cs index e27e7d8505..00c1af223b 100644 --- a/CalamityConfig.cs +++ b/CalamityConfig.cs @@ -49,8 +49,10 @@ namespace CalamityMod public bool BossesStopWeather { get; set; } [BackgroundColor(192, 54, 64, 192)] - [DefaultValue(true)] - public bool Screenshake { get; set; } + [SliderColor(224, 165, 56, 128)] + [Range(0f, 10f)] + [DefaultValue(1f)] + public float ScreenshakePower { get; set; } [BackgroundColor(192, 54, 64, 192)] [DefaultValue(true)] diff --git a/Items/Weapons/Summon/LiliesOfFinality.cs b/Items/Weapons/Summon/LiliesOfFinality.cs index 7d3f3abdf9..849286cb14 100644 --- a/Items/Weapons/Summon/LiliesOfFinality.cs +++ b/Items/Weapons/Summon/LiliesOfFinality.cs @@ -52,32 +52,30 @@ namespace CalamityMod.Items.Weapons.Summon Item.value = CalamityGlobalItem.RarityVioletBuyPrice; Item.rare = RarityType(); Item.useStyle = ItemUseStyleID.HoldUp; + Item.UseSound = new("CalamityMod/Sounds/Item/LiliesOfFinalitySummonSpawn"); } - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] == 0; + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] == 0 && player.maxMinions - player.slotsMinions >= 2; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - if (player.maxMinions - player.slotsMinions >= 2) + Projectile.NewProjectileDirect(source, Main.MouseWorld, new Vector2(-1f, -1f) * 3f, type, damage, knockback, player.whoAmI); + Projectile.NewProjectileDirect(source, Main.MouseWorld, new Vector2(1f, -1f) * 3f, ProjectileType(), damage, knockback, player.whoAmI); + + if (Main.dedServ) + return false; + + int dustAmount = Main.rand.Next(30, 40 + 1); + for (int i = 0; i < dustAmount; i++) { - Projectile.NewProjectileDirect(source, Main.MouseWorld, new Vector2(-1f, -1f) * 3f, type, damage, knockback, player.whoAmI); - Projectile.NewProjectileDirect(source, Main.MouseWorld, new Vector2(1f, -1f) * 3f, ProjectileType(), damage, knockback, player.whoAmI); - - if (Main.dedServ) - return false; - - int dustAmount = Main.rand.Next(30, 40 + 1); - for (int i = 0; i < dustAmount; i++) - { - float angle = MathHelper.TwoPi / dustAmount * i; - Vector2 dustVelocity = angle.ToRotationVector2() * Main.rand.NextFloat(3f, 6f); - Dust spawnDust = Dust.NewDustPerfect( - Main.MouseWorld, - CommonDustID, - dustVelocity, - Scale: Main.rand.NextFloat(1.2f, 1.5f)); - spawnDust.noGravity = true; - } + float angle = MathHelper.TwoPi / dustAmount * i; + Vector2 dustVelocity = angle.ToRotationVector2() * Main.rand.NextFloat(3f, 6f); + Dust spawnDust = Dust.NewDustPerfect( + Main.MouseWorld, + CommonDustID, + dustVelocity, + Scale: Main.rand.NextFloat(1.2f, 1.5f)); + spawnDust.noGravity = true; } return false; } diff --git a/Localization/en-US/Mods.CalamityMod.Configs.hjson b/Localization/en-US/Mods.CalamityMod.Configs.hjson index e6c51391fa..7579b0d6a0 100644 --- a/Localization/en-US/Mods.CalamityMod.Configs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Configs.hjson @@ -305,9 +305,15 @@ CalamityConfig: { ''' } - Screenshake: { - Label: "[i:CalamityMod/WavePounder] Screenshake" - Tooltip: Enable or disable all screen-shaking effects. + ScreenshakePower: { + Label: "[i:CalamityMod/WavePounder] Screenshake Power" + Tooltip: + ''' + How intense screen-shaking effects are. + Set to zero to disable screen-shaking entirely. + [c/FF232C:All screen-shake visuals are balanced around a value of 1.] + [c/FF232C:Higher values may be nauseating or otherwise bad for some.] + ''' } ShopNewAlert: { diff --git a/Sounds/Item/LiliesOfFinalitySummonSpawn.ogg b/Sounds/Item/LiliesOfFinalitySummonSpawn.ogg new file mode 100644 index 0000000000..c04a4979ea Binary files /dev/null and b/Sounds/Item/LiliesOfFinalitySummonSpawn.ogg differ