diff --git a/Items/Weapons/Magic/HadopelagicEcho.cs b/Items/Weapons/Magic/HadopelagicEcho.cs deleted file mode 100644 index 775ae87ec8..0000000000 --- a/Items/Weapons/Magic/HadopelagicEcho.cs +++ /dev/null @@ -1,68 +0,0 @@ -using CalamityMod.Items.Materials; -using CalamityMod.Projectiles.Magic; -using CalamityMod.Tiles.Furniture.CraftingStations; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.DataStructures; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Items.Weapons.Magic -{ - public class HadopelagicEcho : ModItem - { - private int counter = 0; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Hadopelagic Echo"); - Tooltip.SetDefault("Fires a string of bouncing sound waves that become stronger as they travel\n" + - "Sound waves echo additional sound waves on enemy hits"); - SacrificeTotal = 1; - } - - public override void SetDefaults() - { - Item.damage = 500; - Item.DamageType = DamageClass.Magic; - Item.mana = 15; - Item.width = 60; - Item.height = 60; - Item.useTime = 8; - Item.reuseDelay = 20; - Item.useAnimation = 30; - Item.useStyle = ItemUseStyleID.Shoot; - Item.noMelee = true; - Item.knockBack = 1.5f; - Item.value = Item.buyPrice(2, 50, 0, 0); - Item.rare = ItemRarityID.Red; - Item.autoReuse = true; - Item.shootSpeed = 10f; - Item.shoot = ModContent.ProjectileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; - } - - public override Vector2? HoldoutOffset() => new Vector2(-5, 0); - - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) - { - Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, counter); - counter++; - if (counter >= 5) - counter = 0; - return false; - } - - public override void AddRecipes() - { - CreateRecipe(). - AddIngredient(). - AddIngredient(20). - AddIngredient(20). - AddIngredient(20). - AddIngredient(5). - AddTile(). - Register(); - } - } -} diff --git a/Items/Weapons/Magic/HadopelagicEcho.png b/Items/Weapons/Magic/HadopelagicEcho.png deleted file mode 100644 index 4784fa52fb..0000000000 Binary files a/Items/Weapons/Magic/HadopelagicEcho.png and /dev/null differ diff --git a/Projectiles/Magic/HadopelagicEcho2.cs b/Projectiles/Magic/HadopelagicEcho2.cs deleted file mode 100644 index 018a81ebb5..0000000000 --- a/Projectiles/Magic/HadopelagicEcho2.cs +++ /dev/null @@ -1,69 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Xna.Framework; -using System; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Magic -{ - public class HadopelagicEcho2 : ModProjectile - { - public override string Texture => "CalamityMod/Projectiles/Magic/EidolicWailSoundwave"; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Echo"); - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - } - - public override void SetDefaults() - { - Projectile.width = 36; - Projectile.height = 36; - Projectile.scale = 0.85f; - Projectile.alpha = 255; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.penetrate = -1; - Projectile.DamageType = DamageClass.Magic; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 8; - Projectile.timeLeft = 30; - Projectile.extraUpdates = 1; - Projectile.tileCollide = false; - } - - public override void AI() - { - if (Projectile.alpha > 100) - Projectile.alpha -= 25; - if (Projectile.alpha < 100) - Projectile.alpha = 100; - - Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X); - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 240); - } - - public override Color? GetAlpha(Color lightColor) - { - if (Projectile.timeLeft < 85) - { - byte b2 = (byte)(Projectile.timeLeft * 3); - byte a2 = (byte)(100f * (b2 / 255f)); - return new Color(b2, b2, b2, a2); - } - return new Color(255, 255, 255, 100); - } - - public override bool PreDraw(ref Color lightColor) - { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); - return false; - } - } -} diff --git a/Projectiles/Magic/HadopelagicEchoSoundwave.cs b/Projectiles/Magic/HadopelagicEchoSoundwave.cs deleted file mode 100644 index 96aa211987..0000000000 --- a/Projectiles/Magic/HadopelagicEchoSoundwave.cs +++ /dev/null @@ -1,138 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Xna.Framework; -using System; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Terraria.Audio; -using CalamityMod.NPCs.NormalNPCs; -using CalamityMod.Sounds; - -namespace CalamityMod.Projectiles.Magic -{ - public class HadopelagicEchoSoundwave : ModProjectile - { - public override string Texture => "CalamityMod/Projectiles/Magic/EidolicWailSoundwave"; - - private int echoCooldown = 0; - private bool playedSound = false; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Echo"); - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - } - - public override void SetDefaults() - { - Projectile.width = 36; - Projectile.height = 36; - Projectile.scale = 0.005f; - Projectile.alpha = 100; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.penetrate = -1; - Projectile.extraUpdates = 1; - Projectile.DamageType = DamageClass.Magic; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 16; - Projectile.timeLeft = 450; - } - - public override void AI() - { - if (Projectile.ai[0] == 0f || Projectile.ai[0] == 4f) - { - if (!playedSound) - { - SoundEngine.PlaySound(Main.rand.NextBool(100) ? Sunskater.DeathSound : CommonCalamitySounds.WyrmScreamSound, Projectile.Center); - playedSound = true; - } - } - - if (Projectile.localAI[0] < 1f) - { - Projectile.localAI[0] += 0.05f; - Projectile.scale += 0.05f; - Projectile.width = (int)(36f * Projectile.scale); - Projectile.height = (int)(36f * Projectile.scale); - } - else - { - Projectile.width = 36; - Projectile.height = 36; - } - - if (echoCooldown > 0) - echoCooldown--; - - Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X); - } - - public override bool OnTileCollide(Vector2 oldVelocity) - { - if (Projectile.velocity.X != oldVelocity.X) - Projectile.velocity.X = -oldVelocity.X; - - if (Projectile.velocity.Y != oldVelocity.Y) - Projectile.velocity.Y = -oldVelocity.Y; - - return false; - } - - public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - damage = (int)(damage * Projectile.localAI[0]); - } - - public override void ModifyHitPvp(Player target, ref int damage, ref bool crit) - { - damage = (int)(damage * Projectile.localAI[0]); - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 240); - if (echoCooldown <= 0) - { - echoCooldown = 120; - int echoID = ModContent.ProjectileType(); - int echoDamage = (int)(0.2f * Projectile.damage); - float echoKB = Projectile.knockBack / 3; - int echos = 2; - for (int i = 0; i < echos; ++i) - { - float startDist = Main.rand.NextFloat(260f, 270f); - Vector2 startDir = Main.rand.NextVector2Unit(); - Vector2 startPoint = target.Center + (startDir * startDist); - - float echoSpeed = Main.rand.NextFloat(15f, 18f); - Vector2 velocity = startDir * (-echoSpeed); - - if (Projectile.owner == Main.myPlayer) - { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), startPoint, velocity, echoID, echoDamage, echoKB, Projectile.owner); - } - } - } - } - - public override Color? GetAlpha(Color lightColor) - { - if (Projectile.timeLeft < 85) - { - byte b2 = (byte)(Projectile.timeLeft * 3); - byte a2 = (byte)(100f * ((float)b2 / 255f)); - return new Color((int)b2, (int)b2, (int)b2, (int)a2); - } - return new Color(255, 255, 255, 100); - } - - public override bool PreDraw(ref Color lightColor) - { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); - return false; - } - } -}