Buffed Tarragon Darts by 25%, now uses local iframes & has an extra update. Doubled piercing.

This commit is contained in:
Ozzatron committed 2021-01-20 15:12:19 -05:00
1 parent 721a485f3d
commit 43d1671bb2
2 files changed
+27 -23

No files matched your search

+2 -2
View File
@@ -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<TarragonThrowingDartProjectile>();
item.shootSpeed = 24f;
item.shootSpeed = 12f;
item.Calamity().rogue = true;
item.Calamity().customRarity = CalamityRarity.Turquoise;
}
@@ -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<TarraThornRight>(), 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<TarraThornRight>(), 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<TarraThornRight>();
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);
}
}
}
}
}
}