From faece944dfd7ed7a1b1e70f9b7824c717ca1f78a Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 6 Sep 2020 14:33:03 -0400 Subject: [PATCH] Increased the roaming range of a few summons Haunted Dishes are now slightly more accurate and fire faster --- Projectiles/Summon/ApexShark.cs | 4 ++-- Projectiles/Summon/AquaticStarMinion.cs | 2 +- Projectiles/Summon/HauntedDishes.cs | 14 +++++++------- Projectiles/Summon/IceClasperMinion.cs | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Projectiles/Summon/ApexShark.cs b/Projectiles/Summon/ApexShark.cs index d42ac52fac..c195f32f2b 100644 --- a/Projectiles/Summon/ApexShark.cs +++ b/Projectiles/Summon/ApexShark.cs @@ -75,8 +75,8 @@ namespace CalamityMod.Projectiles.Summon { projectile.frame = 0; } - float num633 = 700f; - float num634 = 1000f; + float num633 = 1200f; + float num634 = 1500f; float num635 = 2200f; float num636 = 150f; bool flag64 = projectile.type == ModContent.ProjectileType(); diff --git a/Projectiles/Summon/AquaticStarMinion.cs b/Projectiles/Summon/AquaticStarMinion.cs index 93ac1816d0..d2b77255e5 100644 --- a/Projectiles/Summon/AquaticStarMinion.cs +++ b/Projectiles/Summon/AquaticStarMinion.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Summon } projectile.rotation += projectile.velocity.X * 0.04f; - projectile.ChargingMinionAI(600f, 800f, 1200f, 150f, 0, 40f, 8f, 4f, new Vector2(0f, -60f), 40f, 9.5f, false, false); + projectile.ChargingMinionAI(1200f, 1500f, 2200f, 150f, 0, 40f, 8f, 4f, new Vector2(0f, -60f), 40f, 9.5f, false, false); } public override bool OnTileCollide(Vector2 oldVelocity) => false; diff --git a/Projectiles/Summon/HauntedDishes.cs b/Projectiles/Summon/HauntedDishes.cs index 70ffa18b50..be6cdc1ad3 100644 --- a/Projectiles/Summon/HauntedDishes.cs +++ b/Projectiles/Summon/HauntedDishes.cs @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Summon float playerX = player.position.X + (float) (player.width / 2) - vector2.X; float playerY = player.position.Y + (float) (player.height / 2) - vector2.Y; float playerDist = (float)Math.Sqrt(playerX * playerX + playerY * playerY); - if (playerDist > 1000f) + if (playerDist > 1500f) { projectile.ai[0] = 1f; } @@ -116,10 +116,10 @@ namespace CalamityMod.Projectiles.Summon if (projectile.ai[0] != 0f) //flying back to the player { projectile.tileCollide = false; - float npcDetectRange = 800f; + float npcDetectRange = 1200f; bool npcFound = false; int num6 = -1; - for (int index = 0; index < Main.npc.Length; ++index) + for (int index = 0; index < Main.maxNPCs; ++index) { NPC npc2 = Main.npc[index]; if (npc2.CanBeChasedBy((object) projectile, false)) @@ -289,7 +289,7 @@ namespace CalamityMod.Projectiles.Summon } if (num9 == -1) { - for (int index = 0; index < Main.npc.Length; ++index) + for (int index = 0; index < Main.maxNPCs; ++index) { if (Main.npc[index].CanBeChasedBy((object) projectile, false)) { @@ -356,16 +356,16 @@ namespace CalamityMod.Projectiles.Summon projectile.ai[1] = attackCooldown; double num11 = 12.0; Vector2 vector2 = new Vector2(projectile.Center.X, projectile.Center.Y - 8f); - float num12 = num5 - vector2.X + (float) Main.rand.Next(-10, 11); + float num12 = num5 - vector2.X + Main.rand.NextFloat(-6f, 6f); float num14 = (float) ((double) (Math.Abs(num12) * 0.1f) * (double) Main.rand.Next(0, 100) * (1.0 / 1000.0)); - float num15 = num6 - vector2.Y + (float) Main.rand.Next(-10, 11) - num14; + float num15 = num6 - vector2.Y + Main.rand.NextFloat(-6f, 6f) - num14; double num16 = Math.Sqrt((double) num12 * (double) num12 + (double) num15 * (double) num15); float num17 = (float) (num11 / num16); float SpeedX = num12 * num17; float SpeedY = num15 * num17; int damage = projectile.damage; int Type = ModContent.ProjectileType(); - int index = Projectile.NewProjectile(vector2.X, vector2.Y, SpeedX * 1.5f, SpeedY * 1.5f, Type, damage, projectile.knockBack, projectile.owner, 0f, 0f); + int index = Projectile.NewProjectile(vector2.X, vector2.Y, SpeedX * 2f, SpeedY * 2f, Type, damage, projectile.knockBack, projectile.owner, 0f, 0f); if (SpeedX < 0f) projectile.direction = -1; if (SpeedX > 0f) diff --git a/Projectiles/Summon/IceClasperMinion.cs b/Projectiles/Summon/IceClasperMinion.cs index 8006752eb9..8197224a58 100644 --- a/Projectiles/Summon/IceClasperMinion.cs +++ b/Projectiles/Summon/IceClasperMinion.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Summon { projectile.frame = 0; } - Lighting.AddLight((int)((projectile.position.X + (float)(projectile.width / 2)) / 16f), (int)((projectile.position.Y + (float)(projectile.height / 2)) / 16f), 0.05f, 0.15f, 0.2f); + Lighting.AddLight((int)projectile.Center.X / 16, (int)projectile.Center.Y / 16f, 0.05f, 0.15f, 0.2f); bool flag64 = projectile.type == ModContent.ProjectileType(); player.AddBuff(ModContent.BuffType(), 3600); if (flag64) @@ -89,9 +89,9 @@ namespace CalamityMod.Projectiles.Summon } } - projectile.ChargingMinionAI(700f, 1000f, 2200f, 150f, 0, 40f, 9f, 4f, new Vector2(0f, -60f), 40f, 9f, true, true); + projectile.ChargingMinionAI(1200f, 1500f, 2200f, 150f, 0, 40f, 9f, 4f, new Vector2(0f, -60f), 40f, 9f, true, true); - projectile.rotation = projectile.velocity.ToRotation() - 1.57f; + projectile.rotation = projectile.velocity.ToRotation() - MathHelper.PiOver2; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)