diff --git a/Items/Weapons/Ranged/Archerfish.cs b/Items/Weapons/Ranged/Archerfish.cs index 832005afad..c4a322bf78 100644 --- a/Items/Weapons/Ranged/Archerfish.cs +++ b/Items/Weapons/Ranged/Archerfish.cs @@ -43,6 +43,14 @@ namespace CalamityMod.Items.Weapons.Ranged else Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); + Projectile.NewProjectile(source, + position, + velocity * 0.5f, + ModContent.ProjectileType(), + (int)(damage * 0.5f), + knockback * 3f, + player.whoAmI); + return false; } } diff --git a/Items/Weapons/Ranged/Megalodon.cs b/Items/Weapons/Ranged/Megalodon.cs index 035f1490fb..e224595364 100644 --- a/Items/Weapons/Ranged/Megalodon.cs +++ b/Items/Weapons/Ranged/Megalodon.cs @@ -53,6 +53,15 @@ namespace CalamityMod.Items.Weapons.Ranged else Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0f); + if (shotType < 3) + Projectile.NewProjectile(source, + position, + velocity.RotatedByRandom(MathHelper.ToRadians(4.5f)) * Main.rand.NextFloat(0.5f, 0.6f), + ModContent.ProjectileType(), + (int)(damage * 0.5f), + knockback * 4f, + player.whoAmI); + shotType++; return false; diff --git a/Items/Weapons/Ranged/Seadragon.cs b/Items/Weapons/Ranged/Seadragon.cs index ba0cc01781..2cf696d57d 100644 --- a/Items/Weapons/Ranged/Seadragon.cs +++ b/Items/Weapons/Ranged/Seadragon.cs @@ -15,6 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; private int shotType = 1; private bool rocket = false; + private bool blast = false; //Melee Explosion every 9th shot out of 18 public override void SetDefaults() { @@ -47,18 +48,43 @@ namespace CalamityMod.Items.Weapons.Ranged float SpeedX = velocity.X + (float)Main.rand.Next(-10, 11) * 0.05f; float SpeedY = velocity.Y + (float)Main.rand.Next(-10, 11) * 0.05f; - if (shotType > 17) + if (shotType > 18) { shotType = 1; rocket = true; } + if (shotType > 8) //didn''t let me do "= 9" + { + if (shotType < 10) + { + blast = true; + } + } + if (blast) + Projectile.NewProjectile(source, + position, + velocity.RotatedByRandom(MathHelper.ToRadians(4.5f)) * 0, + ModContent.ProjectileType(), + (int)(damage * 1.2f), + knockback * 7f, + player.whoAmI); + blast = false; if (!rocket) { if (shotType % 2 == 1) Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI, 0.0f, 0.0f); else Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0f); + + if (shotType < 19) + Projectile.NewProjectile(source, + position, + velocity.RotatedByRandom(MathHelper.ToRadians(5.5f)) * Main.rand.NextFloat(0.45f, 0.65f), + ModContent.ProjectileType(), + (int)(damage * 0.5f), + knockback * 4f, + player.whoAmI); shotType++; } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson index 73bca4d6a4..c866076d6a 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson @@ -246,4 +246,6 @@ VeriumBulletProj.DisplayName: Verium Bullet Voidragon.DisplayName: Blast VoidragonTentacle.DisplayName: Voidragon Tentacle WaterSpout.DisplayName: Spout -WulfrumScrapBullet.DisplayName: High Speed Scrap \ No newline at end of file +WulfrumScrapBullet.DisplayName: High Speed Scrap +ArcherfishRing.DisplayName: Archerfish Ring +SeaDragonFlameburst.DisplayName: Sea Dragon Flameburst \ No newline at end of file diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 1ad7fdcfa0..81685e2d3a 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -125,6 +125,7 @@ namespace CalamityMod.Projectiles { ProjectileID.IchorBullet, standardBulletTweaks }, { ProjectileID.InfernoHostileBlast, defenseDamage }, // Diabolist inferno fork explosions { ProjectileID.IronShortswordStab, trueMelee }, + { ProjectileID.InfluxWaver, Do(ExtraUpdatesExact(1)) }, { ProjectileID.JavelinHostile, defenseDamage }, { ProjectileID.JestersArrow, pointBlank }, { ProjectileID.JoustingLance, trueMelee }, diff --git a/Projectiles/Magic/TearsofHeavenProjectile.cs b/Projectiles/Magic/TearsofHeavenProjectile.cs index edb9a7c95d..db198c1f1b 100644 --- a/Projectiles/Magic/TearsofHeavenProjectile.cs +++ b/Projectiles/Magic/TearsofHeavenProjectile.cs @@ -1,8 +1,9 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Dusts; namespace CalamityMod.Projectiles.Magic { public class TearsofHeavenProjectile : ModProjectile, ILocalizedModType @@ -41,12 +42,10 @@ namespace CalamityMod.Projectiles.Magic Projectile.localAI[0] += 1f; if (Projectile.localAI[0] > 4f) { - int num469 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 175, 0f, 0f, 100, default, 1f); - Main.dust[num469].noGravity = true; - int num96 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 174, 0f, 0f, 100, default, 1f); - Main.dust[num96].noGravity = true; - int num102 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 92, 0f, 0f, 100, default, 1f); - Main.dust[num102].noGravity = true; + int Smalldust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 1f); + Main.dust[Smalldust].noGravity = true; + int Bigdust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 2f); + Main.dust[Bigdust].noGravity = true; } CalamityUtils.HomeInOnNPC(Projectile, true, 250f, 8f, 20f); diff --git a/Projectiles/Ranged/ArcherfishRing.cs b/Projectiles/Ranged/ArcherfishRing.cs new file mode 100644 index 0000000000..ac4526b716 --- /dev/null +++ b/Projectiles/Ranged/ArcherfishRing.cs @@ -0,0 +1,74 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.DataStructures; +using Terraria.ModLoader; +using Terraria.Audio; + + +namespace CalamityMod.Projectiles.Ranged +{ + public class ArcherfishRing : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Ranged"; + + public override void SetDefaults() + { + Projectile.width = 60; + Projectile.height = 34; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Ranged; + Projectile.ignoreWater = true; + Projectile.penetrate = 2; + Projectile.tileCollide = false; + Projectile.alpha = 115; + Projectile.timeLeft = 300; + Projectile.MaxUpdates = 3; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration; + } + + public override void AI() + { + //The ring expanding slowing while increasing opacity until it disappears at max size + + if (Projectile.ai[0] == 0) + { + Projectile.scale = 0.2f; + Projectile.ai[0]++; + } + + if (Projectile.scale <= 1.5f) + { + Projectile.scale *= 1.035f; + } + if (Projectile.velocity.X > -0.8f && Projectile.velocity.X < 0.8f & + Projectile.velocity.Y > -0.8f && Projectile.velocity.Y < 0.8f) + { + Projectile.alpha += 10; + } + if (Projectile.alpha >= 255) + { + Projectile.Kill(); + } + else + { + Projectile.velocity *= 0.95f; + } + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; + + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + //Audio feedback for hitting the ring + Player user = Main.player[Projectile.owner]; + SoundEngine.PlaySound(SoundID.Item21, Projectile.position); + + target.AddBuff(BuffID.Wet, 240); + } + } +} diff --git a/Projectiles/Ranged/ArcherfishRing.png b/Projectiles/Ranged/ArcherfishRing.png new file mode 100644 index 0000000000..bd321597a9 Binary files /dev/null and b/Projectiles/Ranged/ArcherfishRing.png differ diff --git a/Projectiles/Ranged/ArcherfishShot.cs b/Projectiles/Ranged/ArcherfishShot.cs index 185f2d2ea3..e6b3587336 100644 --- a/Projectiles/Ranged/ArcherfishShot.cs +++ b/Projectiles/Ranged/ArcherfishShot.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; diff --git a/Projectiles/Ranged/SeaDragonFlameburst.cs b/Projectiles/Ranged/SeaDragonFlameburst.cs new file mode 100644 index 0000000000..37249e393f --- /dev/null +++ b/Projectiles/Ranged/SeaDragonFlameburst.cs @@ -0,0 +1,76 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.DataStructures; +using Terraria.ModLoader; +using Terraria.Audio; + + +namespace CalamityMod.Projectiles.Ranged +{ + public class SeaDragonFlameburst : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Ranged"; + public int frameX = 0; + public int frameY = 0; + public int currentFrame => frameY + frameX * 4; + + public override void SetDefaults() //Mostly Copied from ArcherfishRing + { + Projectile.width = 322; + Projectile.height = 81; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Ranged; + Projectile.ignoreWater = true; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + Projectile.alpha = 225; + Projectile.timeLeft = 20; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration; + } + + public override void AI() //Mostly Copied from SubductionFlameburst and ArcherfishRing + { + //2-6 + Projectile.frameCounter += 1; + if (Projectile.frameCounter % 7 == 6) + { + frameY += 1; + if (frameY >= 4) + { + frameX += 1; + frameY = 0; + } + if (frameX >= 3) + { + Projectile.Kill(); + } + } + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; + } + + + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = ModContent.Request(Texture).Value; + Rectangle frame = new Rectangle(frameX * Projectile.width, frameY * Projectile.height, Projectile.width, Projectile.height); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0); + return false; + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + //Audio feedback for hitting the blast + Player user = Main.player[Projectile.owner]; + SoundEngine.PlaySound(SoundID.DD2_ExplosiveTrapExplode, Projectile.position); + + target.AddBuff(BuffID.OnFire3, 240); + target.AddBuff(BuffID.Daybreak, 420); + } + } +} diff --git a/Projectiles/Ranged/SeaDragonFlameburst.png b/Projectiles/Ranged/SeaDragonFlameburst.png new file mode 100644 index 0000000000..69baceb1cb Binary files /dev/null and b/Projectiles/Ranged/SeaDragonFlameburst.png differ diff --git a/Projectiles/Ranged/SeaDragonRocket.cs b/Projectiles/Ranged/SeaDragonRocket.cs index d7b45f65b2..ee3343d038 100644 --- a/Projectiles/Ranged/SeaDragonRocket.cs +++ b/Projectiles/Ranged/SeaDragonRocket.cs @@ -8,6 +8,7 @@ namespace CalamityMod.Projectiles.Ranged { public class SeaDragonRocket : ModProjectile, ILocalizedModType { + public Player owner => Main.player[Projectile.owner]; public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetDefaults() { @@ -34,7 +35,7 @@ namespace CalamityMod.Projectiles.Ranged } } Projectile.ai[1] = 1f; - SoundEngine.PlaySound(SoundID.Item109, Projectile.position); + SoundEngine.PlaySound(SoundID.Item109, owner.Center); } Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Projectile.owner == Main.myPlayer && Projectile.timeLeft <= 3) diff --git a/Projectiles/Rogue/SubductionFlameburst.png b/Projectiles/Rogue/SubductionFlameburst.png index 0d3852064a..3cb0646a19 100644 Binary files a/Projectiles/Rogue/SubductionFlameburst.png and b/Projectiles/Rogue/SubductionFlameburst.png differ