Increased the roaming range of a few summons

Haunted Dishes are now slightly more accurate and fire faster
This commit is contained in:
termigator1359 committed 2020-09-06 14:33:03 -04:00
1 parent 0acbed11f4
commit faece944df
4 files changed
+13 -13

No files matched your search

+2 -2
View File
@@ -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<ApexShark>();
+1 -1
View File
@@ -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;
+7 -7
View File
@@ -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<PlateProjectile>();
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)
+3 -3
View File
@@ -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<IceClasperMinion>();
player.AddBuff(ModContent.BuffType<IceClasper>(), 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)