From 43d1671bb2dd61099bcbf0182602f2af315ec045 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 20 Jan 2021 15:12:19 -0500 Subject: [PATCH] Buffed Tarragon Darts by 25%, now uses local iframes & has an extra update. Doubled piercing. --- Items/Weapons/Rogue/TarragonThrowingDart.cs | 4 +- .../Rogue/TarragonThrowingDartProjectile.cs | 46 ++++++++++--------- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/Items/Weapons/Rogue/TarragonThrowingDart.cs b/Items/Weapons/Rogue/TarragonThrowingDart.cs index 152a705709..31ecf6b453 100644 --- a/Items/Weapons/Rogue/TarragonThrowingDart.cs +++ b/Items/Weapons/Rogue/TarragonThrowingDart.cs @@ -19,7 +19,7 @@ Stealth strikes erupt into thorns on enemy hits"); public override void SafeSetDefaults() { item.width = 34; - item.damage = 260; + item.damage = 330; item.noMelee = true; item.consumable = true; item.noUseGraphic = true; @@ -34,7 +34,7 @@ Stealth strikes erupt into thorns on enemy hits"); item.value = Item.sellPrice(silver: 3); item.rare = ItemRarityID.Purple; item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 24f; + item.shootSpeed = 12f; item.Calamity().rogue = true; item.Calamity().customRarity = CalamityRarity.Turquoise; } diff --git a/Projectiles/Rogue/TarragonThrowingDartProjectile.cs b/Projectiles/Rogue/TarragonThrowingDartProjectile.cs index c21e57e9aa..a24403ae50 100644 --- a/Projectiles/Rogue/TarragonThrowingDartProjectile.cs +++ b/Projectiles/Rogue/TarragonThrowingDartProjectile.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - DisplayName.SetDefault("Dart"); + DisplayName.SetDefault("Tarragon Throwing Dart"); } public override void SetDefaults() @@ -22,14 +22,14 @@ namespace CalamityMod.Projectiles.Rogue projectile.width = 12; projectile.height = 12; projectile.friendly = true; - projectile.penetrate = 3; + projectile.penetrate = 6; projectile.aiStyle = 113; projectile.timeLeft = 600; aiType = ProjectileID.BoneJavelin; projectile.Calamity().rogue = true; - projectile.usesIDStaticNPCImmunity = true; - projectile.idStaticNPCHitCooldown = 3; - projectile.localNPCHitCooldown = 10; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 8; + projectile.extraUpdates = 1; } public override void AI() @@ -58,22 +58,26 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - if (Main.myPlayer == projectile.owner) - { - if (projectile.Calamity().stealthStrike) - { - float random = Main.rand.Next(30, 90); - float spread = random * 0.0174f; - double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2; - double deltaAngle = spread / 8f; - for (int i = 0; i < 4; i++) - { - double offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - int proj1 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f) * 2f, (float)(Math.Cos(offsetAngle) * 5f) * 2f, ModContent.ProjectileType(), projectile.damage / 4, projectile.knockBack / 4, projectile.owner, 0f, 0f); - int proj2 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f) * 2f, (float)(-Math.Cos(offsetAngle) * 5f) * 2f, ModContent.ProjectileType(), projectile.damage / 4, projectile.knockBack / 4, projectile.owner, 0f, 0f); - } - } - } + if (Main.myPlayer == projectile.owner) + { + if (projectile.Calamity().stealthStrike) + { + float random = Main.rand.Next(30, 90); + float spread = random * 0.0174f; + double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2; + double deltaAngle = spread / 8f; + + int projID = ModContent.ProjectileType(); + int splitDamage = (int)(projectile.damage * 0.25f); + float splitKB = 1f; + for (int i = 0; i < 4; i++) + { + double offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f) * 2f, (float)(Math.Cos(offsetAngle) * 5f) * 2f, projID, splitDamage, splitKB, projectile.owner); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f) * 2f, (float)(-Math.Cos(offsetAngle) * 5f) * 2f, projID, splitDamage, splitKB, projectile.owner); + } + } + } } } }