diff --git a/DataStructures/NPCStats.cs b/DataStructures/NPCStats.cs index 4ced7e1f7b..7dda451120 100644 --- a/DataStructures/NPCStats.cs +++ b/DataStructures/NPCStats.cs @@ -694,7 +694,7 @@ namespace CalamityMod { new Tuple(NPCID.DukeFishron, ProjectileID.Sharknado), new int[] { 80, 100, 184, 200, 270 } }, // 150 in non-rev master mode { new Tuple(NPCID.DukeFishron, ProjectileID.Cthulunado), new int[] { 160, 200, 232, 248, 348 } }, // 300 in non-rev master mode - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 90, 144, 172, 188, 258 } }, + // { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 90, 144, 172, 188, 258 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 180, 208, 224, 312 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 90, 144, 172, 188, 258 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 180, 208, 224, 312 } }, diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index d3bdcfcee3..50e413c14e 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -234,7 +234,7 @@ namespace CalamityMod.NPCs.Ravager } } - if (CalamityWorld.getFixedBoi) + /*if (CalamityWorld.getFixedBoi) { bool finalStand = lifeRatio < 0.1f; //At 10% body health, does the funny final attack NPC.localAI[1]++; @@ -335,7 +335,7 @@ namespace CalamityMod.NPCs.Ravager Projectile.NewProjectile(NPC.GetSource_FromAI(), position, velocity, laser, damage, 0f, Main.myPlayer, 1f, (float)movement); NPC.localAI[1] = 0f; } - } + }*/ if (!headActive) { diff --git a/Projectiles/Boss/RavagerBlast.cs b/Projectiles/Boss/RavagerBlast.cs deleted file mode 100644 index 7417d0cefd..0000000000 --- a/Projectiles/Boss/RavagerBlast.cs +++ /dev/null @@ -1,183 +0,0 @@ -using CalamityMod.Projectiles.BaseProjectiles; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using ReLogic.Content; -using System; -using System.IO; -using System.Linq; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Boss -{ - public class RavagerBlast : BaseLaserbeamProjectile - { - //Modified clone of Seraphim's Laser - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public int OwnerIndex - { - get => (int)Projectile.ai[1]; - set => Projectile.ai[1] = value; - } - - public bool blue => Projectile.ai[1] < 0f; - - public override float MaxScale => Projectile.ai[0]; - public override float MaxLaserLength => blue ? 4800f : 2400f; - public override float Lifetime => blue ? 200 : 50; - public override Color LaserOverlayColor - { - get - { - Color c1 = blue ? Color.MediumTurquoise : Color.Gray; - Color c2 = blue ? Color.Cyan : Color.White; - Color color = Color.Lerp(c1, c2, Projectile.identity % 5f / 5f) * 1.1f; - color.A = 0; - return color; - } - } - - public override Color LightCastColor => Color.Transparent; - public override Texture2D LaserBeginTexture => ModContent.Request("CalamityMod/Projectiles/Rogue/SeraphimBeamLarge", AssetRequestMode.ImmediateLoad).Value; - public override Texture2D LaserMiddleTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/SeraphimBeamLargeMiddle", AssetRequestMode.ImmediateLoad).Value; - public override Texture2D LaserEndTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/SeraphimBeamLargeEnd", AssetRequestMode.ImmediateLoad).Value; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Ravaging Laser"); - Main.projFrames[Projectile.type] = 10; - } - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 30; - Projectile.hostile = true; - Projectile.alpha = 255; - Projectile.penetrate = -1; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.timeLeft = 200; - Projectile.Calamity().DealsDefenseDamage = true; - CooldownSlot = ImmunityCooldownID.Bosses; - } - - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(Projectile.localAI[0]); - writer.Write(Projectile.localAI[1]); - writer.Write(Projectile.scale); - } - - public override void ReceiveExtraAI(BinaryReader reader) - { - Projectile.localAI[0] = reader.ReadSingle(); - Projectile.localAI[1] = reader.ReadSingle(); - Projectile.scale = reader.ReadSingle(); - } - - public override void AttachToSomething() { } - - public override void UpdateLaserMotion() - { - // Update the direction and rotation of the laser. - Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.UnitY); - Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; - - if (blue) - { - float speed = 8f + 8f * Utils.GetLerpValue(Lifetime, 0f, Projectile.timeLeft); - switch (OwnerIndex) - { - case -1: //go right - Projectile.position.X += speed; - break; - case -2: //go left - Projectile.position.X -= speed; - break; - case -3: //go down - Projectile.position.Y += speed; - break; - default: //go up - Projectile.position.Y -= speed; - break; - } - } - } - - public override float DetermineLaserLength() => MaxLaserLength; - - public override void PostAI() - { - // Determine frames. - Projectile.frameCounter++; - if (Projectile.frameCounter % 5f == 4f) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; - } - - // Can hit if white (regardless of condition) or blue only if the player is (close to) still - public override bool CanHitPlayer(Player target) => (!blue || target.velocity.Length() <= 0.25f) && Projectile.scale >= 0.5f; - - public override bool PreDraw(ref Color lightColor) - { - // This should never happen, but just in case- - if (Projectile.velocity == Vector2.Zero) - return false; - - Color beamColor = LaserOverlayColor; - Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - - // Start texture drawing. - Vector2 centerOnLaser = Projectile.Center + Projectile.velocity * Projectile.scale * 116f; - Main.EntitySpriteDraw(LaserBeginTexture, - centerOnLaser - Main.screenPosition, - startFrameArea, - beamColor, - Projectile.rotation, - LaserBeginTexture.Size() / 2f, - Projectile.scale, - SpriteEffects.None, - 0); - - // Prepare things for body drawing. - float laserBodyLength = LaserLength + middleFrameArea.Height; - - // Body drawing. - if (laserBodyLength > 0f) - { - float laserOffset = middleFrameArea.Height * Projectile.scale; - float incrementalBodyLength = 0f; - while (incrementalBodyLength + 1f < laserBodyLength) - { - centerOnLaser += Projectile.velocity * laserOffset; - incrementalBodyLength += laserOffset; - Main.EntitySpriteDraw(LaserMiddleTexture, - centerOnLaser - Main.screenPosition, - middleFrameArea, - beamColor, - Projectile.rotation, - LaserMiddleTexture.Size() * 0.5f, - Projectile.scale, - SpriteEffects.None, - 0); - } - } - - Vector2 laserEndCenter = centerOnLaser + Projectile.velocity * endFrameArea.Height * Projectile.scale - Main.screenPosition; - Main.EntitySpriteDraw(LaserEndTexture, - laserEndCenter, - endFrameArea, - beamColor, - Projectile.rotation, - LaserEndTexture.Size() * 0.5f, - Projectile.scale, - SpriteEffects.None, - 0); - return false; - } - } -} diff --git a/Projectiles/Boss/RavagerBlaster.cs b/Projectiles/Boss/RavagerBlaster.cs deleted file mode 100644 index c86c886a55..0000000000 --- a/Projectiles/Boss/RavagerBlaster.cs +++ /dev/null @@ -1,73 +0,0 @@ -using Microsoft.Xna.Framework; -using System; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Terraria.Audio; - -namespace CalamityMod.Projectiles.Boss -{ - public class RavagerBlaster : ModProjectile - { - public override string Texture => "CalamityMod/NPCs/Ravager/RavagerHead"; - public static readonly SoundStyle SANSCharge = new("CalamityMod/Sounds/Custom/Ravager/GasterBlasterCharge"); - public static readonly SoundStyle SANSFire = new("CalamityMod/Sounds/Custom/Ravager/GasterBlasterFire"); - public Vector2 storedVelocity; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Ravager Blaster"); - } - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 80; - Projectile.hostile = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.timeLeft = 180; - CooldownSlot = ImmunityCooldownID.Bosses; - } - - public override void AI() - { - //ai0 = timer, ai1 = laser size - if (Projectile.ai[0] < 90f) //Before the laser - { - Projectile.ai[0]++; - if (storedVelocity == Vector2.Zero) - { - storedVelocity = Projectile.SafeDirectionTo(Projectile.velocity); - Projectile.velocity = Vector2.Zero; - Projectile.netUpdate = true; - Projectile.rotation = (float)Math.Atan2(storedVelocity.Y, storedVelocity.X) - MathHelper.PiOver2; - - SoundEngine.PlaySound(SANSCharge, Projectile.Center); //Funny Gaster Blaster sounds - } - else if (Projectile.ai[0] >= 55f) - { - Projectile.ai[0] = 90f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, storedVelocity, ModContent.ProjectileType(), Projectile.damage, 0f, Projectile.owner, Projectile.ai[1], Projectile.whoAmI); - - SoundEngine.PlaySound(SANSFire, Projectile.Center); //Funny Gaster Blaster sounds #2 - } - } - else //Move out and despawn - { - //Start moving - if (Projectile.velocity == Vector2.Zero) - Projectile.velocity = storedVelocity * -1f; - else - Projectile.velocity *= 1.01f; - - //Fade out and die - Projectile.alpha += 3; - if (Projectile.alpha >= 255) - Projectile.Kill(); - } - } - - // Does no contact damage - public override bool? CanDamage() => false; - } -} diff --git a/Projectiles/DraedonsArsenal/VoltageStream.cs b/Projectiles/DraedonsArsenal/VoltageStream.cs index 3e0ce3ac32..d1769e155a 100644 --- a/Projectiles/DraedonsArsenal/VoltageStream.cs +++ b/Projectiles/DraedonsArsenal/VoltageStream.cs @@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override bool? CanHitNPC(NPC target) { - if (Target == target.whoAmI) + if (Projectile.ai[1] == target.whoAmI) return null; return (bool?)false; } diff --git a/Sounds/Custom/Ravager/GasterBlasterCharge.ogg b/Sounds/Custom/Ravager/GasterBlasterCharge.ogg deleted file mode 100644 index 59b6aa7eb4..0000000000 Binary files a/Sounds/Custom/Ravager/GasterBlasterCharge.ogg and /dev/null differ diff --git a/Sounds/Custom/Ravager/GasterBlasterFire.ogg b/Sounds/Custom/Ravager/GasterBlasterFire.ogg deleted file mode 100644 index 6d865f1ff4..0000000000 Binary files a/Sounds/Custom/Ravager/GasterBlasterFire.ogg and /dev/null differ