diff --git a/Items/Weapons/Ranged/OntologicalDespoiler.cs b/Items/Weapons/Ranged/OntologicalDespoiler.cs index bee870c2ab..7d26477e84 100644 --- a/Items/Weapons/Ranged/OntologicalDespoiler.cs +++ b/Items/Weapons/Ranged/OntologicalDespoiler.cs @@ -1,4 +1,5 @@ -using System.Linq; +using System.Collections.Generic; +using System.Linq; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; using CalamityMod.Rarities; @@ -52,7 +53,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.autoReuse = false; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; - Item.Calamity().canFirePointBlankShots = true; } public override bool AltFunctionUse(Player player) => true; @@ -92,6 +92,25 @@ namespace CalamityMod.Items.Weapons.Ranged holdout.velocity = player.Calamity().mouseWorld - player.RotatedRelativePoint(player.MountedCenter); return false; } + public override void ModifyTooltips(List list) + { + float rate = (Main.GlobalTimeWrappedHourly * 3); + List eColors = new List() + { + Color.DarkMagenta, + Color.DarkOrchid, + Color.Purple, + Color.BlueViolet + }; + int colorIndex = (int)(rate / 2 % eColors.Count); + Color currentColor = eColors[colorIndex]; + Color nextColor = eColors[(colorIndex + 1) % eColors.Count]; + Color eTooltipColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f); + + TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip6"); + if (line != null) + line.OverrideColor = Color.Lerp(eTooltipColor, Color.White, 0.3f); + } public override void AddRecipes() { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index ece6d12fb6..f6e26f0332 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -840,6 +840,20 @@ NullificationPistol: { ''' } +OntologicalDespoiler: { + DisplayName: Ontological Despoiler + Tooltip: + ''' + Charges and fires bursts of concentrated unreality, swap between unstable and null modes with right click + Unstable is trifurcated and pierces through enemies + Null is fired rapidly and has homing properties + The first charging stage increases the fire rate of the burst + The second charging stage replaces the burst with a disruption shot for unstable, or an annihilation beam for null + Modes charge slower when used in succession; switching resets it + 'Rob them of continuity and the laws of physics they hold so dear.' + ''' +} + OnyxChainBlaster: { DisplayName: Onyx Chain Blaster Tooltip: @@ -1439,8 +1453,3 @@ WulfrumBlunderbuss: { [c/83B87E:In fact, it is quite common for a robot to be turned into ammo right after it stops functioning.'] ''' } - -OntologicalDespoiler: { - DisplayName: Ontological Despoiler - Tooltip: "" -} diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson index 4fe9d24541..5995fb95a1 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson @@ -139,7 +139,12 @@ NorfleetExplosion.DisplayName: Explosion NovaChargedShot.DisplayName: Charged Nova Blast NovaShot.DisplayName: Nova Bolt Nuke.DisplayName: Nuke +NullFlash.DisplayName: Null Flash NullShot.DisplayName: Null +OntologicalDespoilerBeam.DisplayName: Annihilation Beam +OntoligicalDespoilerBurst.DisplayName: Disruption Burst +OntologicalDespoilerGrenade.DisplayName: Disruption Shot +OntologicalDespoilerShot.DisplayName: Volatile Energy Shot OpalChargedStrike.DisplayName: Charged Plasma Bolt OpalStrike.DisplayName: Heated Bolt PiercingBullet.DisplayName: Piercing Blow @@ -245,8 +250,3 @@ WildfireBloomFlare.DisplayName: Wildfire Flare WulfrumScrapBullet.DisplayName: High Speed Scrap HellbornProj.DisplayName: Hell-born Gunblast HellbornShell.DisplayName: Hell's Shell -NullFlash.DisplayName: Null Flash -OntologicalDespoilerBeam.DisplayName: Ontological Despoiler Beam -OntologicalDespoilerGrenade.DisplayName: Ontological Despoiler Grenade -OntologicalDespoilerShot.DisplayName: Ontological Despoiler Shot -OntoligicalDespoilerBurst.DisplayName: Ontoligical Despoiler Burst diff --git a/Projectiles/Ranged/OntologicalDespoilerGrenade.cs b/Projectiles/Ranged/OntologicalDespoilerGrenade.cs index ff3cac8802..bedc1128b5 100644 --- a/Projectiles/Ranged/OntologicalDespoilerGrenade.cs +++ b/Projectiles/Ranged/OntologicalDespoilerGrenade.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Ranged } if (time < 60) - Projectile.velocity *= 0.979f; + Projectile.velocity *= 0.982f; float rate = (Main.GlobalTimeWrappedHourly * 15); List eColors = new List() @@ -106,10 +106,10 @@ namespace CalamityMod.Projectiles.Ranged { Vector2 position = targetedNPC.Center; Vector2 moveToMouse = (position - Projectile.Center).SafeNormalize(Vector2.UnitX); - if (Projectile.velocity.Length() < 6 - (Utils.GetLerpValue(350, 0, Projectile.timeLeft, true))) + if (Projectile.velocity.Length() < 7 - (Utils.GetLerpValue(350, 0, Projectile.timeLeft, true) * 2)) Projectile.velocity += moveToMouse * (0.02f + Utils.GetLerpValue(550, 250, Projectile.timeLeft, true)); else - Projectile.velocity *= 0.9f; + Projectile.velocity *= 0.94f; explode = true; } time++; diff --git a/Projectiles/Ranged/OntologicalDespoilerHoldout.cs b/Projectiles/Ranged/OntologicalDespoilerHoldout.cs index 3d61418ff6..3f69e1ea60 100644 --- a/Projectiles/Ranged/OntologicalDespoilerHoldout.cs +++ b/Projectiles/Ranged/OntologicalDespoilerHoldout.cs @@ -145,7 +145,6 @@ namespace CalamityMod.Projectiles.Ranged // Changing Mode if (Projectile.ai[2] >= 10) { - Owner.Calamity().despoilerNerf = false; // Remove charge speed penalty if you swap ShotsLoaded = 0; if (Time == 0) { @@ -163,14 +162,15 @@ namespace CalamityMod.Projectiles.Ranged dust.scale = Main.rand.NextFloat(0.9f, 1.25f); dust.color = Projectile.ai[2] == 15 ? baseColor : useColor; } - Projectile.timeLeft = (int)(AftershotCooldownFrames * 3.5f); + Projectile.timeLeft = (int)(AftershotCooldownFrames * 2.5f * (!Owner.Calamity().despoilerNerf ? 2 : 1)); // If you're swapping with no penalty, the swap takes longer + Owner.Calamity().despoilerNerf = false; // Remove charge speed penalty if you swap OffsetLengthFromArm = 45f; } if (Main.rand.NextBool() && Time > 1) { Dust dust = Dust.NewDustPerfect(GunTipPosition - (Projectile.velocity * 60).RotatedBy(0.15f * Projectile.direction), Projectile.ai[2] == 15 ? ModContent.DustType() : ModContent.DustType(), (Projectile.velocity * 14).RotatedBy(MathHelper.ToRadians(-135f) * Projectile.direction).RotatedByRandom(0.3f) * Main.rand.NextFloat(0.6f, 1f)); dust.noGravity = true; - dust.scale = Main.rand.NextFloat(0.8f, 0.9f) * Utils.GetLerpValue(-10, 20, Projectile.timeLeft); + dust.scale = Main.rand.NextFloat(0.8f, 0.9f) * Utils.GetLerpValue(-10, 15, Projectile.timeLeft); dust.color = baseColor; } } @@ -292,24 +292,15 @@ namespace CalamityMod.Projectiles.Ranged if (ShotsLoaded < MaxLoadableShots && CurrentChargingFrames % FramesPerLoad == 0) ShotsLoaded++; - CurrentChargingFrames += ((ChargeLV1 && !Positive) ? 1 : 2) * (Owner.Calamity().despoilerNerf ? 0.5f : 1); // Charges slower if nerfed, charge LV2 for Negative is slower + CurrentChargingFrames += ((ChargeLV1 && !Positive) ? 1.2f : 2) * (Owner.Calamity().despoilerNerf ? 0.4f : 1); // Charges slower if nerfed, charge LV2 for Negative is slower // Sounds if (ChargeLV1) { - // Pulse sounds play independently of the loop - if (CurrentChargingFrames == Charge2Frames) - SoundEngine.PlaySound(OntologicalDespoiler.ChargeLV2, Projectile.Center); - else if (CurrentChargingFrames == Charge1Frames) - { - SoundEngine.PlaySound(OntologicalDespoiler.ChargeLV1, Projectile.Center); - ShotsLoaded = MaxLoadableShots; - } - if ((CurrentChargingFrames - Charge1Frames) % (OntologicalDespoiler.ChargeLoopSoundFrames * 2) == 0) OntologicalChargeSlot = SoundEngine.PlaySound(OntologicalDespoiler.ChargeLoop, Projectile.Center); } - else if (CurrentChargingFrames == 10) + else if (Time == 10) OntologicalChargeSlot = SoundEngine.PlaySound(OntologicalDespoiler.ChargeStart, Projectile.Center); // Charge-up visuals @@ -350,9 +341,11 @@ namespace CalamityMod.Projectiles.Ranged } } - // Full charge dusts + // Full charge dusts and sounds if (ChargeLV1 && !hasReachedLV1) { + ShotsLoaded = MaxLoadableShots; + SoundEngine.PlaySound(OntologicalDespoiler.ChargeLV1, Projectile.Center); for (int i = 0; i < 16; i++) { Color useColor = Main.rand.Next(4) switch @@ -374,6 +367,7 @@ namespace CalamityMod.Projectiles.Ranged } if (ChargeLV2 && !hasReachedLV2) { + SoundEngine.PlaySound(OntologicalDespoiler.ChargeLV2, Projectile.Center); for (int i = 0; i < 25; i++) { Color useColor = Main.rand.Next(4) switch