nerfed skyfin bomber homing speed and stealth strike
This commit is contained in:
1 parent
ebcde01b6d
commit
40527ab0a3
1 file changed
+11
-12
@@ -32,12 +32,15 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt();
|
||||
projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? 0f : MathHelper.Pi);
|
||||
|
||||
const float turnSpeed = 10f;
|
||||
const float speedMult = 20f;
|
||||
const float homingRange = 800f;
|
||||
if (!projectile.Calamity().stealthStrike) //normal attack
|
||||
{
|
||||
projectile.ai[0]++;
|
||||
if (projectile.ai[0] > 30f) //0.5 seconds
|
||||
{
|
||||
NPC target = projectile.Center.ClosestNPCAt(800f);
|
||||
NPC target = projectile.Center.ClosestNPCAt(homingRange);
|
||||
// Ignore targets above the nuke
|
||||
if (target != null)
|
||||
{
|
||||
@@ -48,8 +51,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
if (target != null)
|
||||
{
|
||||
const float turnSpeed = 10f;
|
||||
const float speedMult = 40f;
|
||||
Vector2 distNorm = (target.Center - projectile.Center).SafeNormalize(Vector2.UnitX);
|
||||
projectile.velocity = (projectile.velocity * (turnSpeed - 1f) + distNorm * speedMult) / turnSpeed;
|
||||
}
|
||||
@@ -58,7 +59,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
else
|
||||
{
|
||||
//More range
|
||||
CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 800f, 40f, 10f);
|
||||
CalamityGlobalProjectile.HomeInOnNPC(projectile, false, homingRange, speedMult, turnSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,21 +76,19 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
projectile.localNPCHitCooldown = 10;
|
||||
projectile.Damage();
|
||||
|
||||
int num220 = Main.rand.Next(2, 5);
|
||||
int cloudAmt = Main.rand.Next(2, 5);
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
for (int num221 = 0; num221 < num220; num221++)
|
||||
for (int c = 0; c < cloudAmt; c++)
|
||||
{
|
||||
Vector2 value17 = new Vector2((float)Main.rand.Next(-50, 51), (float)Main.rand.Next(-50, 51));
|
||||
value17.Normalize();
|
||||
value17 *= (float)Main.rand.Next(10, 51) * 0.01f;
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value17.X, value17.Y, ModContent.ProjectileType<SkyBomberGas>(), (int)(projectile.damage * 0.4), projectile.knockBack * 0.4f, projectile.owner, 0f, 0f);
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(50f, 10f, 50f, 0.01f);
|
||||
Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType<SkyBomberGas>(), (int)(projectile.damage * 0.4), projectile.knockBack * 0.4f, projectile.owner);
|
||||
}
|
||||
if (projectile.Calamity().stealthStrike)
|
||||
{
|
||||
int explode = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType<BileExplosion>(), (int)(projectile.damage * 0.5), projectile.knockBack * 0.5f, projectile.owner, 1f);
|
||||
int explode = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType<BileExplosion>(), (int)(projectile.damage * 0.4), projectile.knockBack * 0.4f, projectile.owner, 1f);
|
||||
Main.projectile[explode].usesLocalNPCImmunity = true;
|
||||
Main.projectile[explode].localNPCHitCooldown = 20;
|
||||
Main.projectile[explode].localNPCHitCooldown = 30;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user