diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 8b843c8852..e32c7cbe39 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1110,6 +1110,7 @@ namespace CalamityMod.CalPlayer public int spectralVeilImmunity = 0; /// Check for if the player has Plagued Fuel Pack OR Blunder Booster equipped. public bool hasJetpack = false; + public bool hasEngineDash = false; public bool plaguedFuelPack = false; public bool blunderBooster = false; public bool blunderBoosterVisibility = true; @@ -2639,6 +2640,7 @@ namespace CalamityMod.CalPlayer sandCloak = false; spectralVeil = false; hasJetpack = false; + hasEngineDash = false; plaguedFuelPack = false; blunderBooster = false; blunderBoosterVisibility = true; diff --git a/Items/Accessories/V8000Engine.cs b/Items/Accessories/V8000Engine.cs index 304eab63a2..2c5b7238df 100644 --- a/Items/Accessories/V8000Engine.cs +++ b/Items/Accessories/V8000Engine.cs @@ -30,9 +30,12 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().hasEngineDash; + public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); + modPlayer.hasEngineDash = true; modPlayer.v8000Engine = true; modPlayer.DashID = V8000EngineDash.ID; player.dashType = 0; diff --git a/Items/Accessories/V8Engine.cs b/Items/Accessories/V8Engine.cs index 3edf85e265..83f8e825ca 100644 --- a/Items/Accessories/V8Engine.cs +++ b/Items/Accessories/V8Engine.cs @@ -28,9 +28,12 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().hasEngineDash; + public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); + modPlayer.hasEngineDash = true; modPlayer.v8Engine = true; modPlayer.DashID = V8EngineDash.ID; player.dashType = 0; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index ca35b35986..25ed7b189e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -2014,14 +2014,14 @@ UnstableGraniteCore: { V8Engine: { DisplayName: V8 Engine - Tooltip: Grants a dash which can be used by both mounts and players alike + Tooltip: Grants a short dash with a long cooldown that works while mounted } V8000Engine: { DisplayName: V8000 Engine Tooltip: ''' - Grants a dash which can be used by both mounts and players alike + Grants a dash with a long cooldown that works while mounted This dash can ram through enemies without taking damage 'Are soul-powered engines eco-friendly?' '''