diff --git a/Items/Accessories/RoverDrive.cs b/Items/Accessories/RoverDrive.cs index 20997b4714..4a57154eef 100644 --- a/Items/Accessories/RoverDrive.cs +++ b/Items/Accessories/RoverDrive.cs @@ -14,7 +14,8 @@ namespace CalamityMod.Items.Accessories DisplayName.SetDefault("Rover Drive"); Tooltip.SetDefault("Activates a protective shield that grants 15 defense for 10 seconds\n" + //Actually 10.1 seconds at full power with a dissipation across 0.1666 seconds but whatever - "The shield then dissipates and recharges for 20 seconds before being reactivated"); + "The shield then dissipates and recharges for 20 seconds before being reactivated\n" + + "Can also be scrapped at an extractinator"); ItemID.Sets.ExtractinatorMode[Item.type] = Item.type; } diff --git a/Items/Accessories/WulfrumBattery.cs b/Items/Accessories/WulfrumBattery.cs index 1a01bc9f11..eb7b894cd4 100644 --- a/Items/Accessories/WulfrumBattery.cs +++ b/Items/Accessories/WulfrumBattery.cs @@ -4,6 +4,7 @@ using Terraria.ID; using Terraria.DataStructures; using Terraria.Audio; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; namespace CalamityMod.Items.Accessories { @@ -15,8 +16,8 @@ namespace CalamityMod.Items.Accessories { SacrificeTotal = 1; DisplayName.SetDefault("Wulfrum Battery"); - Tooltip.SetDefault("7% increased summon damage\n" + - "Attaches a spotlight on your first summon\n" + + Tooltip.SetDefault( "Empowers your summons with wulfrum energy, letting them emit light around them\n" + + "7% increased summon damage\n" + "50% chance to get an extra scrap when killing wulfrum robots\n" + "Can also be scrapped at an extractinator"); @@ -64,4 +65,29 @@ namespace CalamityMod.Items.Accessories public override void ResetEffects() => battery = false; public override void UpdateDead() => battery = false; } + + public class WulfrumBatteryGlobalProjectile : GlobalProjectile + { + public override void AI(Projectile projectile) + { + if (!projectile.npcProj && !projectile.trap && projectile.minion && !ProjectileID.Sets.MinionShot[projectile.type] && Main.player[projectile.owner].GetModPlayer().battery) + { + float lightMult = 3f; + if (Lighting.UpdateEveryFrame) //The light loks wayyy too bright in retro/trippy + lightMult = 1.5f; + + Lighting.AddLight(projectile.Center, Color.DeepSkyBlue.ToVector3() * lightMult); + + + + if (Main.rand.NextBool(16)) + { + float size = (projectile.Hitbox.Size() / 2f).Length(); + + Dust zapDust = Dust.NewDustPerfect(projectile.Center + Main.rand.NextVector2Circular(1f, 1f) * size, 226, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(1f, 2.3f)); + zapDust.noGravity = true; + } + } + } + } } diff --git a/Projectiles/Melee/WulfrumScrew.cs b/Projectiles/Melee/WulfrumScrew.cs index a46410b11b..5998e2bea2 100644 --- a/Projectiles/Melee/WulfrumScrew.cs +++ b/Projectiles/Melee/WulfrumScrew.cs @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Melee { if (Owner.HeldItem.ModItem is WulfrumScrewdriver screwdriver && !screwdriver.ScrewStored) { - WulfrumScrewdriver.ScrewStart = new Vector3(Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.Zero) * 14f * Main.rand.NextFloat() - Main.screenPosition, Main.rand.NextFloat(MathHelper.PiOver2 - MathHelper.PiOver4)); + WulfrumScrewdriver.ScrewStart = new Vector3(Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.Zero) * 4f * Main.rand.NextFloat() - Main.screenPosition, Projectile.rotation); WulfrumScrewdriver.ScrewTimer = WulfrumScrewdriver.ScrewTime; screwdriver.ScrewStored = true;