Increased lightning accuracy
This commit is contained in:
1 parent
b68a588a9e
commit
724932ac7e
2 files changed
+5
-5
No files matched your search
@@ -120,11 +120,11 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
// Potential directions with very little Y speed should not be considered, because this
|
||||
// consequentially means that the X speed would be quite large.
|
||||
if (potentialBaseDirection.Y > -0.25f)
|
||||
if (potentialBaseDirection.Y > -0.2f)
|
||||
canChangeLightningDirection = false;
|
||||
|
||||
//No very fast X speeds either, its gotta hit at least consistently y'know
|
||||
if (potentialBaseDirection.X < -0.25f || potentialBaseDirection.X > 0.25f)
|
||||
if (potentialBaseDirection.X < -0.2f || potentialBaseDirection.X > 0.2f)
|
||||
canChangeLightningDirection = false;
|
||||
|
||||
// If the above checks were all passed, redefine the base direction of the lightning.
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < times; i++)
|
||||
{
|
||||
int lightningDamage = (int)(Projectile.damage * StormfrontRazor.LightningDamageFactor);
|
||||
Vector2 lightningSpawnPosition = Projectile.Center - Vector2.UnitY.RotatedByRandom(0.25f) * 1000f;
|
||||
Vector2 lightningSpawnPosition = Projectile.Center - Vector2.UnitY.RotatedByRandom(0.2f) * 1000f;
|
||||
Vector2 lightningShootVelocity = (target.Center - lightningSpawnPosition + target.velocity * 7.5f).SafeNormalize(Vector2.UnitY) * 14f;
|
||||
int lightning = Projectile.NewProjectile(Projectile.GetSource_FromThis(), lightningSpawnPosition, lightningShootVelocity, ModContent.ProjectileType<StormfrontLightning>(), lightningDamage, 0f, Projectile.owner);
|
||||
if (Main.projectile.IndexInRange(lightning))
|
||||
@@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < times; i++)
|
||||
{
|
||||
int lightningDamage = (int)(Projectile.damage * StormfrontRazor.LightningDamageFactor);
|
||||
Vector2 lightningSpawnPosition = Projectile.Center - Vector2.UnitY.RotatedByRandom(0.24f) * 1100f;
|
||||
Vector2 lightningSpawnPosition = Projectile.Center - Vector2.UnitY.RotatedByRandom(0.2f) * 1000f;
|
||||
Vector2 lightningShootVelocity = (target.Center - lightningSpawnPosition + target.velocity * 7.5f).SafeNormalize(Vector2.UnitY) * 14f;
|
||||
int lightning = Projectile.NewProjectile(Projectile.GetSource_FromThis(), lightningSpawnPosition, lightningShootVelocity, ModContent.ProjectileType<StormfrontLightning>(), lightningDamage, 0f, Projectile.owner);
|
||||
if (Main.projectile.IndexInRange(lightning))
|
||||
@@ -141,7 +141,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < times; i++)
|
||||
{
|
||||
int lightningDamage = (int)(Projectile.damage * StormfrontRazor.LightningDamageFactor);
|
||||
Vector2 lightningSpawnPosition = Projectile.Center - Vector2.UnitY.RotatedByRandom(0.24f) * 1100f;
|
||||
Vector2 lightningSpawnPosition = Projectile.Center - Vector2.UnitY.RotatedByRandom(0.2f) * 1000f;
|
||||
Vector2 lightningShootVelocity = (Projectile.Center - lightningSpawnPosition + Projectile.velocity * 7.5f).SafeNormalize(Vector2.UnitY) * 14f;
|
||||
int lightning = Projectile.NewProjectile(Projectile.GetSource_FromThis(), lightningSpawnPosition, lightningShootVelocity, ModContent.ProjectileType<StormfrontLightning>(), lightningDamage, 0f, Projectile.owner);
|
||||
if (Main.projectile.IndexInRange(lightning))
|
||||
|
||||
Reference in new issue
Block a user