public static void ProjectileKilled(Projectile p)
{
if (p.type == 882)
{
UlterrariaProjectiles.ExplosionEffect(p);
}
if (p.type == 843)
{
Main.PlaySound(2, (int)p.position.X, (int)p.position.Y, 14);
for (int num500 = 0; num500 < 10; num500++)
{
Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 31, 0f, 0f, 100, default(Color), 1.5f);
}
for (int num501 = 0; num501 < 5; num501++)
{
int num502 = Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 6, 0f, 0f, 100, default(Color), 2.5f);
Main.dust[num502].noGravity = true;
Main.dust[num502].velocity *= 3f;
num502 = Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 6, 0f, 0f, 100, default(Color), 1.5f);
Main.dust[num502].velocity *= 2f;
}
int num503 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
Main.gore[num503].velocity *= 0.4f;
Gore expr_105D2_cp_0 = Main.gore[num503];
expr_105D2_cp_0.velocity.X = expr_105D2_cp_0.velocity.X + (float)Main.rand.Next(-10, 11) * 0.1f;
Gore expr_10602_cp_0 = Main.gore[num503];
expr_10602_cp_0.velocity.Y = expr_10602_cp_0.velocity.Y + (float)Main.rand.Next(-10, 11) * 0.1f;
num503 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
Main.gore[num503].velocity *= 0.4f;
Gore expr_10696_cp_0 = Main.gore[num503];
expr_10696_cp_0.velocity.X = expr_10696_cp_0.velocity.X + (float)Main.rand.Next(-10, 11) * 0.1f;
Gore expr_106C6_cp_0 = Main.gore[num503];
expr_106C6_cp_0.velocity.Y = expr_106C6_cp_0.velocity.Y + (float)Main.rand.Next(-10, 11) * 0.1f;
if (p.owner == Main.myPlayer)
{
p.penetrate = -1;
p.position.X = p.position.X + (float)(p.width / 2);
p.position.Y = p.position.Y + (float)(p.height / 2);
p.width = 48;
p.height = 48;
p.position.X = p.position.X - (float)(p.width / 2);
p.position.Y = p.position.Y - (float)(p.height / 2);
p.damage = 100;
p.Damage();
}
}
if (p.type == 852)
{
float angle = -45;
for (int i = 0; i < 8; i++)
{
angle += 45;
float rads = MathHelper.ToRadians(angle);
Vector2 vel = angle.ToRotationVector2();
vel *= 7f;
Projectile.NewProjectile(p.Center.X, p.Center.Y, vel.X, vel.Y, 24, (int)(p.damage * 0.8f), 0.2f);
}
for (int i = 0; i < 16; i++)
{
int d = Dust.NewDust(p.position, p.width, p.height, 41);
Main.dust[d].noGravity = true;
}
}
if (p.type == 849)
{
Main.PlaySound(2, (int)p.position.X, (int)p.position.Y, 14);
for (int num500 = 0; num500 < 10; num500++)
{
Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 31, 0f, 0f, 100, default(Color), 1.5f);
}
for (int num501 = 0; num501 < 5; num501++)
{
int num502 = Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 6, 0f, 0f, 100, default(Color), 2.5f);
Main.dust[num502].noGravity = true;
Main.dust[num502].velocity *= 3f;
num502 = Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 6, 0f, 0f, 100, default(Color), 1.5f);
Main.dust[num502].velocity *= 2f;
}
int num503 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
Main.gore[num503].velocity *= 0.4f;
Gore expr_105D2_cp_0 = Main.gore[num503];
expr_105D2_cp_0.velocity.X = expr_105D2_cp_0.velocity.X + (float)Main.rand.Next(-10, 11) * 0.1f;
Gore expr_10602_cp_0 = Main.gore[num503];
expr_10602_cp_0.velocity.Y = expr_10602_cp_0.velocity.Y + (float)Main.rand.Next(-10, 11) * 0.1f;
num503 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
Main.gore[num503].velocity *= 0.4f;
Gore expr_10696_cp_0 = Main.gore[num503];
expr_10696_cp_0.velocity.X = expr_10696_cp_0.velocity.X + (float)Main.rand.Next(-10, 11) * 0.1f;
Gore expr_106C6_cp_0 = Main.gore[num503];
expr_106C6_cp_0.velocity.Y = expr_106C6_cp_0.velocity.Y + (float)Main.rand.Next(-10, 11) * 0.1f;
if (p.owner == Main.myPlayer)
{
p.penetrate = -1;
p.position.X = p.position.X + (float)(p.width / 2);
p.position.Y = p.position.Y + (float)(p.height / 2);
p.width = 48;
p.height = 48;
p.position.X = p.position.X - (float)(p.width / 2);
p.position.Y = p.position.Y - (float)(p.height / 2);
p.damage = 100;
p.Damage();
}
float angle = -45;
for (int i = 0; i < 8; i++)
{
angle += 45;
float rads = MathHelper.ToRadians(angle);
Vector2 vel = angle.ToRotationVector2();
vel *= 7f;
Projectile.NewProjectile(p.Center.X, p.Center.Y, vel.X, vel.Y, 850, (int)(p.damage * 0.8f), 0.2f);
}
for (int i = 0; i < 16; i++)
{
int d = Dust.NewDust(p.position, p.width, p.height, 41);
Main.dust[d].noGravity = true;
}
}
if (p.type == 836)
{
float angle = -45;
for (int i = 0; i < 8; i++)
{
angle += 45;
float rads = MathHelper.ToRadians(angle);
Vector2 vel = angle.ToRotationVector2();
vel *= 7f;
Projectile.NewProjectile(p.Center.X, p.Center.Y, vel.X, vel.Y, 837, (int)(p.damage * 0.8f), 0.2f);
}
for (int i = 0; i < 16; i++)
{
int d = Dust.NewDust(p.position, p.width, p.height, 41);
Main.dust[d].noGravity = true;
}
}
if (p.type == 828)
{
for (int i = 0; i < 4; i++)
{
int d = Dust.NewDust(p.Center, 0, 0, 41);
Main.dust[d].noGravity = true;
}
for (int i = 0; i < 4; i++)
{
if (Main.rand.Next(2) == 0)
{
int side = Main.rand.Next(4) <= 1 ? 3 : -3;
Projectile.NewProjectile(p.Center.X, p.Center.Y, side, Main.rand.Next(0, 31) / 10, 829, 5, 2f, Main.myPlayer);
}
else
{
int side1 = Main.rand.Next(4) <= 1 ? 3 : -3;
Projectile.NewProjectile(p.Center.X, p.Center.Y, Main.rand.Next(-30, 31) / 10, side1, 829, 5, 2f, Main.myPlayer);
}
}
}
if (p.type == 811)
{
for (int i = 0; i < 4; i++)
{
int d = Dust.NewDust(p.Center, 0, 0, 76);
Main.dust[d].noGravity = true;
}
}
if (p.type == 812)
{
for (int l = 0; l < 128; l++)
{
int du = Dust.NewDust(p.position, p.width, p.height, 245, Main.rand.Next(-50, 51) / 100, Main.rand.Next(-50, 51) / 100);
Main.dust[du].color = Ulterraria.RainbowColor[Main.rand.Next(0, Ulterraria.rainbow.Length)];
Main.dust[du].fadeIn = 0.3f;
}
}
if (p.type == 794)
{
Projectile.NewProjectile(p.Center.X, p.Center.Y, 0f, 0f, 795, 69, 5f);
}
if (p.type == 793)
{
Main.PlaySound(2, (int)p.position.X, (int)p.position.Y, 14);
for (int num500 = 0; num500 < 10; num500++)
{
Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 31, 0f, 0f, 100, default(Color), 1.5f);
}
for (int num501 = 0; num501 < 5; num501++)
{
int num502 = Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 6, 0f, 0f, 100, default(Color), 2.5f);
Main.dust[num502].noGravity = true;
Main.dust[num502].velocity *= 3f;
num502 = Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 6, 0f, 0f, 100, default(Color), 1.5f);
Main.dust[num502].velocity *= 2f;
}
int num503 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
Main.gore[num503].velocity *= 0.4f;
Gore expr_105D2_cp_0 = Main.gore[num503];
expr_105D2_cp_0.velocity.X = expr_105D2_cp_0.velocity.X + (float)Main.rand.Next(-10, 11) * 0.1f;
Gore expr_10602_cp_0 = Main.gore[num503];
expr_10602_cp_0.velocity.Y = expr_10602_cp_0.velocity.Y + (float)Main.rand.Next(-10, 11) * 0.1f;
num503 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
Main.gore[num503].velocity *= 0.4f;
Gore expr_10696_cp_0 = Main.gore[num503];
expr_10696_cp_0.velocity.X = expr_10696_cp_0.velocity.X + (float)Main.rand.Next(-10, 11) * 0.1f;
Gore expr_106C6_cp_0 = Main.gore[num503];
expr_106C6_cp_0.velocity.Y = expr_106C6_cp_0.velocity.Y + (float)Main.rand.Next(-10, 11) * 0.1f;
if (p.owner == Main.myPlayer)
{
p.penetrate = -1;
p.position.X = p.position.X + (float)(p.width / 2);
p.position.Y = p.position.Y + (float)(p.height / 2);
p.width = 64;
p.height = 64;
p.position.X = p.position.X - (float)(p.width / 2);
p.position.Y = p.position.Y - (float)(p.height / 2);
p.Damage();
}
}
if (p.type == 792)
{
for (int j = 0; j < 200; j++)
{
if (Vector2.Distance(Main.npc[j].Center, p.Center) < 550f && Vector2.Distance(Main.npc[j].Center, p.Center) > 30f)
{
if (!Main.npc[j].boss && Main.npc[j].knockBackResist != 0f)
{
float sp = 6f - (Vector2.Distance(Main.npc[j].Center, p.position) / 120);
Vector2 pos = p.position - Main.npc[j].Center;
float mag = (float)Math.Sqrt(Math.Pow(pos.X, 2) + Math.Pow(pos.Y, 2));
if (mag > sp)
{
pos *= sp / mag;
}
Main.npc[j].velocity += pos *= 0.3f;
}
}
}
}
if (p.type == 791)
{
if (p.ai[2] == 0f)
{
for (int i = 0; i < 35; i++)
{
int randAngle = Main.rand.Next(0, 361);
Vector2 position = new Vector2(
(float)Math.Cos(MathHelper.ToRadians(randAngle)) * i + p.position.X,
(float)Math.Sin(MathHelper.ToRadians(randAngle)) * i + p.position.Y
);
Vector2 velocity = p.position - position;
velocity.Normalize();
velocity *= 4 + (i / 20);
int dust = Main.rand.Next(2) == 0 ? 6 : 35;
int newDust = Dust.NewDust(position, 38, 38, dust, -velocity.X, -velocity.Y, 50 + Main.rand.Next(0, 151));
Main.dust[newDust].noGravity = true;
Main.dust[newDust].velocity = velocity;
}
if (p.ai[1] == 0)
{
for (int k = 0; k < 8; k++)
{
Vector2 newVelocity = new Vector2((float)Math.Cos(p.rotation + (k * Math.PI / 4)), (float)Math.Sin(p.rotation + (k * Math.PI / 4)));
newVelocity *= -8f;
Projectile.NewProjectile(p.Center.X, p.Center.Y, newVelocity.X, newVelocity.Y, 791, 48, 3f, Main.myPlayer, 0f, 1f);
}
}
}
}
if (p.type == 787)
{
Main.PlaySound(2, (int)p.position.X, (int)p.position.Y, 62);
for (int num615 = 0; num615 < 30; num615++)
{
int num616 = Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 31, 0f, 0f, 100, default(Color), 1.5f);
Main.dust[num616].velocity *= 1.4f;
}
for (int num617 = 0; num617 < 20; num617++)
{
int num618 = Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 6, 0f, 0f, 100, default(Color), 3.5f);
Main.dust[num618].noGravity = true;
Main.dust[num618].velocity *= 7f;
num618 = Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 6, 0f, 0f, 100, default(Color), 1.5f);
Main.dust[num618].velocity *= 3f;
}
for (int num619 = 0; num619 < 2; num619++)
{
float scaleFactor9 = 0.4f;
if (num619 == 1)
{
scaleFactor9 = 0.8f;
}
int num620 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
Main.gore[num620].velocity *= scaleFactor9;
Gore expr_1347F_cp_0 = Main.gore[num620];
expr_1347F_cp_0.velocity.X = expr_1347F_cp_0.velocity.X + 1f;
Gore expr_1349F_cp_0 = Main.gore[num620];
expr_1349F_cp_0.velocity.Y = expr_1349F_cp_0.velocity.Y + 1f;
num620 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
Main.gore[num620].velocity *= scaleFactor9;
Gore expr_13522_cp_0 = Main.gore[num620];
expr_13522_cp_0.velocity.X = expr_13522_cp_0.velocity.X - 1f;
Gore expr_13542_cp_0 = Main.gore[num620];
expr_13542_cp_0.velocity.Y = expr_13542_cp_0.velocity.Y + 1f;
num620 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
Main.gore[num620].velocity *= scaleFactor9;
Gore expr_135C5_cp_0 = Main.gore[num620];
expr_135C5_cp_0.velocity.X = expr_135C5_cp_0.velocity.X + 1f;
Gore expr_135E5_cp_0 = Main.gore[num620];
expr_135E5_cp_0.velocity.Y = expr_135E5_cp_0.velocity.Y - 1f;
num620 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
Main.gore[num620].velocity *= scaleFactor9;
Gore expr_13668_cp_0 = Main.gore[num620];
expr_13668_cp_0.velocity.X = expr_13668_cp_0.velocity.X - 1f;
Gore expr_13688_cp_0 = Main.gore[num620];
expr_13688_cp_0.velocity.Y = expr_13688_cp_0.velocity.Y - 1f;
}
for (int i = 0; i < 8; i++)
{
Vector2 newVelocity = new Vector2((float)Math.Cos(p.rotation + (i * Math.PI / 4)), (float)Math.Sin(p.rotation + (i * Math.PI / 4)));
newVelocity *= -8f;
Projectile.NewProjectile(p.Center.X, p.Center.Y, newVelocity.X, newVelocity.Y, (int)p.localAI[0], 18, 3f, Main.myPlayer);
}
}
if (p.type == 785 || p.type == 786)
{
Main.PlaySound(2, (int)p.position.X, (int)p.position.Y, 10);
int num429 = 18;
int num430 = 3;
for (int num431 = 0; num431 < num429; num431++)
{
Dust.NewDust(p.position, p.width, p.height, 152, p.velocity.X * 0.1f, p.velocity.Y * 0.1f, 250, default(Color), 1.2f);
}
if (p.type != 786)
{
for (int num432 = 0; num432 < num430; num432++)
{
int num433 = Main.rand.Next(16, 18);
Gore.NewGore(p.position, new Vector2(p.velocity.X * 0.05f, p.velocity.Y * 0.05f), num433, 1f);
}
}
}
if (p.type == 783)
{
for (int num691 = 0; num691 < 6; num691++)
{
Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 109, 0f, 0f, 0, default(Color), 1f);
}
}
if (p.type == 782 || p.type == 784)
{
int size = 22;
if (p.type == 784)
{
size = 100;
}
p.position.X = p.position.X + (float)(p.width / 2);
p.position.Y = p.position.Y + (float)(p.height / 2);
p.width = size;
p.height = size;
p.position.X = p.position.X - (float)(p.width / 2);
p.position.Y = p.position.Y - (float)(p.height / 2);
p.Damage();
Main.PlaySound(2, (int)p.position.X, (int)p.position.Y, 62);
for (int num615 = 0; num615 < 30; num615++)
{
int num616 = Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 31, 0f, 0f, 100, default(Color), 1.5f);
Main.dust[num616].velocity *= 1.4f;
}
for (int num617 = 0; num617 < 20; num617++)
{
int num618 = Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 6, 0f, 0f, 100, default(Color), 3.5f);
Main.dust[num618].noGravity = true;
Main.dust[num618].velocity *= 7f;
num618 = Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 6, 0f, 0f, 100, default(Color), 1.5f);
Main.dust[num618].velocity *= 3f;
}
for (int num619 = 0; num619 < 2; num619++)
{
float scaleFactor9 = 0.4f;
if (num619 == 1)
{
scaleFactor9 = 0.8f;
}
int num620 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
Main.gore[num620].velocity *= scaleFactor9;
Gore expr_1347F_cp_0 = Main.gore[num620];
expr_1347F_cp_0.velocity.X = expr_1347F_cp_0.velocity.X + 1f;
Gore expr_1349F_cp_0 = Main.gore[num620];
expr_1349F_cp_0.velocity.Y = expr_1349F_cp_0.velocity.Y + 1f;
num620 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
Main.gore[num620].velocity *= scaleFactor9;
Gore expr_13522_cp_0 = Main.gore[num620];
expr_13522_cp_0.velocity.X = expr_13522_cp_0.velocity.X - 1f;
Gore expr_13542_cp_0 = Main.gore[num620];
expr_13542_cp_0.velocity.Y = expr_13542_cp_0.velocity.Y + 1f;
num620 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
Main.gore[num620].velocity *= scaleFactor9;
Gore expr_135C5_cp_0 = Main.gore[num620];
expr_135C5_cp_0.velocity.X = expr_135C5_cp_0.velocity.X + 1f;
Gore expr_135E5_cp_0 = Main.gore[num620];
expr_135E5_cp_0.velocity.Y = expr_135E5_cp_0.velocity.Y - 1f;
num620 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
Main.gore[num620].velocity *= scaleFactor9;
Gore expr_13668_cp_0 = Main.gore[num620];
expr_13668_cp_0.velocity.X = expr_13668_cp_0.velocity.X - 1f;
Gore expr_13688_cp_0 = Main.gore[num620];
expr_13688_cp_0.velocity.Y = expr_13688_cp_0.velocity.Y - 1f;
}
int rand = Main.rand.Next(1, 4);
if (p.type == 784)
{
rand = Main.rand.Next(2, 6);
}
for (int i = 0; i < rand; i++)
{
if (Main.rand.Next(2) == 0)
{
int side = Main.rand.Next(4) <= 1 ? 3 : -3;
Projectile.NewProjectile(p.Center.X, p.Center.Y, side, Main.rand.Next(0, 4), 783, 5, 2f, Main.myPlayer);
}
else
{
int side1 = Main.rand.Next(4) <= 1 ? 3 : -3;
Projectile.NewProjectile(p.Center.X, p.Center.Y, Main.rand.Next(-3, 4), side1, 783, 5, 2f, Main.myPlayer);
}
}
}
if (p.type == 781)
{
Main.PlaySound(2, (int)p.position.X, (int)p.position.Y, 4);
for (int num691 = 0; num691 < 14; num691++)
{
Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 124, 0f, 0f, 0, default(Color), 1f);
}
if (p.owner == Main.myPlayer)
{
float num720 = 80f;
for (int num722 = 0; num722 < 255; num722++)
{
Player player = Main.player[num722];
if (player.active && !player.dead && Vector2.Distance(p.Center, player.Center) < num720)
{
player.AddBuff(203, 1800, true);
}
}
for (int num723 = 0; num723 < 200; num723++)
{
NPC nPC = Main.npc[num723];
if (nPC.active && nPC.life > 0 && Vector2.Distance(p.Center, nPC.Center) < num720)
{
nPC.AddBuff(203, 1800, false);
}
}
}
}
if (p.type == 771)
{
int rand = Main.rand.Next(1, 3);
for (int i = 0; i < rand; i++)
{
if (Main.rand.Next(2) == 0)
{
int side = Main.rand.Next(4) <= 1 ? 3 : -3;
Projectile.NewProjectile(p.Center.X, p.Center.Y, side, Main.rand.Next(-3, 4), 753, 5, 2f, Main.myPlayer);
}
else
{
int side1 = Main.rand.Next(4) <= 1 ? 3 : -3;
Projectile.NewProjectile(p.Center.X, p.Center.Y, Main.rand.Next(-3, 4), side1, 753, 5, 2f, Main.myPlayer);
}
}
}
if (p.type == 769 || p.type == 770 || p.type == 816)
{
bool flag = false;
int whoIsIt = -1;
for (int i = 0; i < 200; i++)
{
if (Main.npc[i].getRect().Intersects(p.getRect()))
{
flag = true;
whoIsIt = i;
}
}
if (flag && whoIsIt != -1)
{
Projectile.NewProjectile(p.Center.X, p.Center.Y, 0f, 0f, 776, 4, 0f, Main.myPlayer, whoIsIt, Main.npc[whoIsIt].rotation);
}
int amount = 10;
if (p.type == 770)
{
amount = 3;
}
for (int d = 0; d < amount; d++)
{
Dust.NewDust(p.Center, 6, 6, 135, 0f, 0f, 100, default(Color), 1f);
}
}
if (p.type == 766)
{
Main.PlaySound(2, (int)p.position.X, (int)p.position.Y, 14);
for (int num526 = 0; num526 < 300; num526++)
{
float num527 = 12f;
int num528 = 60;
if (num526 < 200)
{
num528 = 66;
num527 = 8f;
}
if (num526 < 100)
{
num528 = 56;
num527 = 4f;
}
int num529 = Dust.NewDust(new Vector2(p.position.X, p.position.Y), 6, 6, num528, 0f, 0f, 100, default(Color), 1f);
float num530 = Main.dust[num529].velocity.X;
float num531 = Main.dust[num529].velocity.Y;
if (num530 == 0f && num531 == 0f)
{
num530 = 1f;
}
float num532 = (float)Math.Sqrt((double)(num530 * num530 + num531 * num531));
num532 = num527 / num532;
num530 *= num532;
num531 *= num532;
Main.dust[num529].velocity *= 0.5f;
Dust expr_114C9_cp_0 = Main.dust[num529];
expr_114C9_cp_0.velocity.X = expr_114C9_cp_0.velocity.X + num530;
Dust expr_114E8_cp_0 = Main.dust[num529];
expr_114E8_cp_0.velocity.Y = expr_114E8_cp_0.velocity.Y + num531;
Main.dust[num529].scale = 1.3f;
Main.dust[num529].noGravity = true;
}
p.position.X = p.position.X + (float)(p.width / 2);
p.position.Y = p.position.Y + (float)(p.height / 2);
p.width = 144;
p.height = 144;
p.position.X = p.position.X - (float)(p.width / 2);
p.position.Y = p.position.Y - (float)(p.height / 2);
p.penetrate = -1;
p.Damage();
}
if (p.type == 774 || p.type == 775)
{
int amount = p.type == 774 ? 30 : 3;
for (int num665 = 0; num665 < amount; num665++)
{
Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 76, 0f, 0f, 0, default(Color), 1f);
}
if (p.type == 774)
{
int rand = Main.rand.Next(14, 26);
for (int i = 0; i < rand; i++)
{
if (Main.rand.Next(2) == 0)
{
int side = Main.rand.Next(4) <= 1 ? 5 : -5;
Projectile.NewProjectile(p.Center.X, p.Center.Y, side, Main.rand.Next(-5, 6), 775, 17, 2f, Main.myPlayer);
}
else
{
int side1 = Main.rand.Next(4) <= 1 ? 5 : -5;
Projectile.NewProjectile(p.Center.X, p.Center.Y, Main.rand.Next(-5, 6), side1, 775, 17, 2f, Main.myPlayer);
}
}
}
}
if (p.type == 756)
{
Main.PlaySound(13, (int)p.position.X, (int)p.position.Y, 1);
for (int num665 = 0; num665 < 5; num665++)
{
Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 13, 0f, 0f, 0, default(Color), 1f);
}
for (int num666 = 0; num666 < 30; num666++)
{
int num667 = Dust.NewDust(new Vector2(p.position.X, p.position.Y), p.width, p.height, 135, 0f, -2f, 0, default(Color), 1.1f);
Main.dust[num667].alpha = 100;
Dust expr_159EC_cp_0 = Main.dust[num667];
expr_159EC_cp_0.velocity.X = expr_159EC_cp_0.velocity.X * 1.5f;
Main.dust[num667].velocity *= 3f;
}
}
if (p.type == 752)
{
bool friendly = p.ai[8] == 0f ? true : false;
bool hostile = p.ai[8] == 1f ? true : false;
int rand = Main.rand.Next(1, 4);
for (int i = 0; i < rand; i++)
{
if (Main.rand.Next(2) == 0)
{
int side = Main.rand.Next(4) <= 1 ? 3 : -3;
int proj = Projectile.NewProjectile(p.Center.X, p.Center.Y, side, Main.rand.Next(-3, 4), 753, 38, 2f, Main.myPlayer);
Main.projectile[proj].friendly = friendly;
Main.projectile[proj].hostile = hostile;
Main.projectile[proj].timeLeft = 120;
}
else
{
int side1 = Main.rand.Next(4) <= 1 ? 3 : -3;
int proj = Projectile.NewProjectile(p.Center.X, p.Center.Y, Main.rand.Next(-3, 4), side1, 753, 38, 2f, Main.myPlayer);
Main.projectile[proj].friendly = friendly;
Main.projectile[proj].hostile = hostile;
Main.projectile[proj].timeLeft = 120;
}
}
}
if (p.type == 750)
{
for (int i = 0; i < 4; i++)
{
if (Main.rand.Next(2) == 0)
{
int side = Main.rand.Next(4) <= 1 ? 6 : -6;
Projectile.NewProjectile(p.Center.X, p.Center.Y, side, Main.rand.Next(-6, 7), 751, 29, 2f, Main.myPlayer);
}
else
{
int side1 = Main.rand.Next(4) <= 1 ? 6 : -6;
Projectile.NewProjectile(p.Center.X, p.Center.Y, Main.rand.Next(-6, 7), side1, 751, 29, 2f, Main.myPlayer);
}
}
for (int o = 0; o < 18; o++)
{
Dust.NewDust(p.Center, p.width, p.height, 279, Main.rand.Next(-2, 3), Main.rand.Next(-2, 3));
}
}
if (p.type == 700)
{
for (int i = 0; i < 8; i++)
{
Projectile.NewProjectile(p.Center.X, p.Center.Y, Main.rand.Next(-8, 9), Main.rand.Next(-8, 9), 701, 101, 6f, Main.myPlayer);
}
for (int o = 0; o < 18; o++)
{
Dust.NewDust(p.Center, p.width, p.height, 212, Main.rand.Next(-2, 3), Main.rand.Next(-2, 3));
}
}
if (p.type == 702)
{
for (int i = 0; i < 13; i++)
{
Dust.NewDust(p.Center, p.width, p.height, 169, Main.rand.Next(-2, 3), Main.rand.Next(-2, 3));
}
}
if (p.type == 706)
{
for (int i = 0; i < 6; i++)
{
Dust.NewDust(p.Center, p.width, p.height, 255, Main.rand.Next(-1, 2), Main.rand.Next(-1, 2));
}
}
if (p.type == 707)
{
for (int i = 0; i < 7; i++)
{
Dust.NewDust(p.Center, p.width, p.height, 207, Main.rand.Next(-1, 2), Main.rand.Next(-1, 2));
}
}
if (p.type == 717 || p.type == 716)
{
for (int i = 0; i < 5; i++)
{
Dust.NewDust(p.Center, p.width, p.height, 174, Main.rand.Next(-1, 2), Main.rand.Next(-1, 2));
}
}
if (p.type == 718)
{
if (!p.noDropItem)
{
for (int i = 0; i < 3; i++)
{
Dust.NewDust(p.Center, p.width, p.height, 214, Main.rand.Next(-1, 2), Main.rand.Next(-1, 2));
}
int ra = Main.rand.Next(10);
if (ra <= 8)
{
Item.NewItem((int)p.Center.X, (int)p.Center.Y, 20, 20, 27);
}
}
}
if (p.type == 720)
{
for (int i = 0; i < 3; i++)
{
float xSp = 0;
float ySp = 0;
if (Main.rand.Next(2) == 0)
{
xSp = 5;
ySp = Main.rand.Next(-5, 6);
}
else
{
ySp = 5;
xSp = Main.rand.Next(-5, 6);
}
Projectile.NewProjectile(p.Center.X, p.Center.Y, xSp, ySp, 721 + i, 9, 1f, Main.myPlayer);
}
}
if (p.type == 725)
{
for (int i = 0; i < 10; i++)
{
int d = Dust.NewDust(p.Center, p.width, p.height, 21);
Main.dust[d].noGravity = true;
}
}
if (p.type == 727)
{
int num503 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
Main.gore[num503].velocity *= 0.4f;
Gore g = Main.gore[num503];
g.velocity.X = g.velocity.X + (float)Main.rand.Next(-10, 11) * 0.1f;
Gore g2 = Main.gore[num503];
g2.velocity.Y = g2.velocity.Y + (float)Main.rand.Next(-10, 11) * 0.1f;
num503 = Gore.NewGore(new Vector2(p.position.X, p.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f);
Main.gore[num503].velocity *= 0.4f;
Gore g3 = Main.gore[num503];
g3.velocity.X = g3.velocity.X + (float)Main.rand.Next(-10, 11) * 0.1f;
Gore g4 = Main.gore[num503];
g4.velocity.Y = g4.velocity.Y + (float)Main.rand.Next(-10, 11) * 0.1f;
if (p.owner == Main.myPlayer)
{
p.penetrate = -1;
p.position.X = p.position.X + (float)(p.width / 2);
p.position.Y = p.position.Y + (float)(p.height / 2);
p.width = 96;
p.height = 96;
p.position.X = p.position.X - (float)(p.width / 2);
p.position.Y = p.position.Y - (float)(p.height / 2);
p.Damage();
}
}
}