From 63787c896350db8ea5f59ccd54fbece604d170bc Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 27 Apr 2024 15:26:08 -0700 Subject: [PATCH] Tooltips and polish --- Items/Weapons/Magic/Omicron.cs | 6 +- ...Mods.CalamityMod.Items.Weapons.Magic.hjson | 20 ++++- .../Mods.CalamityMod.Projectiles.Magic.hjson | 9 +-- Projectiles/Magic/GenesisBeam.cs | 2 +- Projectiles/Magic/GenesisHoldout.cs | 2 +- Projectiles/Magic/OmicronBeam.cs | 81 ++++++++++++++----- Projectiles/Magic/OmicronHoldout.cs | 10 +-- Projectiles/Magic/OmicronWingman.cs | 29 ++++--- Projectiles/Magic/WingmanGrenade.cs | 19 ++--- Projectiles/Magic/WingmanHoldout.cs | 2 +- Projectiles/Magic/WingmanShot.cs | 24 +++--- 11 files changed, 134 insertions(+), 70 deletions(-) diff --git a/Items/Weapons/Magic/Omicron.cs b/Items/Weapons/Magic/Omicron.cs index 09d25e5cb9..143c5658f6 100644 --- a/Items/Weapons/Magic/Omicron.cs +++ b/Items/Weapons/Magic/Omicron.cs @@ -40,15 +40,15 @@ namespace CalamityMod.Items.Weapons.Magic public override void HoldItem(Player player) => player.Calamity().mouseRotationListener = true; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0, 0, 0); - holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero); - for (int i = 0; i < 2; i++) { Projectile holdout2 = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0, 0, i == 0 ? 1 : -1); holdout2.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero); } + Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0, 0, 0); + holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero); + return false; } public override void AddRecipes() diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index 838b01e281..b0c65b6f47 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -338,7 +338,12 @@ FrostBolt: { Genesis: { DisplayName: Genesis - Tooltip: Fires a Y-shaped beam of destructive energy and a spread of lasers + Tooltip: + ''' + Fire an array of lasers that decreases in spread for each shot + Every 6th shot fires a splitting Genesis Beam and resets the spread of the weapon + Hitting an enemy where the Genesis Beam splits deals increased damage + ''' } GhastlyVisage: { @@ -543,8 +548,10 @@ Omicron: { DisplayName: Omicron Tooltip: ''' - Disintegrates everything with a tri-beam of energy and lasers - Press to fire a Y-shaped beam of destructive energy and a spread of lasers + Fire an array of lasers and create two improved Wingman constructs that fly around you and fire lasers at your cursor + Press when firing to shoot a Omicron Beam that splits upon hitting an enemy + After firing an Omnicron Beam your Wingmen will launch improved pairs of grenades + Hitting an enemy with an Omicron Beam right as it is fired will increase the damage done substantially and stop it from splitting ''' } @@ -939,7 +946,12 @@ Waywasher: { Wingman: { DisplayName: Wingman - Tooltip: Fires a concentrated laser beam + Tooltip: + ''' + Creates two Wingman constructs that fly around you and fire lasers at your cursor + Press when firing to make the Wingmen launch grenades and then go on cooldown + Launching grenades when the Wingmen are fully revved up will decrease the cooldown + ''' } WintersFury: { diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson index 59a9411ae9..844521d76e 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson @@ -78,6 +78,7 @@ ForbiddenSunProjectile.DisplayName: Forbidden Sun FrigidflashBoltProjectile.DisplayName: Frigidflash Bolt FrostBoltProjectile.DisplayName: Frost Ball GammaLaser.DisplayName: Gamma Laser +GenesisBeam.DisplayName: Genesis Beam GhastlyBlast.DisplayName: Ghast Blast GhastlyExplosion.DisplayName: Ghastly Explosion GhastlyExplosionShard.DisplayName: Ghastly Fragment @@ -150,6 +151,7 @@ NightBolt.DisplayName: Night's Bolt NightOrb.DisplayName: Night's Orb NightsRayBeam.DisplayName: Night's Ray NuclearFuryProjectile.DisplayName: Nuclear Fury +OmicronBeam.DisplayName: Omicron Beam PartySparkle.DisplayName: Pretty Sparkle PhantasmalFuryProj.DisplayName: Phantasmal Fury Phantom.DisplayName: Phantom @@ -248,6 +250,8 @@ VolatileStarcore.DisplayName: Volatile Starcore VortexElementalBeam.DisplayName: Vortex Lightning WaterLeechProj.DisplayName: Water Leech WaywasherProj.DisplayName: Waywasher Blast +WingmanShot.DisplayName: Mana Shot +WingmanGrenade.DisplayName: Mana Grenade WulfrumBolt.DisplayName: Wulfrum Bolt WulfrumManaDrain.DisplayName: Mana Drain WyvernFeatherGreen.DisplayName: Feather @@ -256,9 +260,4 @@ WyvernFeatherPurple.DisplayName: Feather WyvernProjectile.DisplayName: Wyvern YharimsCrystalBeam.DisplayName: Yharim's Beam YharimsCrystalPrism.DisplayName: Yermes Christal -WingmanShot.DisplayName: Energy Shot -WingmanGrenade.DisplayName: Wingman Grenade -GenesisBeam.DisplayName: Genesis Beam -GenesisSplitBeam.DisplayName: Genesis Split Beam GenisisSplitBeam.DisplayName: Genisis Split Beam -OmicronBeam.DisplayName: Omicron Beam diff --git a/Projectiles/Magic/GenesisBeam.cs b/Projectiles/Magic/GenesisBeam.cs index 10e517243d..8f4b82149e 100644 --- a/Projectiles/Magic/GenesisBeam.cs +++ b/Projectiles/Magic/GenesisBeam.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Magic public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public ref float time => ref Projectile.ai[0]; - public Color mainColor = Color.Indigo; + public Color mainColor = Color.MediumSlateBlue; public override void SetDefaults() { Projectile.width = 12; diff --git a/Projectiles/Magic/GenesisHoldout.cs b/Projectiles/Magic/GenesisHoldout.cs index f5f00f2cee..d4e49c4b31 100644 --- a/Projectiles/Magic/GenesisHoldout.cs +++ b/Projectiles/Magic/GenesisHoldout.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Magic public override float BaseOffsetY => -5f; public override float OffsetYDownwards => 5f; - public Color StaticEffectsColor = Color.Indigo; + public Color StaticEffectsColor = Color.MediumSlateBlue; public float FiringTime = 15; public float Windup = 60; diff --git a/Projectiles/Magic/OmicronBeam.cs b/Projectiles/Magic/OmicronBeam.cs index 8d2af23c64..925e86d890 100644 --- a/Projectiles/Magic/OmicronBeam.cs +++ b/Projectiles/Magic/OmicronBeam.cs @@ -14,6 +14,7 @@ namespace CalamityMod.Projectiles.Magic public ref float time => ref Projectile.ai[0]; public Color mainColor = Color.MediumVioletRed; + public bool HitDirect = false; public override void SetDefaults() { Projectile.width = 50; @@ -24,8 +25,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = -1; Projectile.timeLeft = 300; Projectile.extraUpdates = 75; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 91; } public override void AI() { @@ -40,7 +41,7 @@ namespace CalamityMod.Projectiles.Magic { Vector2 trailPos = Projectile.Center; float trailScale = Main.rand.NextFloat(1.9f, 2.3f); - Particle Trail = new SparkParticle(trailPos, Projectile.velocity * Main.rand.NextFloat(-0.6f, 0.6f), false, Main.rand.Next(40, 50 + 1), trailScale, mainColor); + Particle Trail = new SparkParticle(trailPos, Projectile.velocity * Main.rand.NextFloat(0.2f, 0.9f), false, Main.rand.Next(40, 50 + 1), trailScale, mainColor); GeneralParticleHandler.SpawnParticle(Trail); } Vector2 dustVel = new Vector2(2, 2).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 0.8f); @@ -52,6 +53,34 @@ namespace CalamityMod.Projectiles.Magic } public override void OnKill(int timeLeft) { + int numProj = 2; + float rotation = MathHelper.ToRadians(10); + if (Projectile.ai[1] == 0 && time < 250 && !HitDirect) + { + for (int i = 0; i < numProj; i++) + { + Vector2 perturbedSpeed = Projectile.velocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, perturbedSpeed, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 1f); + for (int k = 0; k < 3; k++) + { + Particle blastRing = new CustomPulse(Projectile.Center + Projectile.velocity * 2, Vector2.Zero, mainColor, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.8f, 0.4f, 35); + GeneralParticleHandler.SpawnParticle(blastRing); + Particle blastRing2 = new CustomPulse(Projectile.Center + Projectile.velocity * 2, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.7f, 0.3f, 35); + GeneralParticleHandler.SpawnParticle(blastRing2); + } + } + + for (int i = 0; i <= 6; i++) + { + Particle energy = new GlowSparkParticle(Projectile.Center, (Projectile.velocity * 15).RotatedByRandom(0.5f) * Main.rand.NextFloat(0.1f, 0.4f), false, 10, Main.rand.NextFloat(0.02f, 0.04f), mainColor, new Vector2(2, 0.7f), true); + GeneralParticleHandler.SpawnParticle(energy); + } + for (int i = 0; i <= 9; i++) + { + Particle energy = new SparkParticle(Projectile.Center, (Projectile.velocity * 5).RotatedByRandom(0.5f) * Main.rand.NextFloat(0.1f, 0.4f), false, 25, Main.rand.NextFloat(0.7f, 0.9f), mainColor); + GeneralParticleHandler.SpawnParticle(energy); + } + } for (int i = 0; i < 28; i++) { Vector2 dustVel = Projectile.velocity * Main.rand.NextFloat(0.1f, 1.5f); @@ -62,6 +91,9 @@ namespace CalamityMod.Projectiles.Magic } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { + if (Projectile.ai[1] == 0 && time > 7 && !HitDirect) + Projectile.Kill(); + Player Owner = Main.player[Projectile.owner]; for (int i = 0; i <= 8; i++) { @@ -69,31 +101,44 @@ namespace CalamityMod.Projectiles.Magic dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.Lerp(mainColor, Color.White, 0.5f) : mainColor; } - if (time <= 7) // This is the sweet spot + if (time <= 7 && Projectile.ai[1] == 0) // This is the sweet spot { - modifiers.SourceDamage *= 3; + modifiers.SourceDamage *= 4; - Owner.velocity += -Projectile.velocity * 2; + if (!HitDirect) + { + Owner.velocity += -Projectile.velocity * 2; + for (int i = 0; i <= 9; i++) + { + Particle energy = new GlowSparkParticle(Projectile.Center, (Projectile.velocity * 15).RotatedByRandom(0.5f) * Main.rand.NextFloat(0.1f, 0.4f), false, 11, Main.rand.NextFloat(0.05f, 0.07f), mainColor, new Vector2(2, 0.5f), true); + GeneralParticleHandler.SpawnParticle(energy); + } + for (int i = 0; i <= 13; i++) + { + Particle energy = new SparkParticle(Projectile.Center, (Projectile.velocity * 10).RotatedByRandom(0.5f) * Main.rand.NextFloat(0.1f, 0.4f), false, 25, Main.rand.NextFloat(0.7f, 0.9f), mainColor); + GeneralParticleHandler.SpawnParticle(energy); + } + for (int k = 0; k < 20; k++) + { + Vector2 shootVel = (Projectile.velocity * 20).RotatedByRandom(0.5f) * Main.rand.NextFloat(0.1f, 1.8f); - for (int i = 0; i <= 9; i++) - { - Particle energy = new GlowSparkParticle(Projectile.Center, (Projectile.velocity * 15).RotatedByRandom(0.5f) * Main.rand.NextFloat(0.1f, 0.4f), false, 11, Main.rand.NextFloat(0.05f, 0.07f), mainColor, new Vector2(2, 0.5f), true); - GeneralParticleHandler.SpawnParticle(energy); - } - for (int i = 0; i <= 13; i++) - { - Particle energy = new SparkParticle(Projectile.Center, (Projectile.velocity * 10).RotatedByRandom(0.5f) * Main.rand.NextFloat(0.1f, 0.4f), false, 25, Main.rand.NextFloat(0.7f, 0.9f), mainColor); - GeneralParticleHandler.SpawnParticle(energy); + Dust dust2 = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(4) ? 267 : 66, shootVel); + dust2.scale = Main.rand.NextFloat(1.15f, 1.45f); + dust2.noGravity = true; + dust2.color = Main.rand.NextBool() ? Color.Lerp(mainColor, Color.White, 0.5f) : mainColor; + } + + SoundStyle fire = new("CalamityMod/Sounds/Custom/ExoMechs/ArtemisApolloDash"); + SoundEngine.PlaySound(fire with { Volume = 1.25f, Pitch = 0.6f }, Projectile.Center); } - SoundStyle fire = new("CalamityMod/Sounds/Custom/ExoMechs/ArtemisApolloDash"); - SoundEngine.PlaySound(fire with { Volume = 1.25f, Pitch = 0.6f }, Projectile.Center); + HitDirect = true; } if (Projectile.numHits > 0) Projectile.damage = (int)(Projectile.damage * 0.9f); if (Projectile.damage < 1) Projectile.damage = 1; } - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, time <= 7 ? 90 : 50, targetHitbox); + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, time <= 7 ? 90 : 20, targetHitbox); } } diff --git a/Projectiles/Magic/OmicronHoldout.cs b/Projectiles/Magic/OmicronHoldout.cs index 157181ee0a..e01c6c2d69 100644 --- a/Projectiles/Magic/OmicronHoldout.cs +++ b/Projectiles/Magic/OmicronHoldout.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Magic Item heldItem = Owner.ActiveItem(); // Fire if the owner stops channeling or otherwise cannot use the weapon. - if (Owner.CantUseHoldout()) + if (Owner.CantUseHoldout() || heldItem.type != ModContent.ItemType()) { if (PostFireCooldown <= 0) Projectile.Kill(); @@ -130,7 +130,7 @@ namespace CalamityMod.Projectiles.Magic } Owner.Calamity().GeneralScreenShakePower = 6.5f; - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, firingVelocity3, ModContent.ProjectileType(), Projectile.damage * 23, Projectile.knockBack, Projectile.owner, 0, 0); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, firingVelocity3, ModContent.ProjectileType(), Projectile.damage * 38, Projectile.knockBack, Projectile.owner, 0, 0); for (int i = 0; i < 8; i++) { @@ -145,12 +145,12 @@ namespace CalamityMod.Projectiles.Magic for (int i = 0; i < 5; i++) { - firingVelocity3 = (shootDirection * 10).RotatedBy((0.05f * (i + 1)) * Utils.GetLerpValue(0, 55, Windup, true)); + firingVelocity3 = (shootDirection * 10).RotatedBy((0.04f * (i + 1)) * Utils.GetLerpValue(0, 55, Windup, true)); Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, firingVelocity3 * (1 - i * 0.1f), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 2); } for (int i = 0; i < 5; i++) { - firingVelocity3 = (shootDirection * 10).RotatedBy((-0.05f * (i + 1)) * Utils.GetLerpValue(0, 55, Windup, true)); + firingVelocity3 = (shootDirection * 10).RotatedBy((-0.04f * (i + 1)) * Utils.GetLerpValue(0, 55, Windup, true)); Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, firingVelocity3 * (1 - i * 0.1f), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 2); } @@ -181,7 +181,7 @@ namespace CalamityMod.Projectiles.Magic } private void PostFiringCooldown() { - Vector2 tipPosition = Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.Zero).RotatedBy(-0.05f * Projectile.direction) * 12f; + Vector2 tipPosition = Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.Zero).RotatedBy(-0.05f * Projectile.direction) * 25f; if (PostFireCooldown > 0 && Main.rand.NextBool()) { diff --git a/Projectiles/Magic/OmicronWingman.cs b/Projectiles/Magic/OmicronWingman.cs index 01f594b852..6d3150ec52 100644 --- a/Projectiles/Magic/OmicronWingman.cs +++ b/Projectiles/Magic/OmicronWingman.cs @@ -55,6 +55,8 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { + if (time > 1 && Owner.ownedProjectileCounts[ModContent.ProjectileType()] < 1) + Projectile.Kill(); Lighting.AddLight(Projectile.Center, StaticEffectsColor.ToVector3() * 0.2f); if (Projectile.scale == 1) { @@ -67,20 +69,21 @@ namespace CalamityMod.Projectiles.Magic // Update damage based on curent magic damage stat (so Mana Sickness affects it) Projectile.damage = heldItem is null ? 0 : Owner.GetWeaponDamage(heldItem); - if (PostFireCooldown > 0) - { - PostFiringCooldown(); - } - Vector2 tipPosition = Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.Zero).RotatedBy(-0.05f * Projectile.direction) * 12f; // If there's no player, or the player is the server, or the owner's stunned, there'll be no holdout. - if (launchDelay == 0 && Owner.CantUseHoldout() || heldItem.type != ModContent.ItemType() ) + if (PostFireCooldown == 0 && launchDelay == 0 && Owner.CantUseHoldout() || heldItem.type != ModContent.ItemType()) { NetUpdate(); if (PostFireCooldown <= 0) Projectile.Kill(); } - else if (launchDelay > 0 || (PostFireCooldown <= 0 && (Owner.Calamity().mouseRight || (firingDelay <= 0 && Projectile.ai[2] == 1 || Projectile.ai[2] == -1)))) + + if (PostFireCooldown > 0) + { + PostFiringCooldown(); + } + + if (launchDelay > 0 || (PostFireCooldown <= 0 && (Owner.Calamity().mouseRight || (firingDelay <= 0 && Projectile.ai[2] == 1 || Projectile.ai[2] == -1)))) { // If the player's pressing RMB, it'll shoot the grenade. if (launchDelay > 0 || Owner.Calamity().mouseRight) @@ -186,18 +189,18 @@ namespace CalamityMod.Projectiles.Magic { SoundStyle fire = new("CalamityMod/Sounds/Item/DeadSunExplosion"); SoundEngine.PlaySound(fire with { Volume = 0.2f, Pitch = -0.4f, PitchVariance = 0.2f }, Projectile.Center); - Projectile bomb = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity * 0.8f, ModContent.ProjectileType(), Projectile.damage * 6, Projectile.knockBack * 5, Projectile.owner, 0, 2); - bomb.timeLeft = 520; - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity, ModContent.ProjectileType(), Projectile.damage * 6, Projectile.knockBack * 5, Projectile.owner, 0, 2); + Projectile bomb = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity, ModContent.ProjectileType(), Projectile.damage * 8, Projectile.knockBack * 5, Projectile.owner, 0, 2); + bomb.timeLeft = 530; + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity * 1.2f, ModContent.ProjectileType(), Projectile.damage * 8, Projectile.knockBack * 5, Projectile.owner, 0, 2); } else { SoundStyle fire = new("CalamityMod/Sounds/Item/MagnaCannonShot"); SoundEngine.PlaySound(fire with { Volume = 0.25f, Pitch = 1f, PitchVariance = 0.35f }, Projectile.Center); - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity * Utils.GetLerpValue(80, 10, FiringTime, true), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 2); - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity.RotatedBy(-0.06) * Utils.GetLerpValue(80, 10, FiringTime, true) * 0.85f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 2); - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity.RotatedBy(0.06) * Utils.GetLerpValue(80, 10, FiringTime, true) * 0.85f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 2); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 2); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity.RotatedBy(-0.05) * 0.85f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 2); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), tipPosition, firingVelocity.RotatedBy(0.05) * 0.85f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 2); } NetUpdate(); diff --git a/Projectiles/Magic/WingmanGrenade.cs b/Projectiles/Magic/WingmanGrenade.cs index 93d9a4820d..c3c40281ad 100644 --- a/Projectiles/Magic/WingmanGrenade.cs +++ b/Projectiles/Magic/WingmanGrenade.cs @@ -15,6 +15,7 @@ namespace CalamityMod.Projectiles.Magic public int BounceHits = 0; public Color mainColor = Color.White; public bool exploding = false; + public float sizeBonus = 1; public override void SetStaticDefaults() { ProjectileID.Sets.TrailCacheLength[Projectile.type] = 14; @@ -25,7 +26,7 @@ namespace CalamityMod.Projectiles.Magic { Projectile.width = Projectile.height = 20; Projectile.friendly = true; - Projectile.tileCollide = true; + Projectile.tileCollide = false; Projectile.penetrate = -1; Projectile.timeLeft = 480; Projectile.DamageType = DamageClass.Magic; @@ -40,13 +41,13 @@ namespace CalamityMod.Projectiles.Magic { Projectile.scale = 0.4f; if (Projectile.ai[1] == 0) - mainColor = Color.Orchid; + mainColor = Color.HotPink; if (Projectile.ai[1] == 2) { mainColor = Color.MediumVioletRed; - Projectile.tileCollide = false; Projectile.scale = 0.5f; + sizeBonus = 1.5f; } } @@ -63,22 +64,22 @@ namespace CalamityMod.Projectiles.Magic Projectile.timeLeft = 65; if (Projectile.timeLeft == 65) { - Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, mainColor, "CalamityMod/Particles/HighResHollowCircleHardEdge", Vector2.One, Main.rand.NextFloat(-10, 10), 0f, 0.12f, 15); + Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, mainColor, "CalamityMod/Particles/HighResHollowCircleHardEdge", Vector2.One, Main.rand.NextFloat(-10, 10), 0f, 0.12f * sizeBonus, 15); GeneralParticleHandler.SpawnParticle(blastRing2); - Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Lerp(mainColor, Color.White, 0.5f), "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 3f, 0f, 25); + Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Lerp(mainColor, Color.White, 0.5f), "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 3f * sizeBonus, 0f, 25); GeneralParticleHandler.SpawnParticle(blastRing); SoundStyle fire = new("CalamityMod/Sounds/Item/ArcNovaDiffuserChargeImpact"); SoundEngine.PlaySound(fire with { Volume = 1.25f, Pitch = -0.2f, PitchVariance = 0.15f }, Projectile.Center); } if (Projectile.timeLeft == 65) { - Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, mainColor, "CalamityMod/Particles/HighResHollowCircleHardEdge", Vector2.One, Main.rand.NextFloat(-10, 10), 0.12f, 0.135f, 50); + Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, mainColor, "CalamityMod/Particles/HighResHollowCircleHardEdge", Vector2.One, Main.rand.NextFloat(-10, 10), 0.12f * sizeBonus, 0.135f * sizeBonus, 50); GeneralParticleHandler.SpawnParticle(blastRing2); } if (Projectile.timeLeft % 4 == 0) { - Particle blastRing2 = new CustomPulse(Projectile.Center + new Vector2(95, 95).RotatedByRandom(100) * Main.rand.NextFloat(0.7f, 1.1f), Vector2.Zero, mainColor, "CalamityMod/Particles/HighResHollowCircleHardEdge", Vector2.One, Main.rand.NextFloat(-10, 10), 0f, Main.rand.NextFloat(0.04f, 0.07f), 13); + Particle blastRing2 = new CustomPulse(Projectile.Center + new Vector2(95, 95).RotatedByRandom(100) * sizeBonus * Main.rand.NextFloat(0.7f, 1.1f), Vector2.Zero, mainColor, "CalamityMod/Particles/HighResHollowCircleHardEdge", Vector2.One, Main.rand.NextFloat(-10, 10), 0f, Main.rand.NextFloat(0.04f, 0.07f) * sizeBonus, 13); GeneralParticleHandler.SpawnParticle(blastRing2); } } @@ -90,7 +91,7 @@ namespace CalamityMod.Projectiles.Magic { if (!exploding && Main.rand.NextBool() || exploding) { - Vector2 dustVel = new Vector2(4, 4).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 0.8f); + Vector2 dustVel = new Vector2(4, 4).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 0.8f) * (exploding ? sizeBonus : 1); Dust dust = Dust.NewDustPerfect(Projectile.Center + dustVel * (exploding ? 5 : 1), Main.rand.NextBool(4) ? 264 : 66, dustVel * (exploding ? 5 : 1), 0, default, Main.rand.NextFloat(0.9f, 1.2f) * (exploding ? 1.5f : 1)); dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.Lerp(mainColor, Color.White, 0.5f) : mainColor; @@ -141,6 +142,6 @@ namespace CalamityMod.Projectiles.Magic return false; } public override bool? CanDamage() => null; - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, exploding ? 120 : (Projectile.ai[1] == 2 ? 30 : 20), targetHitbox); + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, exploding ? 120 * sizeBonus : 20 * sizeBonus, targetHitbox); } } diff --git a/Projectiles/Magic/WingmanHoldout.cs b/Projectiles/Magic/WingmanHoldout.cs index 07cb748031..29b7899dfc 100644 --- a/Projectiles/Magic/WingmanHoldout.cs +++ b/Projectiles/Magic/WingmanHoldout.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Magic public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override string Texture => "CalamityMod/Items/Weapons/Magic/Wingman"; - public Color StaticEffectsColor = Color.Orchid; + public Color StaticEffectsColor = Color.HotPink; private ref float ShootingTimer => ref Projectile.ai[0]; private float FiringTime = 40; private float PostFireCooldown = 0; diff --git a/Projectiles/Magic/WingmanShot.cs b/Projectiles/Magic/WingmanShot.cs index ec5680be6c..f28eb0fadc 100644 --- a/Projectiles/Magic/WingmanShot.cs +++ b/Projectiles/Magic/WingmanShot.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Magic { Projectile.width = Projectile.height = 5; Projectile.friendly = true; - Projectile.tileCollide = true; + Projectile.tileCollide = false; Projectile.penetrate = 2; Projectile.timeLeft = 240; Projectile.DamageType = DamageClass.Magic; @@ -38,19 +38,19 @@ namespace CalamityMod.Projectiles.Magic if (mainColor == Color.White) { if (Projectile.ai[1] == 0) - mainColor = Color.Orchid; + mainColor = Color.HotPink; if (Projectile.ai[1] == 1) - mainColor = Color.Indigo; + mainColor = Color.MediumSlateBlue; if (Projectile.ai[1] == 2) { mainColor = Color.MediumVioletRed; - Projectile.scale = 1.2f; + Projectile.scale = 1.25f; Projectile.extraUpdates = 5; - Projectile.tileCollide = false; + Projectile.penetrate = 3; } - } - Lighting.AddLight(Projectile.Center, mainColor.ToVector3() * 0.7f); + } + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; //Dust dust = Dust.NewDustPerfect(Projectile.Center, 107); // + Main.rand.NextVector2Circular(-3, 3) //dust.noGravity = true; @@ -82,17 +82,19 @@ namespace CalamityMod.Projectiles.Magic public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (Projectile.numHits > 0) - Projectile.damage = (int)(Projectile.damage * 0.8f); + Projectile.damage = (int)(Projectile.damage * 0.9f); if (Projectile.damage < 1) Projectile.damage = 1; } public override bool OnTileCollide(Vector2 oldVelocity) { - for (int i = 0; i <= 6; i++) + for (int i = 0; i <= 4; i++) { Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(4) ? 264 : 66, new Vector2(4, 4).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 0.8f), 0, default, Main.rand.NextFloat(1.2f, 1.6f)); dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.Lerp(mainColor, Color.White, 0.5f) : mainColor; + dust.noLightEmittence = true; + dust.noLight = true; } BounceHits++; if (Projectile.velocity.X != oldVelocity.X) @@ -109,11 +111,13 @@ namespace CalamityMod.Projectiles.Magic } public override void OnKill(int timeLeft) { - for (int i = 0; i <= 5; i++) + for (int i = 0; i <= 2; i++) { Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(4) ? 264 : 66, (Projectile.velocity.SafeNormalize(Vector2.UnitY) * 15f).RotatedByRandom(MathHelper.ToRadians(15f)) * Main.rand.NextFloat(0.1f, 0.8f), 0, default, Main.rand.NextFloat(1.2f, 1.6f)); dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.Lerp(mainColor, Color.White, 0.5f) : mainColor; + dust.noLightEmittence = true; + dust.noLight = true; } } }