Made Hardened Honeycomb gravity not suck

This commit is contained in:
CongratsIsTrash committed 2024-05-14 15:40:17 -04:00
1 parent a51cc4a7f3
commit d8a615b64a
2 files changed
+31 -15

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue
Item.value = 300;
Item.rare = ItemRarityID.Orange;
Item.shoot = ModContent.ProjectileType<Honeycomb>();
Item.shootSpeed = 10f;
Item.shootSpeed = 14f;
Item.DamageType = RogueDamageClass.Instance;
}
+30 -14
View File
@@ -21,12 +21,26 @@ namespace CalamityMod.Projectiles.Rogue
Projectile.height = 30;
Projectile.friendly = true;
Projectile.penetrate = 1;
Projectile.aiStyle = ProjAIStyleID.ThrownProjectile;
//Projectile.aiStyle = ProjAIStyleID.ThrownProjectile;
Projectile.timeLeft = 300;
AIType = ProjectileID.ThrowingKnife;
//AIType = ProjectileID.ThrowingKnife;
Projectile.DamageType = RogueDamageClass.Instance;
}
public override void AI()
{
Projectile.ai[0]++;
Projectile.rotation += MathHelper.ToRadians(Projectile.velocity.X * 1.25f);
if (Projectile.ai[0] > 45)
{
Projectile.velocity.X *= 0.97f;
Projectile.velocity.Y += 0.28f;
if (Projectile.velocity.Y > 18f)
Projectile.velocity.Y = 18f;
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
Player player = Main.player[Main.myPlayer];
@@ -43,6 +57,20 @@ namespace CalamityMod.Projectiles.Rogue
SpawnProjectiles();
}
public override void OnKill(int timeLeft)
{
SoundEngine.PlaySound(SoundID.NPCDeath1, Projectile.position);
SpawnProjectiles();
//Dust on impact
int dust_splash = 0;
while (dust_splash < 9)
{
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Copper, -Projectile.velocity.X * 0.15f, -Projectile.velocity.Y * 0.15f, 159, default, 1.5f);
dust_splash += 1;
}
}
public void SpawnProjectiles()
{
Player player = Main.player[Main.myPlayer];
@@ -72,17 +100,5 @@ namespace CalamityMod.Projectiles.Rogue
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
return false;
}
public override void OnKill(int timeLeft)
{
SoundEngine.PlaySound(SoundID.NPCDeath1, Projectile.position);
//Dust on impact
int dust_splash = 0;
while (dust_splash < 9)
{
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Copper, -Projectile.velocity.X * 0.15f, -Projectile.velocity.Y * 0.15f, 159, default, 1.5f);
dust_splash += 1;
}
}
}
}