MERGE: Num death with Flamethrower Reworks
This commit is contained in:
commit
522d4eec8b
794 files changed
+21731
-21896
No files matched your search
@@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
float speed2 = 2.8f;
|
||||
float angleRandom = 0.35f;
|
||||
|
||||
for (int num53 = 0; num53 < 40; num53++)
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
@@ -86,27 +86,27 @@ namespace CalamityMod.Projectiles.Boss
|
||||
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
|
||||
int randomDustType = Main.rand.NextBool() ? 107 : 110;
|
||||
|
||||
int num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[num54].noGravity = true;
|
||||
int plasmaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f);
|
||||
Main.dust[plasmaDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
|
||||
Dust dust = Main.dust[num54];
|
||||
Dust dust = Main.dust[plasmaDust];
|
||||
dust.velocity *= 3f;
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[plasmaDust];
|
||||
|
||||
num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
plasmaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f);
|
||||
Main.dust[plasmaDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[plasmaDust];
|
||||
dust.velocity *= 2f;
|
||||
|
||||
Main.dust[num54].noGravity = true;
|
||||
Main.dust[num54].fadeIn = 1f;
|
||||
Main.dust[num54].color = Color.Green * 0.5f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
Main.dust[plasmaDust].fadeIn = 1f;
|
||||
Main.dust[plasmaDust].color = Color.Green * 0.5f;
|
||||
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[plasmaDust];
|
||||
}
|
||||
for (int num55 = 0; num55 < 20; num55++)
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
@@ -114,13 +114,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
|
||||
int randomDustType = Main.rand.NextBool() ? 107 : 110;
|
||||
|
||||
int num56 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f);
|
||||
Main.dust[num56].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[num56].noGravity = true;
|
||||
int plasmaDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f);
|
||||
Main.dust[plasmaDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[plasmaDust2].noGravity = true;
|
||||
|
||||
Dust dust = Main.dust[num56];
|
||||
Dust dust = Main.dust[plasmaDust2];
|
||||
dust.velocity *= 0.5f;
|
||||
dust = Main.dust[num56];
|
||||
dust = Main.dust[plasmaDust2];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -180,30 +180,30 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
}
|
||||
|
||||
for (int num640 = 0; num640 < 200; num640++)
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
float num641 = 16f;
|
||||
if (num640 < 150)
|
||||
num641 = 12f;
|
||||
if (num640 < 100)
|
||||
num641 = 8f;
|
||||
if (num640 < 50)
|
||||
num641 = 4f;
|
||||
float dustScale = 16f;
|
||||
if (i < 150)
|
||||
dustScale = 12f;
|
||||
if (i < 100)
|
||||
dustScale = 8f;
|
||||
if (i < 50)
|
||||
dustScale = 4f;
|
||||
|
||||
int num643 = Dust.NewDust(Projectile.Center, 6, 6, Main.rand.NextBool() ? 107 : 110, 0f, 0f, 100, default, 1f);
|
||||
float num644 = Main.dust[num643].velocity.X;
|
||||
float num645 = Main.dust[num643].velocity.Y;
|
||||
int plasmaDeathDust = Dust.NewDust(Projectile.Center, 6, 6, Main.rand.NextBool() ? 107 : 110, 0f, 0f, 100, default, 1f);
|
||||
float plasmaDeathDustX = Main.dust[plasmaDeathDust].velocity.X;
|
||||
float plasmaDeathDustY = Main.dust[plasmaDeathDust].velocity.Y;
|
||||
|
||||
if (num644 == 0f && num645 == 0f)
|
||||
num644 = 1f;
|
||||
if (plasmaDeathDustX == 0f && plasmaDeathDustY == 0f)
|
||||
plasmaDeathDustX = 1f;
|
||||
|
||||
float num646 = (float)Math.Sqrt(num644 * num644 + num645 * num645);
|
||||
num646 = num641 / num646;
|
||||
num644 *= num646;
|
||||
num645 *= num646;
|
||||
float plasmaDeathDustVel = (float)Math.Sqrt(plasmaDeathDustX * plasmaDeathDustX + plasmaDeathDustY * plasmaDeathDustY);
|
||||
plasmaDeathDustVel = dustScale / plasmaDeathDustVel;
|
||||
plasmaDeathDustX *= plasmaDeathDustVel;
|
||||
plasmaDeathDustY *= plasmaDeathDustVel;
|
||||
|
||||
float scale = 1f;
|
||||
switch ((int)num641)
|
||||
switch ((int)dustScale)
|
||||
{
|
||||
case 4:
|
||||
scale = 1.2f;
|
||||
@@ -221,10 +221,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
break;
|
||||
}
|
||||
|
||||
Dust dust = Main.dust[num643];
|
||||
Dust dust = Main.dust[plasmaDeathDust];
|
||||
dust.velocity *= 0.5f;
|
||||
dust.velocity.X = dust.velocity.X + num644;
|
||||
dust.velocity.Y = dust.velocity.Y + num645;
|
||||
dust.velocity.X = dust.velocity.X + plasmaDeathDustX;
|
||||
dust.velocity.Y = dust.velocity.Y + plasmaDeathDustY;
|
||||
dust.scale = scale;
|
||||
dust.noGravity = true;
|
||||
}
|
||||
|
||||
@@ -67,53 +67,53 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
Projectile.localAI[0] = 1f;
|
||||
|
||||
float speed1 = 1.8f;
|
||||
float speed2 = 2.8f;
|
||||
float randDustSpeed1 = 1.8f;
|
||||
float randDustSpeed2 = 2.8f;
|
||||
float angleRandom = 0.35f;
|
||||
|
||||
for (int num53 = 0; num53 < 20; num53++)
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
float dustSpeed = Main.rand.NextFloat(randDustSpeed1, randDustSpeed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
dustVel = dustVel.RotatedBy(-angleRandom);
|
||||
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
|
||||
int randomDustType = Main.rand.NextBool() ? 107 : 110;
|
||||
|
||||
int num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[num54].noGravity = true;
|
||||
int plasmaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f);
|
||||
Main.dust[plasmaDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
|
||||
Dust dust = Main.dust[num54];
|
||||
Dust dust = Main.dust[plasmaDust];
|
||||
dust.velocity *= 3f;
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[plasmaDust];
|
||||
|
||||
num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
plasmaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f);
|
||||
Main.dust[plasmaDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[plasmaDust];
|
||||
dust.velocity *= 2f;
|
||||
|
||||
Main.dust[num54].noGravity = true;
|
||||
Main.dust[num54].fadeIn = 1f;
|
||||
Main.dust[num54].color = Color.Green * 0.5f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
Main.dust[plasmaDust].fadeIn = 1f;
|
||||
Main.dust[plasmaDust].color = Color.Green * 0.5f;
|
||||
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[plasmaDust];
|
||||
}
|
||||
for (int num55 = 0; num55 < 10; num55++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
float dustSpeed = Main.rand.NextFloat(randDustSpeed1, randDustSpeed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
dustVel = dustVel.RotatedBy(-angleRandom);
|
||||
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
|
||||
int randomDustType = Main.rand.NextBool() ? 107 : 110;
|
||||
|
||||
int num56 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f);
|
||||
Main.dust[num56].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[num56].noGravity = true;
|
||||
int plasmaDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f);
|
||||
Main.dust[plasmaDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[plasmaDust2].noGravity = true;
|
||||
|
||||
Dust dust = Main.dust[num56];
|
||||
Dust dust = Main.dust[plasmaDust2];
|
||||
dust.velocity *= 0.5f;
|
||||
dust = Main.dust[num56];
|
||||
dust = Main.dust[plasmaDust2];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
SoundEngine.PlaySound(SoundID.Item14, Projectile.Center);
|
||||
|
||||
for (int num621 = 0; num621 < 12; num621++)
|
||||
for (int i = 0; i < 12; i++)
|
||||
{
|
||||
int randomDustType = Main.rand.NextBool() ? 107 : 110;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, 0f, 0f, 100, default, 2f);
|
||||
@@ -225,7 +225,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Main.dust[dust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 15; num623++)
|
||||
for (int j = 0; j < 15; j++)
|
||||
{
|
||||
int randomDustType = Main.rand.NextBool() ? 107 : 110;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDustType, 0f, 0f, 100, default, 3f);
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
else
|
||||
Projectile.Kill();
|
||||
|
||||
float num801 = 1f;
|
||||
float projScale = 1f;
|
||||
Projectile.localAI[0] += 1f;
|
||||
if (Projectile.localAI[0] >= 60f)
|
||||
{
|
||||
@@ -88,38 +88,37 @@ namespace CalamityMod.Projectiles.Boss
|
||||
return;
|
||||
}
|
||||
|
||||
Projectile.scale = (float)Math.Sin(Projectile.localAI[0] * (float)Math.PI / 60f) * 10f * num801;
|
||||
if (Projectile.scale > num801)
|
||||
Projectile.scale = num801;
|
||||
Projectile.scale = (float)Math.Sin(Projectile.localAI[0] * (float)Math.PI / 60f) * 10f * projScale;
|
||||
if (Projectile.scale > projScale)
|
||||
Projectile.scale = projScale;
|
||||
|
||||
float num804 = Projectile.velocity.ToRotation();
|
||||
Projectile.rotation = num804 - MathHelper.PiOver2;
|
||||
Projectile.velocity = num804.ToRotationVector2();
|
||||
float projVelRotation = Projectile.velocity.ToRotation();
|
||||
Projectile.rotation = projVelRotation - MathHelper.PiOver2;
|
||||
Projectile.velocity = projVelRotation.ToRotationVector2();
|
||||
|
||||
float num805 = 3f; //3f
|
||||
float num806 = Projectile.width;
|
||||
float projWidth = Projectile.width;
|
||||
|
||||
Vector2 samplingPoint = Projectile.Center;
|
||||
if (vector78.HasValue)
|
||||
samplingPoint = vector78.Value;
|
||||
|
||||
float[] array3 = new float[(int)num805];
|
||||
Collision.LaserScan(samplingPoint, Projectile.velocity, num806 * Projectile.scale, 2400f, array3);
|
||||
float num807 = 0f;
|
||||
for (int num808 = 0; num808 < array3.Length; num808++)
|
||||
float[] array3 = new float[3];
|
||||
Collision.LaserScan(samplingPoint, Projectile.velocity, projWidth * Projectile.scale, 2400f, array3);
|
||||
float laserLength = 0f;
|
||||
for (int j = 0; j < array3.Length; j++)
|
||||
{
|
||||
num807 += array3[num808];
|
||||
laserLength += array3[j];
|
||||
}
|
||||
num807 /= num805;
|
||||
laserLength /= 3f;
|
||||
|
||||
// Fire laser through walls at max length if target cannot be seen
|
||||
if (!Collision.CanHitLine(Main.npc[(int)Projectile.ai[1]].Center, 1, 1, Main.player[Main.npc[(int)Projectile.ai[1]].target].Center, 1, 1))
|
||||
{
|
||||
num807 = 2400f;
|
||||
laserLength = 2400f;
|
||||
}
|
||||
|
||||
float amount = 0.5f;
|
||||
Projectile.localAI[1] = MathHelper.Lerp(Projectile.localAI[1], num807, amount); //length of laser, linear interpolation
|
||||
Projectile.localAI[1] = MathHelper.Lerp(Projectile.localAI[1], laserLength, amount); //length of laser, linear interpolation
|
||||
|
||||
// Spawn dust at the end of the beam
|
||||
int dustType = (int)CalamityDusts.Brimstone;
|
||||
|
||||
@@ -77,48 +77,48 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
Projectile.localAI[0] = 1f;
|
||||
|
||||
float speed1 = 1.8f;
|
||||
float speed2 = 2.8f;
|
||||
float randDustSpeed1 = 1.8f;
|
||||
float randDustSpeed2 = 2.8f;
|
||||
float angleRandom = 0.35f;
|
||||
|
||||
for (int num53 = 0; num53 < 40; num53++)
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
float dustSpeed = Main.rand.NextFloat(randDustSpeed1, randDustSpeed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
dustVel = dustVel.RotatedBy(-angleRandom);
|
||||
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
|
||||
int randomDustType = Main.rand.NextBool() ? 107 : 110;
|
||||
|
||||
int num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[num54].noGravity = true;
|
||||
int plasmaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f);
|
||||
Main.dust[plasmaDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
|
||||
Dust dust = Main.dust[num54];
|
||||
Dust dust = Main.dust[plasmaDust];
|
||||
dust.velocity *= 3f;
|
||||
|
||||
num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
plasmaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f);
|
||||
Main.dust[plasmaDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[plasmaDust];
|
||||
dust.velocity *= 2f;
|
||||
|
||||
Main.dust[num54].noGravity = true;
|
||||
Main.dust[num54].fadeIn = 1f;
|
||||
Main.dust[num54].color = Color.Green * 0.5f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
Main.dust[plasmaDust].fadeIn = 1f;
|
||||
Main.dust[plasmaDust].color = Color.Green * 0.5f;
|
||||
}
|
||||
for (int num55 = 0; num55 < 20; num55++)
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
float dustSpeed = Main.rand.NextFloat(randDustSpeed1, randDustSpeed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
dustVel = dustVel.RotatedBy(-angleRandom);
|
||||
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
|
||||
int randomDustType = Main.rand.NextBool() ? 107 : 110;
|
||||
|
||||
int num56 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f);
|
||||
Main.dust[num56].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[num56].noGravity = true;
|
||||
int plasmaDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f);
|
||||
Main.dust[plasmaDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[plasmaDust2].noGravity = true;
|
||||
|
||||
Dust dust = Main.dust[num56];
|
||||
Dust dust = Main.dust[plasmaDust2];
|
||||
dust.velocity *= 0.5f;
|
||||
}
|
||||
}
|
||||
@@ -184,30 +184,30 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
}
|
||||
|
||||
for (int num640 = 0; num640 < 200; num640++)
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
float num641 = 16f;
|
||||
if (num640 < 150)
|
||||
num641 = 12f;
|
||||
if (num640 < 100)
|
||||
num641 = 8f;
|
||||
if (num640 < 50)
|
||||
num641 = 4f;
|
||||
float dustScale = 16f;
|
||||
if (i < 150)
|
||||
dustScale = 12f;
|
||||
if (i < 100)
|
||||
dustScale = 8f;
|
||||
if (i < 50)
|
||||
dustScale = 4f;
|
||||
|
||||
int num643 = Dust.NewDust(Projectile.Center, 6, 6, Main.rand.NextBool() ? 107 : 110, 0f, 0f, 100, default, 1f);
|
||||
float num644 = Main.dust[num643].velocity.X;
|
||||
float num645 = Main.dust[num643].velocity.Y;
|
||||
int deathPlasmaDust = Dust.NewDust(Projectile.Center, 6, 6, Main.rand.NextBool() ? 107 : 110, 0f, 0f, 100, default, 1f);
|
||||
float deathPlasmaDustX = Main.dust[deathPlasmaDust].velocity.X;
|
||||
float deathPlasmaDustY = Main.dust[deathPlasmaDust].velocity.Y;
|
||||
|
||||
if (num644 == 0f && num645 == 0f)
|
||||
num644 = 1f;
|
||||
if (deathPlasmaDustX == 0f && deathPlasmaDustY == 0f)
|
||||
deathPlasmaDustX = 1f;
|
||||
|
||||
float num646 = (float)Math.Sqrt(num644 * num644 + num645 * num645);
|
||||
num646 = num641 / num646;
|
||||
num644 *= num646;
|
||||
num645 *= num646;
|
||||
float deathPlasmaDustVel = (float)Math.Sqrt(deathPlasmaDustX * deathPlasmaDustX + deathPlasmaDustY * deathPlasmaDustY);
|
||||
deathPlasmaDustVel = dustScale / deathPlasmaDustVel;
|
||||
deathPlasmaDustX *= deathPlasmaDustVel;
|
||||
deathPlasmaDustY *= deathPlasmaDustVel;
|
||||
|
||||
float scale = 1f;
|
||||
switch ((int)num641)
|
||||
switch ((int)dustScale)
|
||||
{
|
||||
case 4:
|
||||
scale = 1.2f;
|
||||
@@ -225,10 +225,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
break;
|
||||
}
|
||||
|
||||
Dust dust = Main.dust[num643];
|
||||
Dust dust = Main.dust[deathPlasmaDust];
|
||||
dust.velocity *= 0.5f;
|
||||
dust.velocity.X = dust.velocity.X + num644;
|
||||
dust.velocity.Y = dust.velocity.Y + num645;
|
||||
dust.velocity.X = dust.velocity.X + deathPlasmaDustX;
|
||||
dust.velocity.Y = dust.velocity.Y + deathPlasmaDustY;
|
||||
dust.scale = scale;
|
||||
dust.noGravity = true;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
float speed2 = 2.8f;
|
||||
float angleRandom = 0.35f;
|
||||
|
||||
for (int num53 = 0; num53 < 40; num53++)
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
@@ -98,24 +98,24 @@ namespace CalamityMod.Projectiles.Boss
|
||||
int randomDustType = Main.rand.Next(2) == 0 ? 206 : 229;
|
||||
float scale = randomDustType == 206 ? 1.5f : 1f;
|
||||
|
||||
int num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 2.5f * scale);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[num54].noGravity = true;
|
||||
int teslaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 2.5f * scale);
|
||||
Main.dust[teslaDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[teslaDust].noGravity = true;
|
||||
|
||||
Dust dust = Main.dust[num54];
|
||||
Dust dust = Main.dust[teslaDust];
|
||||
dust.velocity *= 3f;
|
||||
|
||||
num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 1.5f * scale);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
teslaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 1.5f * scale);
|
||||
Main.dust[teslaDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[teslaDust];
|
||||
dust.velocity *= 2f;
|
||||
|
||||
Main.dust[num54].noGravity = true;
|
||||
Main.dust[num54].fadeIn = 1f;
|
||||
Main.dust[num54].color = Color.Cyan * 0.5f;
|
||||
Main.dust[teslaDust].noGravity = true;
|
||||
Main.dust[teslaDust].fadeIn = 1f;
|
||||
Main.dust[teslaDust].color = Color.Cyan * 0.5f;
|
||||
}
|
||||
for (int num55 = 0; num55 < 20; num55++)
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
@@ -124,11 +124,11 @@ namespace CalamityMod.Projectiles.Boss
|
||||
int randomDustType = Main.rand.Next(2) == 0 ? 206 : 229;
|
||||
float scale = randomDustType == 206 ? 1.5f : 1f;
|
||||
|
||||
int num56 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 3f * scale);
|
||||
Main.dust[num56].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[num56].noGravity = true;
|
||||
int teslaDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 3f * scale);
|
||||
Main.dust[teslaDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[teslaDust2].noGravity = true;
|
||||
|
||||
Dust dust = Main.dust[num56];
|
||||
Dust dust = Main.dust[teslaDust2];
|
||||
dust.velocity *= 0.5f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,9 +67,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
Lighting.AddLight(Projectile.Center, 0.3f, 0.5f, 0.1f);
|
||||
|
||||
int num103 = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
Vector2 vector11 = Main.player[num103].Center - Projectile.Center;
|
||||
if (vector11.Length() < 60f)
|
||||
int targetPlayer = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
Vector2 playerDist = Main.player[targetPlayer].Center - Projectile.Center;
|
||||
if (playerDist.Length() < 60f)
|
||||
{
|
||||
Projectile.Kill();
|
||||
return;
|
||||
@@ -78,9 +78,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.ai[0] += 1f;
|
||||
if (Projectile.ai[0] > 15f)
|
||||
{
|
||||
int num469 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 0.8f);
|
||||
Main.dust[num469].noGravity = true;
|
||||
Main.dust[num469].velocity *= 0f;
|
||||
int astralDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 0.8f);
|
||||
Main.dust[astralDust].noGravity = true;
|
||||
Main.dust[astralDust].velocity *= 0f;
|
||||
}
|
||||
|
||||
if (Projectile.ai[0] >= 120f)
|
||||
@@ -88,9 +88,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.ai[1] < 180f)
|
||||
{
|
||||
float scaleFactor2 = Projectile.velocity.Length();
|
||||
vector11.Normalize();
|
||||
vector11 *= scaleFactor2;
|
||||
Projectile.velocity = (Projectile.velocity * 30f + vector11) / 31f;
|
||||
playerDist.Normalize();
|
||||
playerDist *= scaleFactor2;
|
||||
Projectile.velocity = (Projectile.velocity * 30f + playerDist) / 31f;
|
||||
Projectile.velocity.Normalize();
|
||||
Projectile.velocity *= scaleFactor2;
|
||||
}
|
||||
@@ -160,18 +160,18 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.width = Projectile.height = 96;
|
||||
Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
|
||||
for (int num193 = 0; num193 < 2; num193++)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 50, default, 1f);
|
||||
}
|
||||
for (int num194 = 0; num194 < 20; num194++)
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int num195 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 0, default, 1.5f);
|
||||
Main.dust[num195].noGravity = true;
|
||||
Main.dust[num195].velocity *= 3f;
|
||||
num195 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 50, default, 1f);
|
||||
Main.dust[num195].velocity *= 2f;
|
||||
Main.dust[num195].noGravity = true;
|
||||
int deathAstralDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 0, default, 1.5f);
|
||||
Main.dust[deathAstralDust].noGravity = true;
|
||||
Main.dust[deathAstralDust].velocity *= 3f;
|
||||
deathAstralDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 50, default, 1f);
|
||||
Main.dust[deathAstralDust].velocity *= 2f;
|
||||
Main.dust[deathAstralDust].noGravity = true;
|
||||
}
|
||||
Projectile.Damage();
|
||||
}
|
||||
|
||||
@@ -56,23 +56,23 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
if (Projectile.ai[1] > 0f)
|
||||
{
|
||||
int num625 = (int)Projectile.ai[1] - 1;
|
||||
if (num625 < 255)
|
||||
int playerTracker = (int)Projectile.ai[1] - 1;
|
||||
if (playerTracker < 255)
|
||||
{
|
||||
Projectile.localAI[0] += 1f;
|
||||
if (Projectile.localAI[0] > 10f)
|
||||
{
|
||||
int num626 = 6;
|
||||
for (int num627 = 0; num627 < num626; num627++)
|
||||
int dustAmt = 6;
|
||||
for (int i = 0; i < dustAmt; i++)
|
||||
{
|
||||
Vector2 vector45 = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
vector45 = vector45.RotatedBy((double)(num627 - (num626 / 2 - 1)) * 3.1415926535897931 / (double)(float)num626, default) + Projectile.Center;
|
||||
Vector2 value15 = ((float)(Main.rand.NextDouble() * 3.1415927410125732) - 1.57079637f).ToRotationVector2() * (float)Main.rand.Next(3, 8);
|
||||
int num628 = Dust.NewDust(vector45 + value15, 0, 0, 244, value15.X * 2f, value15.Y * 2f, 100, default, 1.4f);
|
||||
Main.dust[num628].noGravity = true;
|
||||
Main.dust[num628].noLight = true;
|
||||
Main.dust[num628].velocity /= 4f;
|
||||
Main.dust[num628].velocity -= Projectile.velocity;
|
||||
Vector2 dustRotate = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
dustRotate = dustRotate.RotatedBy((double)(i - (dustAmt / 2 - 1)) * 3.1415926535897931 / (double)(float)dustAmt, default) + Projectile.Center;
|
||||
Vector2 randomDustPos = ((float)(Main.rand.NextDouble() * 3.1415927410125732) - 1.57079637f).ToRotationVector2() * (float)Main.rand.Next(3, 8);
|
||||
int flareDust = Dust.NewDust(dustRotate + randomDustPos, 0, 0, 244, randomDustPos.X * 2f, randomDustPos.Y * 2f, 100, default, 1.4f);
|
||||
Main.dust[flareDust].noGravity = true;
|
||||
Main.dust[flareDust].noLight = true;
|
||||
Main.dust[flareDust].velocity /= 4f;
|
||||
Main.dust[flareDust].velocity -= Projectile.velocity;
|
||||
}
|
||||
Projectile.alpha -= 5;
|
||||
if (Projectile.alpha < 100)
|
||||
@@ -81,11 +81,11 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
}
|
||||
|
||||
Vector2 value16 = Main.player[num625].Center - Projectile.Center;
|
||||
float num629 = 4f;
|
||||
num629 += Projectile.localAI[0] / 60f;
|
||||
Projectile.velocity = Vector2.Normalize(value16) * num629;
|
||||
if (value16.Length() < 64f)
|
||||
Vector2 playerDistance = Main.player[playerTracker].Center - Projectile.Center;
|
||||
float projVelocityMult = 4f;
|
||||
projVelocityMult += Projectile.localAI[0] / 60f;
|
||||
Projectile.velocity = Vector2.Normalize(playerDistance) * projVelocityMult;
|
||||
if (playerDistance.Length() < 64f)
|
||||
{
|
||||
Projectile.Kill();
|
||||
}
|
||||
@@ -114,55 +114,54 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
SoundEngine.PlaySound(FlareSound, Projectile.Center);
|
||||
int num226 = 36;
|
||||
for (int num227 = 0; num227 < num226; num227++)
|
||||
int dustAmtKill = 36;
|
||||
for (int j = 0; j < dustAmtKill; j++)
|
||||
{
|
||||
Vector2 vector6 = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + Projectile.Center;
|
||||
Vector2 vector7 = vector6 - Projectile.Center;
|
||||
int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 244, vector7.X * 2f, vector7.Y * 2f, 100, default, 1.4f);
|
||||
Main.dust[num228].noGravity = true;
|
||||
Main.dust[num228].noLight = true;
|
||||
Main.dust[num228].velocity = vector7;
|
||||
Vector2 rotation = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
rotation = rotation.RotatedBy((double)((float)(j - (dustAmtKill / 2 - 1)) * 6.28318548f / (float)dustAmtKill), default) + Projectile.Center;
|
||||
Vector2 faceDirection = rotation - Projectile.Center;
|
||||
int flareDeath = Dust.NewDust(rotation + faceDirection, 0, 0, 244, faceDirection.X * 2f, faceDirection.Y * 2f, 100, default, 1.4f);
|
||||
Main.dust[flareDeath].noGravity = true;
|
||||
Main.dust[flareDeath].noLight = true;
|
||||
Main.dust[flareDeath].velocity = faceDirection;
|
||||
}
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int num231 = (int)(Projectile.Center.Y / 16f);
|
||||
int num232 = (int)(Projectile.Center.X / 16f);
|
||||
int num233 = 100;
|
||||
if (num232 < 10)
|
||||
int projTileX = (int)(Projectile.Center.Y / 16f);
|
||||
int projTileY = (int)(Projectile.Center.X / 16f);
|
||||
if (projTileY < 10)
|
||||
{
|
||||
num232 = 10;
|
||||
projTileY = 10;
|
||||
}
|
||||
if (num232 > Main.maxTilesX - 10)
|
||||
if (projTileY > Main.maxTilesX - 10)
|
||||
{
|
||||
num232 = Main.maxTilesX - 10;
|
||||
projTileY = Main.maxTilesX - 10;
|
||||
}
|
||||
if (num231 < 10)
|
||||
if (projTileX < 10)
|
||||
{
|
||||
num231 = 10;
|
||||
projTileX = 10;
|
||||
}
|
||||
if (num231 > Main.maxTilesY - num233 - 10)
|
||||
if (projTileX > Main.maxTilesY - 110)
|
||||
{
|
||||
num231 = Main.maxTilesY - num233 - 10;
|
||||
projTileX = Main.maxTilesY - 110;
|
||||
}
|
||||
int spawnAreaY = Main.maxTilesY - num231;
|
||||
for (int num234 = num231; num234 < num231 + spawnAreaY; num234++)
|
||||
int spawnAreaY = Main.maxTilesY - projTileX;
|
||||
for (int k = projTileX; k < projTileX + spawnAreaY; k++)
|
||||
{
|
||||
Tile tile = Main.tile[num232, num234 + 10];
|
||||
Tile tile = Main.tile[projTileY, k + 10];
|
||||
if (tile.HasTile && !TileID.Sets.Platforms[tile.TileType] && (Main.tileSolid[(int)tile.TileType] || tile.LiquidAmount != 0))
|
||||
{
|
||||
num231 = num234;
|
||||
projTileX = k;
|
||||
break;
|
||||
}
|
||||
}
|
||||
int spawnLimitY = (int)(Main.player[Projectile.owner].Center.Y / 16f) + 50;
|
||||
if (num231 > spawnLimitY)
|
||||
if (projTileX > spawnLimitY)
|
||||
{
|
||||
num231 = spawnLimitY;
|
||||
projTileX = spawnLimitY;
|
||||
}
|
||||
int num236 = Projectile.NewProjectile(Projectile.GetSource_FromThis(), (float)(num232 * 16 + 8), (float)(num231 * 16 - 24), 0f, 0f, ModContent.ProjectileType<Infernado>(), 0, 4f, Main.myPlayer, 11f, 16f + (revenge ? 2f : 0f));
|
||||
Main.projectile[num236].netUpdate = true;
|
||||
int infernadoSpawn = Projectile.NewProjectile(Projectile.GetSource_FromThis(), (float)(projTileY * 16 + 8), (float)(projTileX * 16 - 24), 0f, 0f, ModContent.ProjectileType<Infernado>(), 0, 4f, Main.myPlayer, 11f, 16f + (revenge ? 2f : 0f));
|
||||
Main.projectile[infernadoSpawn].netUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,23 +56,23 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
if (Projectile.ai[1] > 0f)
|
||||
{
|
||||
int num625 = (int)Projectile.ai[1] - 1;
|
||||
if (num625 < 255)
|
||||
int playerTracker = (int)Projectile.ai[1] - 1;
|
||||
if (playerTracker < 255)
|
||||
{
|
||||
Projectile.localAI[0] += 1f;
|
||||
if (Projectile.localAI[0] > 10f)
|
||||
{
|
||||
int num626 = 6;
|
||||
for (int num627 = 0; num627 < num626; num627++)
|
||||
int dustAmt = 6;
|
||||
for (int i = 0; i < dustAmt; i++)
|
||||
{
|
||||
Vector2 vector45 = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
vector45 = vector45.RotatedBy((double)(num627 - (num626 / 2 - 1)) * 3.1415926535897931 / (double)(float)num626, default) + Projectile.Center;
|
||||
Vector2 value15 = ((float)(Main.rand.NextDouble() * 3.1415927410125732) - 1.57079637f).ToRotationVector2() * (float)Main.rand.Next(3, 8);
|
||||
int num628 = Dust.NewDust(vector45 + value15, 0, 0, 244, value15.X * 2f, value15.Y * 2f, 100, default, 1.4f);
|
||||
Main.dust[num628].noGravity = true;
|
||||
Main.dust[num628].noLight = true;
|
||||
Main.dust[num628].velocity /= 4f;
|
||||
Main.dust[num628].velocity -= Projectile.velocity;
|
||||
Vector2 dustRotation = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
dustRotation = dustRotation.RotatedBy((double)(i - (dustAmt / 2 - 1)) * 3.1415926535897931 / (double)(float)dustAmt, default) + Projectile.Center;
|
||||
Vector2 randomDustPos = ((float)(Main.rand.NextDouble() * 3.1415927410125732) - 1.57079637f).ToRotationVector2() * (float)Main.rand.Next(3, 8);
|
||||
int flareDust = Dust.NewDust(dustRotation + randomDustPos, 0, 0, 244, randomDustPos.X * 2f, randomDustPos.Y * 2f, 100, default, 1.4f);
|
||||
Main.dust[flareDust].noGravity = true;
|
||||
Main.dust[flareDust].noLight = true;
|
||||
Main.dust[flareDust].velocity /= 4f;
|
||||
Main.dust[flareDust].velocity -= Projectile.velocity;
|
||||
}
|
||||
Projectile.alpha -= 5;
|
||||
if (Projectile.alpha < 100)
|
||||
@@ -81,11 +81,11 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
}
|
||||
|
||||
Vector2 value16 = Main.player[num625].Center - Projectile.Center;
|
||||
float num629 = 4f;
|
||||
num629 += Projectile.localAI[0] / 60f;
|
||||
Projectile.velocity = Vector2.Normalize(value16) * num629;
|
||||
if (value16.Length() < 64f)
|
||||
Vector2 playerDistance = Main.player[playerTracker].Center - Projectile.Center;
|
||||
float projVelocityMult = 4f;
|
||||
projVelocityMult += Projectile.localAI[0] / 60f;
|
||||
Projectile.velocity = Vector2.Normalize(playerDistance) * projVelocityMult;
|
||||
if (playerDistance.Length() < 64f)
|
||||
{
|
||||
Projectile.Kill();
|
||||
}
|
||||
@@ -114,55 +114,54 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
SoundEngine.PlaySound(FlareSound, Projectile.Center);
|
||||
int num226 = 36;
|
||||
for (int num227 = 0; num227 < num226; num227++)
|
||||
int killDustAmt = 36;
|
||||
for (int i = 0; i < killDustAmt; i++)
|
||||
{
|
||||
Vector2 vector6 = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + Projectile.Center;
|
||||
Vector2 vector7 = vector6 - Projectile.Center;
|
||||
int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 244, vector7.X * 2f, vector7.Y * 2f, 100, default, 1.4f);
|
||||
Main.dust[num228].noGravity = true;
|
||||
Main.dust[num228].noLight = true;
|
||||
Main.dust[num228].velocity = vector7;
|
||||
Vector2 killDustRotate = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
killDustRotate = killDustRotate.RotatedBy((double)((float)(i - (killDustAmt / 2 - 1)) * 6.28318548f / (float)killDustAmt), default) + Projectile.Center;
|
||||
Vector2 killDustDirection = killDustRotate - Projectile.Center;
|
||||
int killFlareDust = Dust.NewDust(killDustRotate + killDustDirection, 0, 0, 244, killDustDirection.X * 2f, killDustDirection.Y * 2f, 100, default, 1.4f);
|
||||
Main.dust[killFlareDust].noGravity = true;
|
||||
Main.dust[killFlareDust].noLight = true;
|
||||
Main.dust[killFlareDust].velocity = killDustDirection;
|
||||
}
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int num231 = (int)(Projectile.Center.Y / 16f);
|
||||
int num232 = (int)(Projectile.Center.X / 16f);
|
||||
int num233 = 100;
|
||||
if (num232 < 10)
|
||||
int projTileX = (int)(Projectile.Center.Y / 16f);
|
||||
int projTileY = (int)(Projectile.Center.X / 16f);
|
||||
if (projTileY < 10)
|
||||
{
|
||||
num232 = 10;
|
||||
projTileY = 10;
|
||||
}
|
||||
if (num232 > Main.maxTilesX - 10)
|
||||
if (projTileY > Main.maxTilesX - 10)
|
||||
{
|
||||
num232 = Main.maxTilesX - 10;
|
||||
projTileY = Main.maxTilesX - 10;
|
||||
}
|
||||
if (num231 < 10)
|
||||
if (projTileX < 10)
|
||||
{
|
||||
num231 = 10;
|
||||
projTileX = 10;
|
||||
}
|
||||
if (num231 > Main.maxTilesY - num233 - 10)
|
||||
if (projTileX > Main.maxTilesY - 110)
|
||||
{
|
||||
num231 = Main.maxTilesY - num233 - 10;
|
||||
projTileX = Main.maxTilesY - 110;
|
||||
}
|
||||
int spawnAreaY = Main.maxTilesY - num231;
|
||||
for (int num234 = num231; num234 < num231 + spawnAreaY; num234++)
|
||||
int spawnAreaY = Main.maxTilesY - projTileX;
|
||||
for (int j = projTileX; j < projTileX + spawnAreaY; j++)
|
||||
{
|
||||
Tile tile = Main.tile[num232, num234 + 10];
|
||||
Tile tile = Main.tile[projTileY, j + 10];
|
||||
if (tile.HasTile && !TileID.Sets.Platforms[tile.TileType] && (Main.tileSolid[(int)tile.TileType] || tile.LiquidAmount != 0))
|
||||
{
|
||||
num231 = num234;
|
||||
projTileX = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
int spawnLimitY = (int)(Main.player[Projectile.owner].Center.Y / 16f) + 75;
|
||||
if (num231 > spawnLimitY)
|
||||
if (projTileX > spawnLimitY)
|
||||
{
|
||||
num231 = spawnLimitY;
|
||||
projTileX = spawnLimitY;
|
||||
}
|
||||
int num236 = Projectile.NewProjectile(Projectile.GetSource_FromThis(), (float)(num232 * 16 + 8), (float)(num231 * 16 - 24), 0f, 0f, ModContent.ProjectileType<Infernado2>(), 0, 4f, Main.myPlayer, 11f, 24f + (revenge ? 2f : 0f));
|
||||
Main.projectile[num236].netUpdate = true;
|
||||
int infernadoSpawn = Projectile.NewProjectile(Projectile.GetSource_FromThis(), (float)(projTileY * 16 + 8), (float)(projTileX * 16 - 24), 0f, 0f, ModContent.ProjectileType<Infernado2>(), 0, 4f, Main.myPlayer, 11f, 24f + (revenge ? 2f : 0f));
|
||||
Main.projectile[infernadoSpawn].netUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System;
|
||||
using System.IO;
|
||||
using CalamityMod.Sounds;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
using ReLogic.Content;
|
||||
using CalamityMod.Sounds;
|
||||
|
||||
namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
@@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (timer > 0f)
|
||||
timer -= 1f;
|
||||
|
||||
float num801 = 1f;
|
||||
float projScale = 1f;
|
||||
if (timeBeforeVanish == 0f)
|
||||
timeBeforeVanish = Projectile.timeLeft <= 900 ? 900f : 1200f;
|
||||
|
||||
@@ -77,35 +77,33 @@ namespace CalamityMod.Projectiles.Boss
|
||||
return;
|
||||
}
|
||||
|
||||
Projectile.scale = (float)Math.Sin(Projectile.localAI[0] * Math.PI / timeBeforeVanish) * 10f * num801;
|
||||
if (Projectile.scale > num801)
|
||||
Projectile.scale = num801;
|
||||
Projectile.scale = (float)Math.Sin(Projectile.localAI[0] * Math.PI / timeBeforeVanish) * 10f * projScale;
|
||||
if (Projectile.scale > projScale)
|
||||
Projectile.scale = projScale;
|
||||
|
||||
float num804 = Projectile.velocity.ToRotation();
|
||||
Projectile.rotation = num804 - MathHelper.PiOver2;
|
||||
Projectile.velocity = num804.ToRotationVector2();
|
||||
float projVelRotation = Projectile.velocity.ToRotation();
|
||||
Projectile.rotation = projVelRotation - MathHelper.PiOver2;
|
||||
Projectile.velocity = projVelRotation.ToRotationVector2();
|
||||
|
||||
float num805 = 3f; //3f
|
||||
float num806 = Projectile.width;
|
||||
float projWidth = Projectile.width;
|
||||
|
||||
Vector2 samplingPoint = Projectile.Center;
|
||||
if (vector78.HasValue)
|
||||
samplingPoint = vector78.Value;
|
||||
|
||||
float laserLength = Projectile.ai[1] - 160f;
|
||||
float[] array3 = new float[(int)num805];
|
||||
Collision.LaserScan(samplingPoint, Projectile.velocity, num806 * Projectile.scale, laserLength, array3);
|
||||
float num807 = 0f;
|
||||
for (int num808 = 0; num808 < array3.Length; num808++)
|
||||
float[] array3 = new float[3];
|
||||
Collision.LaserScan(samplingPoint, Projectile.velocity, projWidth * Projectile.scale, laserLength, array3);
|
||||
float auraLength = 0f;
|
||||
for (int j = 0; j < array3.Length; j++)
|
||||
{
|
||||
num807 += array3[num808];
|
||||
auraLength += array3[j];
|
||||
}
|
||||
num807 /= num805;
|
||||
auraLength /= 3f;
|
||||
|
||||
num807 = MathHelper.Clamp(num807, 3600f, 4800f);
|
||||
auraLength = MathHelper.Clamp(auraLength, 3600f, 4800f);
|
||||
|
||||
float amount = 0.5f;
|
||||
Projectile.localAI[1] = MathHelper.Lerp(Projectile.localAI[1], num807, amount);
|
||||
Projectile.localAI[1] = MathHelper.Lerp(Projectile.localAI[1], auraLength, 0.5f);
|
||||
|
||||
DelegateMethods.v3_1 = new Vector3(0.9f, 0.3f, 0.3f);
|
||||
Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * Projectile.localAI[1], Projectile.width * Projectile.scale, DelegateMethods.CastLight);
|
||||
@@ -137,37 +135,37 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Texture2D texture2 = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/BirbAuraStart", AssetRequestMode.ImmediateLoad).Value;
|
||||
Texture2D texture3 = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/BirbAuraEnd", AssetRequestMode.ImmediateLoad).Value;
|
||||
float num223 = Projectile.localAI[1]; //length of laser
|
||||
Color color44 = new Color(128, 128, 128, 0);
|
||||
float auraDrawLength = Projectile.localAI[1]; //length of laser
|
||||
Color grayColor = new Color(128, 128, 128, 0);
|
||||
Vector2 vector = Projectile.Center - Main.screenPosition;
|
||||
Rectangle? sourceRectangle2 = null;
|
||||
Main.EntitySpriteDraw(texture2, vector, sourceRectangle2, color44, Projectile.rotation, texture2.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
num223 -= (texture2.Height / 2 + texture3.Height) * Projectile.scale;
|
||||
Vector2 value20 = Projectile.Center;
|
||||
value20 += Projectile.velocity * Projectile.scale * texture2.Height / 2f;
|
||||
if (num223 > 0f)
|
||||
Main.EntitySpriteDraw(texture2, vector, sourceRectangle2, grayColor, Projectile.rotation, texture2.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
auraDrawLength -= (texture2.Height / 2 + texture3.Height) * Projectile.scale;
|
||||
Vector2 projCenter = Projectile.Center;
|
||||
projCenter += Projectile.velocity * Projectile.scale * texture2.Height / 2f;
|
||||
if (auraDrawLength > 0f)
|
||||
{
|
||||
float num224 = 0f;
|
||||
Rectangle rectangle7 = new Rectangle(0, 0, texture.Width, texture.Height);
|
||||
while (num224 + 1f < num223)
|
||||
float auraSegment = 0f;
|
||||
Rectangle drawRectangle = new Rectangle(0, 0, texture.Width, texture.Height);
|
||||
while (auraSegment + 1f < auraDrawLength)
|
||||
{
|
||||
if (num223 - num224 < rectangle7.Height)
|
||||
if (auraDrawLength - auraSegment < drawRectangle.Height)
|
||||
{
|
||||
rectangle7.Height = (int)(num223 - num224);
|
||||
drawRectangle.Height = (int)(auraDrawLength - auraSegment);
|
||||
}
|
||||
Main.EntitySpriteDraw(texture, value20 - Main.screenPosition, new Rectangle?(rectangle7), color44, Projectile.rotation, new Vector2(rectangle7.Width / 2, 0f), Projectile.scale, SpriteEffects.None, 0);
|
||||
num224 += rectangle7.Height * Projectile.scale;
|
||||
value20 += Projectile.velocity * rectangle7.Height * Projectile.scale;
|
||||
rectangle7.Y += texture.Height;
|
||||
if (rectangle7.Y + rectangle7.Height > texture.Height)
|
||||
Main.EntitySpriteDraw(texture, projCenter - Main.screenPosition, new Rectangle?(drawRectangle), grayColor, Projectile.rotation, new Vector2(drawRectangle.Width / 2, 0f), Projectile.scale, SpriteEffects.None, 0);
|
||||
auraSegment += drawRectangle.Height * Projectile.scale;
|
||||
projCenter += Projectile.velocity * drawRectangle.Height * Projectile.scale;
|
||||
drawRectangle.Y += texture.Height;
|
||||
if (drawRectangle.Y + drawRectangle.Height > texture.Height)
|
||||
{
|
||||
rectangle7.Y = 0;
|
||||
drawRectangle.Y = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Vector2 vector2 = value20 - Main.screenPosition;
|
||||
Vector2 vector2 = projCenter - Main.screenPosition;
|
||||
sourceRectangle2 = null;
|
||||
Main.EntitySpriteDraw(texture3, vector2, sourceRectangle2, color44, Projectile.rotation, texture3.Frame(1, 1, 0, 0).Top(), Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(texture3, vector2, sourceRectangle2, grayColor, Projectile.rotation, texture3.Frame(1, 1, 0, 0).Top(), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -188,8 +186,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
return true;
|
||||
}
|
||||
float num6 = 0f;
|
||||
if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, Projectile.Center + Projectile.velocity * Projectile.localAI[1], 80f * Projectile.scale, ref num6))
|
||||
float useless = 0f;
|
||||
if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, Projectile.Center + Projectile.velocity * Projectile.localAI[1], 80f * Projectile.scale, ref useless))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -40,35 +40,35 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
if (Projectile.ai[1] > 0f)
|
||||
{
|
||||
int num625 = (int)Projectile.ai[1] - 1;
|
||||
if (num625 < 255)
|
||||
int playerTracker = (int)Projectile.ai[1] - 1;
|
||||
if (playerTracker < 255)
|
||||
{
|
||||
Projectile.localAI[0] += 1f;
|
||||
if (Projectile.localAI[0] > 10f)
|
||||
{
|
||||
// Dust pulse effect
|
||||
Projectile.localAI[1] = (float)Math.Abs(Math.Cos(MathHelper.ToRadians(Projectile.localAI[0] * 2f)));
|
||||
int num626 = 18;
|
||||
for (int num627 = 0; num627 < num626; num627++)
|
||||
int dustAmt = 18;
|
||||
for (int i = 0; i < dustAmt; i++)
|
||||
{
|
||||
Vector2 vector45 = Vector2.Normalize(Projectile.velocity) * new Vector2(Projectile.width / 2f, Projectile.height) * Projectile.localAI[1];
|
||||
vector45 = vector45.RotatedBy((num627 - (num626 / 2 - 1)) * 3.1415926535897931 / (float)num626) + Projectile.Center;
|
||||
Vector2 value15 = ((float)(Main.rand.NextDouble() * Math.PI) - MathHelper.PiOver2).ToRotationVector2() * Main.rand.Next(3, 8);
|
||||
int num628 = Dust.NewDust(vector45 + value15, 0, 0, 60, value15.X * 2f, value15.Y * 2f, 100, default, 1f);
|
||||
Main.dust[num628].scale = 1.4f;
|
||||
Main.dust[num628].noGravity = true;
|
||||
Main.dust[num628].noLight = true;
|
||||
Main.dust[num628].velocity /= 4f;
|
||||
Main.dust[num628].velocity -= Projectile.velocity;
|
||||
Vector2 dustRotation = Vector2.Normalize(Projectile.velocity) * new Vector2(Projectile.width / 2f, Projectile.height) * Projectile.localAI[1];
|
||||
dustRotation = dustRotation.RotatedBy((i - (dustAmt / 2 - 1)) * 3.1415926535897931 / (float)dustAmt) + Projectile.Center;
|
||||
Vector2 randomDustPos = ((float)(Main.rand.NextDouble() * Math.PI) - MathHelper.PiOver2).ToRotationVector2() * Main.rand.Next(3, 8);
|
||||
int lightningDust = Dust.NewDust(dustRotation + randomDustPos, 0, 0, 60, randomDustPos.X * 2f, randomDustPos.Y * 2f, 100, default, 1f);
|
||||
Main.dust[lightningDust].scale = 1.4f;
|
||||
Main.dust[lightningDust].noGravity = true;
|
||||
Main.dust[lightningDust].noLight = true;
|
||||
Main.dust[lightningDust].velocity /= 4f;
|
||||
Main.dust[lightningDust].velocity -= Projectile.velocity;
|
||||
}
|
||||
}
|
||||
|
||||
Vector2 value16 = Main.player[num625].Center - Projectile.Center;
|
||||
float num629 = 4f;
|
||||
Vector2 playerDistance = Main.player[playerTracker].Center - Projectile.Center;
|
||||
float projVelocityMult = 4f;
|
||||
float divisor = 60f - 15f * Projectile.ai[0];
|
||||
num629 += Projectile.localAI[0] / divisor;
|
||||
Projectile.velocity = Vector2.Normalize(value16) * num629;
|
||||
if (value16.Length() < 32f)
|
||||
projVelocityMult += Projectile.localAI[0] / divisor;
|
||||
Projectile.velocity = Vector2.Normalize(playerDistance) * projVelocityMult;
|
||||
if (playerDistance.Length() < 32f)
|
||||
{
|
||||
Projectile.Kill();
|
||||
}
|
||||
@@ -79,40 +79,39 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.DD2_BetsyFireballImpact, Projectile.Center);
|
||||
int num226 = 36;
|
||||
for (int num227 = 0; num227 < num226; num227++)
|
||||
int killDustAmt = 36;
|
||||
for (int i = 0; i < killDustAmt; i++)
|
||||
{
|
||||
Vector2 vector6 = Vector2.Normalize(Projectile.velocity) * new Vector2(Projectile.width / 2f, Projectile.height) * 0.75f;
|
||||
vector6 = vector6.RotatedBy((num227 - (num226 / 2 - 1)) * MathHelper.TwoPi / num226) + Projectile.Center;
|
||||
vector6 = vector6.RotatedBy((i - (killDustAmt / 2 - 1)) * MathHelper.TwoPi / killDustAmt) + Projectile.Center;
|
||||
Vector2 vector7 = vector6 - Projectile.Center;
|
||||
int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 60, vector7.X, vector7.Y, 100, default, 1.4f);
|
||||
Main.dust[num228].noGravity = true;
|
||||
Main.dust[num228].noLight = true;
|
||||
Main.dust[num228].velocity = vector7;
|
||||
int killLightningDust = Dust.NewDust(vector6 + vector7, 0, 0, 60, vector7.X, vector7.Y, 100, default, 1.4f);
|
||||
Main.dust[killLightningDust].noGravity = true;
|
||||
Main.dust[killLightningDust].noLight = true;
|
||||
Main.dust[killLightningDust].velocity = vector7;
|
||||
}
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int num231 = (int)(Projectile.Center.Y / 16f);
|
||||
int num232 = (int)(Projectile.Center.X / 16f);
|
||||
int num233 = 100;
|
||||
if (num232 < 10)
|
||||
int projTileX = (int)(Projectile.Center.Y / 16f);
|
||||
int projTileY = (int)(Projectile.Center.X / 16f);
|
||||
if (projTileY < 10)
|
||||
{
|
||||
num232 = 10;
|
||||
projTileY = 10;
|
||||
}
|
||||
if (num232 > Main.maxTilesX - 10)
|
||||
if (projTileY > Main.maxTilesX - 10)
|
||||
{
|
||||
num232 = Main.maxTilesX - 10;
|
||||
projTileY = Main.maxTilesX - 10;
|
||||
}
|
||||
if (num231 < 10)
|
||||
if (projTileX < 10)
|
||||
{
|
||||
num231 = 10;
|
||||
projTileX = 10;
|
||||
}
|
||||
if (num231 > Main.maxTilesY - num233 - 10)
|
||||
if (projTileX > Main.maxTilesY - 110)
|
||||
{
|
||||
num231 = Main.maxTilesY - num233 - 10;
|
||||
projTileX = Main.maxTilesY - 110;
|
||||
}
|
||||
float x = num232 * 16;
|
||||
float y = num231 * 16 + 900;
|
||||
float x = projTileY * 16;
|
||||
float y = projTileX * 16 + 900;
|
||||
Vector2 laserVelocity = new Vector2(x, 160f) - new Vector2(x, y);
|
||||
int type = ModContent.ProjectileType<BirbAura>();
|
||||
int damage = Projectile.GetProjectileDamage(ModContent.NPCType<Bumblefuck>());
|
||||
@@ -125,9 +124,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
laserVelocity = new Vector2(x, 160f) - new Vector2(x, y);
|
||||
laserVelocity.Normalize();
|
||||
int num237 = Projectile.NewProjectile(Projectile.GetSource_FromThis(), x, y, 0f, laserVelocity.Y, type, damage, 0f, Main.myPlayer, x, y);
|
||||
Main.projectile[num237].timeLeft = 900;
|
||||
Main.projectile[num237].netUpdate = true;
|
||||
int thirdPhaseRightLaser = Projectile.NewProjectile(Projectile.GetSource_FromThis(), x, y, 0f, laserVelocity.Y, type, damage, 0f, Main.myPlayer, x, y);
|
||||
Main.projectile[thirdPhaseRightLaser].timeLeft = 900;
|
||||
Main.projectile[thirdPhaseRightLaser].netUpdate = true;
|
||||
|
||||
x -= 2000f;
|
||||
if ((int)(x / 16f) < 10)
|
||||
@@ -136,15 +135,15 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
laserVelocity = new Vector2(x, 160f) - new Vector2(x, y);
|
||||
laserVelocity.Normalize();
|
||||
int num238 = Projectile.NewProjectile(Projectile.GetSource_FromThis(), x, y, 0f, laserVelocity.Y, type, damage, 0f, Main.myPlayer, x, y);
|
||||
Main.projectile[num238].timeLeft = 900;
|
||||
Main.projectile[num238].netUpdate = true;
|
||||
int thirdPhaseLeftLaser = Projectile.NewProjectile(Projectile.GetSource_FromThis(), x, y, 0f, laserVelocity.Y, type, damage, 0f, Main.myPlayer, x, y);
|
||||
Main.projectile[thirdPhaseLeftLaser].timeLeft = 900;
|
||||
Main.projectile[thirdPhaseLeftLaser].netUpdate = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
laserVelocity.Normalize();
|
||||
int num236 = Projectile.NewProjectile(Projectile.GetSource_FromThis(), x, y, 0f, laserVelocity.Y, type, damage, 0f, Main.myPlayer, x, y);
|
||||
Main.projectile[num236].netUpdate = true;
|
||||
int secondPhaseLaser = Projectile.NewProjectile(Projectile.GetSource_FromThis(), x, y, 0f, laserVelocity.Y, type, damage, 0f, Main.myPlayer, x, y);
|
||||
Main.projectile[secondPhaseLaser].netUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,9 +33,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2;
|
||||
|
||||
int num469 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 0.5f);
|
||||
Main.dust[num469].noGravity = true;
|
||||
Main.dust[num469].velocity *= 0f;
|
||||
int bloody = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 0.5f);
|
||||
Main.dust[bloody].noGravity = true;
|
||||
Main.dust[bloody].velocity *= 0f;
|
||||
|
||||
if (Projectile.velocity.Y < 12f)
|
||||
Projectile.velocity.Y += 0.06f;
|
||||
|
||||
@@ -25,12 +25,12 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
Lighting.AddLight(Projectile.Center, 0.25f, 0f, 0f);
|
||||
|
||||
for (int num468 = 0; num468 < 2; num468++)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Vector2 dspeed = -Projectile.velocity * 0.7f;
|
||||
int num469 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 150, default, 1.1f);
|
||||
Main.dust[num469].noGravity = true;
|
||||
Main.dust[num469].velocity = dspeed;
|
||||
int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 150, default, 1.1f);
|
||||
Main.dust[brimDust].noGravity = true;
|
||||
Main.dust[brimDust].velocity = dspeed;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,10 +67,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.localAI[0] += 1f;
|
||||
}
|
||||
|
||||
int num458 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 170, default, 1.1f);
|
||||
Main.dust[num458].noGravity = true;
|
||||
Main.dust[num458].velocity *= 0.5f;
|
||||
Main.dust[num458].velocity += Projectile.velocity * 0.1f;
|
||||
int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 170, default, 1.1f);
|
||||
Main.dust[brimDust].noGravity = true;
|
||||
Main.dust[brimDust].velocity *= 0.5f;
|
||||
Main.dust[brimDust].velocity += Projectile.velocity * 0.1f;
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using System;
|
||||
using System.IO;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.NPCs.BrimstoneElemental;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using ReLogic.Content;
|
||||
|
||||
namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
@@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
else
|
||||
Projectile.Kill();
|
||||
|
||||
float num801 = 1f;
|
||||
float projScale = 1f;
|
||||
Projectile.localAI[0] += 1f;
|
||||
if (Projectile.localAI[0] >= 45f)
|
||||
{
|
||||
@@ -74,21 +74,20 @@ namespace CalamityMod.Projectiles.Boss
|
||||
return;
|
||||
}
|
||||
|
||||
Projectile.scale = (float)Math.Sin(Projectile.localAI[0] * (float)Math.PI / 45f) * 10f * num801;
|
||||
if (Projectile.scale > num801)
|
||||
Projectile.scale = num801;
|
||||
Projectile.scale = (float)Math.Sin(Projectile.localAI[0] * (float)Math.PI / 45f) * 10f * projScale;
|
||||
if (Projectile.scale > projScale)
|
||||
Projectile.scale = projScale;
|
||||
|
||||
float num804 = Projectile.velocity.ToRotation();
|
||||
float projVelRotation = Projectile.velocity.ToRotation();
|
||||
|
||||
// Rotating beam for test AI
|
||||
if (Projectile.ai[0] > 0f)
|
||||
num804 += Main.npc[(int)Projectile.ai[1]].spriteDirection * MathHelper.TwoPi / 360f;
|
||||
projVelRotation += Main.npc[(int)Projectile.ai[1]].spriteDirection * MathHelper.TwoPi / 360f;
|
||||
|
||||
Projectile.rotation = num804 - MathHelper.PiOver2;
|
||||
Projectile.velocity = num804.ToRotationVector2();
|
||||
Projectile.rotation = projVelRotation - MathHelper.PiOver2;
|
||||
Projectile.velocity = projVelRotation.ToRotationVector2();
|
||||
|
||||
float num805 = 3f; //3f
|
||||
float num806 = Projectile.width;
|
||||
float projWidth = Projectile.width;
|
||||
|
||||
Vector2 samplingPoint = Projectile.Center;
|
||||
if (vector78.HasValue)
|
||||
@@ -96,24 +95,23 @@ namespace CalamityMod.Projectiles.Boss
|
||||
samplingPoint = vector78.Value;
|
||||
}
|
||||
|
||||
float[] array3 = new float[(int)num805];
|
||||
Collision.LaserScan(samplingPoint, Projectile.velocity, num806 * Projectile.scale, 2400f, array3);
|
||||
float num807 = 0f;
|
||||
for (int num808 = 0; num808 < array3.Length; num808++)
|
||||
float[] array3 = new float[3];
|
||||
Collision.LaserScan(samplingPoint, Projectile.velocity, projWidth * Projectile.scale, 2400f, array3);
|
||||
float rayLength = 0f;
|
||||
for (int i = 0; i < array3.Length; i++)
|
||||
{
|
||||
num807 += array3[num808];
|
||||
rayLength += array3[i];
|
||||
}
|
||||
num807 /= num805;
|
||||
rayLength /= 3f;
|
||||
|
||||
// Fire laser through walls at max length if target cannot be seen
|
||||
if (!Collision.CanHitLine(Main.npc[(int)Projectile.ai[1]].Center, 1, 1, Main.player[Main.npc[(int)Projectile.ai[1]].target].Center, 1, 1))
|
||||
{
|
||||
num807 = 2400f;
|
||||
rayLength = 2400f;
|
||||
}
|
||||
|
||||
float amount = 0.5f; //0.5f
|
||||
Projectile.localAI[1] = MathHelper.Lerp(Projectile.localAI[1], num807, amount); //length of laser, linear interpolation
|
||||
Vector2 vector79 = Projectile.Center + Projectile.velocity * (Projectile.localAI[1] - 14f);
|
||||
Projectile.localAI[1] = MathHelper.Lerp(Projectile.localAI[1], rayLength, 0.5f); //length of laser, linear interpolation
|
||||
Vector2 dustSpawnPos = Projectile.Center + Projectile.velocity * (Projectile.localAI[1] - 14f);
|
||||
|
||||
// Fire brimstone darts along the laser
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
@@ -143,23 +141,23 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
}
|
||||
|
||||
for (int num809 = 0; num809 < 2; num809++)
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
float num810 = Projectile.velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? -1f : 1f) * MathHelper.PiOver2;
|
||||
float num811 = (float)Main.rand.NextDouble() * 2f + 2f;
|
||||
Vector2 vector80 = new Vector2((float)Math.Cos(num810) * num811, (float)Math.Sin(num810) * num811);
|
||||
int num812 = Dust.NewDust(vector79, 0, 0, (int)CalamityDusts.Brimstone, vector80.X, vector80.Y, 0, default, 1f);
|
||||
Main.dust[num812].noGravity = true;
|
||||
Main.dust[num812].scale = 1.7f;
|
||||
float dustRotation = Projectile.velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? -1f : 1f) * MathHelper.PiOver2;
|
||||
float randomFloatOffset = (float)Main.rand.NextDouble() * 2f + 2f;
|
||||
Vector2 dustDirection = new Vector2((float)Math.Cos(dustRotation) * randomFloatOffset, (float)Math.Sin(dustRotation) * randomFloatOffset);
|
||||
int brimDust = Dust.NewDust(dustSpawnPos, 0, 0, (int)CalamityDusts.Brimstone, dustDirection.X, dustDirection.Y, 0, default, 1f);
|
||||
Main.dust[brimDust].noGravity = true;
|
||||
Main.dust[brimDust].scale = 1.7f;
|
||||
}
|
||||
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
Vector2 value29 = Projectile.velocity.RotatedBy(MathHelper.PiOver2, default) * ((float)Main.rand.NextDouble() - 0.5f) * Projectile.width;
|
||||
int num813 = Dust.NewDust(vector79 + value29 - Vector2.One * 4f, 8, 8, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f);
|
||||
Dust dust = Main.dust[num813];
|
||||
Vector2 extraDustSpawn = Projectile.velocity.RotatedBy(MathHelper.PiOver2, default) * ((float)Main.rand.NextDouble() - 0.5f) * Projectile.width;
|
||||
int extraBrimDust = Dust.NewDust(dustSpawnPos + extraDustSpawn - Vector2.One * 4f, 8, 8, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f);
|
||||
Dust dust = Main.dust[extraBrimDust];
|
||||
dust.velocity *= 0.5f;
|
||||
Main.dust[num813].velocity.Y = -Math.Abs(Main.dust[num813].velocity.Y);
|
||||
Main.dust[extraBrimDust].velocity.Y = -Math.Abs(Main.dust[extraBrimDust].velocity.Y);
|
||||
}
|
||||
|
||||
DelegateMethods.v3_1 = new Vector3(0.9f, 0.3f, 0.3f);
|
||||
@@ -175,37 +173,37 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Texture2D texture2D19 = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Texture2D texture2D20 = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/BrimstoneRayMid", AssetRequestMode.ImmediateLoad).Value;
|
||||
Texture2D texture2D21 = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/BrimstoneRayEnd", AssetRequestMode.ImmediateLoad).Value;
|
||||
float num223 = Projectile.localAI[1]; //length of laser
|
||||
Color color44 = new Color(255, 255, 255, 0) * 0.9f;
|
||||
float rayDrawLength = Projectile.localAI[1]; //length of laser
|
||||
Color baseColor = new Color(255, 255, 255, 0) * 0.9f;
|
||||
Vector2 vector = Projectile.Center - Main.screenPosition;
|
||||
Rectangle? sourceRectangle2 = null;
|
||||
Main.EntitySpriteDraw(texture2D19, vector, sourceRectangle2, color44, Projectile.rotation, texture2D19.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
num223 -= (texture2D19.Height / 2 + texture2D21.Height) * Projectile.scale;
|
||||
Vector2 value20 = Projectile.Center;
|
||||
value20 += Projectile.velocity * Projectile.scale * texture2D19.Height / 2f;
|
||||
if (num223 > 0f)
|
||||
Main.EntitySpriteDraw(texture2D19, vector, sourceRectangle2, baseColor, Projectile.rotation, texture2D19.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
rayDrawLength -= (texture2D19.Height / 2 + texture2D21.Height) * Projectile.scale;
|
||||
Vector2 projCenter = Projectile.Center;
|
||||
projCenter += Projectile.velocity * Projectile.scale * texture2D19.Height / 2f;
|
||||
if (rayDrawLength > 0f)
|
||||
{
|
||||
float num224 = 0f;
|
||||
Rectangle rectangle7 = new Rectangle(0, 0, texture2D20.Width, texture2D20.Height);
|
||||
while (num224 + 1f < num223)
|
||||
float raySegment = 0f;
|
||||
Rectangle drawRectangle = new Rectangle(0, 0, texture2D20.Width, texture2D20.Height);
|
||||
while (raySegment + 1f < rayDrawLength)
|
||||
{
|
||||
if (num223 - num224 < rectangle7.Height)
|
||||
if (rayDrawLength - raySegment < drawRectangle.Height)
|
||||
{
|
||||
rectangle7.Height = (int)(num223 - num224);
|
||||
drawRectangle.Height = (int)(rayDrawLength - raySegment);
|
||||
}
|
||||
Main.EntitySpriteDraw(texture2D20, value20 - Main.screenPosition, new Rectangle?(rectangle7), color44, Projectile.rotation, new Vector2(rectangle7.Width / 2, 0f), Projectile.scale, SpriteEffects.None, 0);
|
||||
num224 += rectangle7.Height * Projectile.scale;
|
||||
value20 += Projectile.velocity * rectangle7.Height * Projectile.scale;
|
||||
rectangle7.Y += texture2D20.Height;
|
||||
if (rectangle7.Y + rectangle7.Height > texture2D20.Height)
|
||||
Main.EntitySpriteDraw(texture2D20, projCenter - Main.screenPosition, new Rectangle?(drawRectangle), baseColor, Projectile.rotation, new Vector2(drawRectangle.Width / 2, 0f), Projectile.scale, SpriteEffects.None, 0);
|
||||
raySegment += drawRectangle.Height * Projectile.scale;
|
||||
projCenter += Projectile.velocity * drawRectangle.Height * Projectile.scale;
|
||||
drawRectangle.Y += texture2D20.Height;
|
||||
if (drawRectangle.Y + drawRectangle.Height > texture2D20.Height)
|
||||
{
|
||||
rectangle7.Y = 0;
|
||||
drawRectangle.Y = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Vector2 vector2 = value20 - Main.screenPosition;
|
||||
Vector2 vector2 = projCenter - Main.screenPosition;
|
||||
sourceRectangle2 = null;
|
||||
Main.EntitySpriteDraw(texture2D21, vector2, sourceRectangle2, color44, Projectile.rotation, texture2D21.Frame(1, 1, 0, 0).Top(), Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(texture2D21, vector2, sourceRectangle2, baseColor, Projectile.rotation, texture2D21.Frame(1, 1, 0, 0).Top(), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -222,8 +220,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
return true;
|
||||
}
|
||||
float num6 = 0f;
|
||||
if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, Projectile.Center + Projectile.velocity * Projectile.localAI[1], 22f * Projectile.scale, ref num6))
|
||||
float useless = 0f;
|
||||
if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, Projectile.Center + Projectile.velocity * Projectile.localAI[1], 22f * Projectile.scale, ref useless))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using CalamityMod.NPCs.BrimstoneElemental;
|
||||
using System.IO;
|
||||
using CalamityMod.NPCs.BrimstoneElemental;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
public class BrimstoneTargetRay : ModProjectile, ILocalizedModType
|
||||
@@ -80,8 +81,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
}
|
||||
|
||||
float num805 = 3f; //3f
|
||||
float num806 = Projectile.width;
|
||||
float projWidth = Projectile.width;
|
||||
|
||||
Vector2 samplingPoint = Projectile.Center;
|
||||
if (vector78.HasValue)
|
||||
@@ -89,23 +89,23 @@ namespace CalamityMod.Projectiles.Boss
|
||||
samplingPoint = vector78.Value;
|
||||
}
|
||||
|
||||
float[] array3 = new float[(int)num805];
|
||||
Collision.LaserScan(samplingPoint, Projectile.velocity, num806 * Projectile.scale, 2400f, array3);
|
||||
float num807 = 0f;
|
||||
for (int num808 = 0; num808 < array3.Length; num808++)
|
||||
float[] array3 = new float[3];
|
||||
Collision.LaserScan(samplingPoint, Projectile.velocity, projWidth * Projectile.scale, 2400f, array3);
|
||||
float rayLength = 0f;
|
||||
for (int i = 0; i < array3.Length; i++)
|
||||
{
|
||||
num807 += array3[num808];
|
||||
rayLength += array3[i];
|
||||
}
|
||||
num807 /= num805;
|
||||
rayLength /= 3f;
|
||||
|
||||
// Fire laser through walls at max length if target cannot be seen
|
||||
if (!Collision.CanHitLine(Main.npc[(int)Projectile.ai[1]].Center, 1, 1, Main.player[Main.npc[(int)Projectile.ai[1]].target].Center, 1, 1))
|
||||
{
|
||||
num807 = 2400f;
|
||||
rayLength = 2400f;
|
||||
}
|
||||
|
||||
float amount = 0.5f; //0.5f
|
||||
Projectile.localAI[1] = MathHelper.Lerp(Projectile.localAI[1], num807, amount); //length of laser, linear interpolation
|
||||
Projectile.localAI[1] = MathHelper.Lerp(Projectile.localAI[1], rayLength, amount); //length of laser, linear interpolation
|
||||
|
||||
DelegateMethods.v3_1 = new Vector3(0.9f, 0.3f, 0.3f);
|
||||
Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * Projectile.localAI[1], Projectile.width * Projectile.scale, DelegateMethods.CastLight);
|
||||
@@ -120,37 +120,37 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Texture2D texture2D19 = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Texture2D texture2D20 = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/BrimstoneRayMid", AssetRequestMode.ImmediateLoad).Value;
|
||||
Texture2D texture2D21 = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/BrimstoneRayEnd", AssetRequestMode.ImmediateLoad).Value;
|
||||
float num223 = Projectile.localAI[1]; //length of laser
|
||||
Color color44 = new Color(255, 255, 255, 0) * 0.9f;
|
||||
float rayDrawLength = Projectile.localAI[1]; //length of laser
|
||||
Color baseColor = new Color(255, 255, 255, 0) * 0.9f;
|
||||
Vector2 vector = Projectile.Center - Main.screenPosition;
|
||||
Rectangle? sourceRectangle2 = null;
|
||||
Main.EntitySpriteDraw(texture2D19, vector, sourceRectangle2, color44, Projectile.rotation, texture2D19.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
num223 -= (texture2D19.Height / 2 + texture2D21.Height) * Projectile.scale;
|
||||
Vector2 value20 = Projectile.Center;
|
||||
value20 += Projectile.velocity * Projectile.scale * texture2D19.Height / 2f;
|
||||
if (num223 > 0f)
|
||||
Main.EntitySpriteDraw(texture2D19, vector, sourceRectangle2, baseColor, Projectile.rotation, texture2D19.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
rayDrawLength -= (texture2D19.Height / 2 + texture2D21.Height) * Projectile.scale;
|
||||
Vector2 projCenter = Projectile.Center;
|
||||
projCenter += Projectile.velocity * Projectile.scale * texture2D19.Height / 2f;
|
||||
if (rayDrawLength > 0f)
|
||||
{
|
||||
float num224 = 0f;
|
||||
Rectangle rectangle7 = new Rectangle(0, 16 * (Projectile.timeLeft / 3 % 5), texture2D20.Width, 16);
|
||||
while (num224 + 1f < num223)
|
||||
float raySegment = 0f;
|
||||
Rectangle drawRectangle = new Rectangle(0, 16 * (Projectile.timeLeft / 3 % 5), texture2D20.Width, 16);
|
||||
while (raySegment + 1f < rayDrawLength)
|
||||
{
|
||||
if (num223 - num224 < rectangle7.Height)
|
||||
if (rayDrawLength - raySegment < drawRectangle.Height)
|
||||
{
|
||||
rectangle7.Height = (int)(num223 - num224);
|
||||
drawRectangle.Height = (int)(rayDrawLength - raySegment);
|
||||
}
|
||||
Main.EntitySpriteDraw(texture2D20, value20 - Main.screenPosition, new Rectangle?(rectangle7), color44, Projectile.rotation, new Vector2(rectangle7.Width / 2, 0f), Projectile.scale, SpriteEffects.None, 0);
|
||||
num224 += rectangle7.Height * Projectile.scale;
|
||||
value20 += Projectile.velocity * rectangle7.Height * Projectile.scale;
|
||||
rectangle7.Y += 16;
|
||||
if (rectangle7.Y + rectangle7.Height > texture2D20.Height)
|
||||
Main.EntitySpriteDraw(texture2D20, projCenter - Main.screenPosition, new Rectangle?(drawRectangle), baseColor, Projectile.rotation, new Vector2(drawRectangle.Width / 2, 0f), Projectile.scale, SpriteEffects.None, 0);
|
||||
raySegment += drawRectangle.Height * Projectile.scale;
|
||||
projCenter += Projectile.velocity * drawRectangle.Height * Projectile.scale;
|
||||
drawRectangle.Y += 16;
|
||||
if (drawRectangle.Y + drawRectangle.Height > texture2D20.Height)
|
||||
{
|
||||
rectangle7.Y = 0;
|
||||
drawRectangle.Y = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Vector2 vector2 = value20 - Main.screenPosition;
|
||||
Vector2 vector2 = projCenter - Main.screenPosition;
|
||||
sourceRectangle2 = null;
|
||||
Main.EntitySpriteDraw(texture2D21, vector2, sourceRectangle2, color44, Projectile.rotation, texture2D21.Frame(1, 1, 0, 0).Top(), Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(texture2D21, vector2, sourceRectangle2, baseColor, Projectile.rotation, texture2D21.Frame(1, 1, 0, 0).Top(), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -167,8 +167,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
return true;
|
||||
}
|
||||
float num6 = 0f;
|
||||
if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, Projectile.Center + Projectile.velocity * Projectile.localAI[1], 22f * Projectile.scale, ref num6))
|
||||
float useless = 0f;
|
||||
if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, Projectile.Center + Projectile.velocity * Projectile.localAI[1], 22f * Projectile.scale, ref useless))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -74,8 +74,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
int num214 = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
int framing = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
lightColor.R = (byte)(255 * Projectile.Opacity);
|
||||
|
||||
if (CalamityGlobalNPC.SCal != -1)
|
||||
@@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
}
|
||||
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, spriteEffects, 0);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, spriteEffects, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,25 +103,25 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
for (int num621 = 0; num621 < 3; num621++)
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
Main.dust[num622].noGravity = true;
|
||||
int cosmiliteDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[cosmiliteDust].velocity *= 3f;
|
||||
Main.dust[cosmiliteDust].noGravity = true;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[cosmiliteDust].scale = 0.5f;
|
||||
Main.dust[cosmiliteDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 5; num623++)
|
||||
for (int j = 0; j < 5; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int cosmiliteDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[cosmiliteDust2].noGravity = true;
|
||||
Main.dust[cosmiliteDust2].velocity *= 5f;
|
||||
cosmiliteDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[cosmiliteDust2].noGravity = true;
|
||||
Main.dust[cosmiliteDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,25 +101,25 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
for (int num621 = 0; num621 < 3; num621++)
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
Main.dust[num622].noGravity = true;
|
||||
int cosmiliteDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[cosmiliteDust].velocity *= 3f;
|
||||
Main.dust[cosmiliteDust].noGravity = true;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[cosmiliteDust].scale = 0.5f;
|
||||
Main.dust[cosmiliteDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 5; num623++)
|
||||
for (int j = 0; j < 5; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int cosmiliteDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[cosmiliteDust2].noGravity = true;
|
||||
Main.dust[cosmiliteDust2].velocity *= 5f;
|
||||
cosmiliteDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[cosmiliteDust2].noGravity = true;
|
||||
Main.dust[cosmiliteDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,21 +101,21 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.width = Projectile.height = 96;
|
||||
Projectile.position.X = Projectile.position.X - (Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
|
||||
for (int num621 = 0; num621 < 5; num621++)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int purpleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[purpleDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[purpleDust].scale = 0.5f;
|
||||
Main.dust[purpleDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 10; num623++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 1.5f;
|
||||
int astralDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[astralDust].noGravity = true;
|
||||
Main.dust[astralDust].velocity *= 1.5f;
|
||||
Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 1f);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,17 +44,17 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.PiOver2;
|
||||
|
||||
int num103 = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
int playerTracker = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
Projectile.ai[1] += 1f;
|
||||
if (Projectile.ai[1] < 120f && Projectile.ai[1] > 30f)
|
||||
{
|
||||
float scaleFactor2 = Projectile.velocity.Length();
|
||||
Vector2 vector11 = Main.player[num103].Center - Projectile.Center;
|
||||
vector11.Normalize();
|
||||
vector11 *= scaleFactor2;
|
||||
Projectile.velocity = (Projectile.velocity * 20f + vector11) / 21f;
|
||||
float projSpeed = Projectile.velocity.Length();
|
||||
Vector2 playerDistance = Main.player[playerTracker].Center - Projectile.Center;
|
||||
playerDistance.Normalize();
|
||||
playerDistance *= projSpeed;
|
||||
Projectile.velocity = (Projectile.velocity * 20f + playerDistance) / 21f;
|
||||
Projectile.velocity.Normalize();
|
||||
Projectile.velocity *= scaleFactor2;
|
||||
Projectile.velocity *= projSpeed;
|
||||
}
|
||||
|
||||
if (Projectile.timeLeft == 950)
|
||||
|
||||
@@ -58,25 +58,25 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item92, Projectile.Center);
|
||||
|
||||
for (int num621 = 0; num621 < 15; num621++)
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
Main.dust[num622].noGravity = true;
|
||||
int ectoDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[ectoDust].velocity *= 3f;
|
||||
Main.dust[ectoDust].noGravity = true;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[ectoDust].scale = 0.5f;
|
||||
Main.dust[ectoDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 30; num623++)
|
||||
for (int j = 0; j < 30; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int ectoDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[ectoDust2].noGravity = true;
|
||||
Main.dust[ectoDust2].velocity *= 5f;
|
||||
ectoDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[ectoDust2].noGravity = true;
|
||||
Main.dust[ectoDust2].velocity *= 2f;
|
||||
}
|
||||
|
||||
Projectile.ai[1] = Projectile.ai[0];
|
||||
|
||||
+32
-32
@@ -83,48 +83,48 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.width = Projectile.height = 64;
|
||||
Projectile.position.X = Projectile.position.X - Projectile.width / 2;
|
||||
Projectile.position.Y = Projectile.position.Y - Projectile.height / 2;
|
||||
for (int num621 = 0; num621 < 5; num621++)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int godSlay = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[godSlay].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[godSlay].scale = 0.5f;
|
||||
Main.dust[godSlay].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 10; num623++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int godSlay2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[godSlay2].noGravity = true;
|
||||
Main.dust[godSlay2].velocity *= 5f;
|
||||
godSlay2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[godSlay2].velocity *= 2f;
|
||||
}
|
||||
for (int num640 = 0; num640 < 200; num640++)
|
||||
for (int k = 0; k < 200; k++)
|
||||
{
|
||||
float num641 = 12f;
|
||||
if (num640 < 150)
|
||||
num641 = 9f;
|
||||
if (num640 < 100)
|
||||
num641 = 6f;
|
||||
if (num640 < 50)
|
||||
num641 = 3f;
|
||||
float dustScale = 12f;
|
||||
if (k < 150)
|
||||
dustScale = 9f;
|
||||
if (k < 100)
|
||||
dustScale = 6f;
|
||||
if (k < 50)
|
||||
dustScale = 3f;
|
||||
|
||||
int num643 = Dust.NewDust(Projectile.Center, 6, 6, 173, 0f, 0f, 100, default, 1f);
|
||||
float num644 = Main.dust[num643].velocity.X;
|
||||
float num645 = Main.dust[num643].velocity.Y;
|
||||
int scalingDust = Dust.NewDust(Projectile.Center, 6, 6, 173, 0f, 0f, 100, default, 1f);
|
||||
float scalingDustVelX = Main.dust[scalingDust].velocity.X;
|
||||
float scalingDustVelY = Main.dust[scalingDust].velocity.Y;
|
||||
|
||||
if (num644 == 0f && num645 == 0f)
|
||||
num644 = 1f;
|
||||
if (scalingDustVelX == 0f && scalingDustVelY == 0f)
|
||||
scalingDustVelX = 1f;
|
||||
|
||||
float num646 = (float)Math.Sqrt(num644 * num644 + num645 * num645);
|
||||
num646 = num641 / num646;
|
||||
num644 *= num646;
|
||||
num645 *= num646;
|
||||
float scalingDustVelocity = (float)Math.Sqrt(scalingDustVelX * scalingDustVelX + scalingDustVelY * scalingDustVelY);
|
||||
scalingDustVelocity = dustScale / scalingDustVelocity;
|
||||
scalingDustVelX *= scalingDustVelocity;
|
||||
scalingDustVelY *= scalingDustVelocity;
|
||||
|
||||
float scale = 1f;
|
||||
switch ((int)num641)
|
||||
switch ((int)dustScale)
|
||||
{
|
||||
case 4:
|
||||
scale = 1.2f;
|
||||
@@ -142,10 +142,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
break;
|
||||
}
|
||||
|
||||
Dust dust = Main.dust[num643];
|
||||
Dust dust = Main.dust[scalingDust];
|
||||
dust.velocity *= 0.5f;
|
||||
dust.velocity.X += num644;
|
||||
dust.velocity.Y += num645;
|
||||
dust.velocity.X += scalingDustVelX;
|
||||
dust.velocity.Y += scalingDustVelY;
|
||||
dust.scale = scale;
|
||||
dust.noGravity = true;
|
||||
}
|
||||
|
||||
@@ -24,11 +24,11 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(Projectile.Center, 0.45f, 0f, 0.55f);
|
||||
for (int num468 = 0; num468 < 5; num468++)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int num469 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 0.5f);
|
||||
Main.dust[num469].noGravity = true;
|
||||
Main.dust[num469].velocity *= 0f;
|
||||
int essenceDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 0.5f);
|
||||
Main.dust[essenceDust].noGravity = true;
|
||||
Main.dust[essenceDust].velocity *= 0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,23 +40,23 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.width = Projectile.height = size;
|
||||
Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
|
||||
for (int num621 = 0; num621 < 10; num621++)
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int godSlay = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[godSlay].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[godSlay].scale = 0.5f;
|
||||
Main.dust[godSlay].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 15; num623++)
|
||||
for (int j = 0; j < 15; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int godSlay2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[godSlay2].noGravity = true;
|
||||
Main.dust[godSlay2].velocity *= 5f;
|
||||
godSlay2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[godSlay2].velocity *= 2f;
|
||||
}
|
||||
Projectile.Damage();
|
||||
}
|
||||
|
||||
+32
-33
@@ -55,13 +55,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.frame = 0;
|
||||
}
|
||||
|
||||
float num630 = 0.209439516f;
|
||||
float num631 = 4f;
|
||||
float num632 = (float)(Math.Cos((double)(num630 * Projectile.ai[0])) - 0.5) * num631;
|
||||
Projectile.velocity.Y = Projectile.velocity.Y - num632;
|
||||
float wavingAmplitude = 0.209439516f;
|
||||
float projVelocityMult = 4f;
|
||||
float projFloatDirection = (float)(Math.Cos((double)(wavingAmplitude * Projectile.ai[0])) - 0.5) * projVelocityMult;
|
||||
Projectile.velocity.Y = Projectile.velocity.Y - projFloatDirection;
|
||||
Projectile.ai[0] += 1f;
|
||||
num632 = (float)(Math.Cos((double)(num630 * Projectile.ai[0])) - 0.5) * num631;
|
||||
Projectile.velocity.Y = Projectile.velocity.Y + num632;
|
||||
projFloatDirection = (float)(Math.Cos((double)(wavingAmplitude * Projectile.ai[0])) - 0.5) * projVelocityMult;
|
||||
Projectile.velocity.Y = Projectile.velocity.Y + projFloatDirection;
|
||||
|
||||
Projectile.localAI[0] += 1f;
|
||||
if (Projectile.localAI[0] > 10f)
|
||||
@@ -95,54 +95,53 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
SoundEngine.PlaySound(FlareSound, Projectile.Center);
|
||||
int num226 = 36;
|
||||
for (int num227 = 0; num227 < num226; num227++)
|
||||
int dustAmt = 36;
|
||||
for (int i = 0; i < dustAmt; i++)
|
||||
{
|
||||
Vector2 vector6 = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + Projectile.Center;
|
||||
Vector2 vector7 = vector6 - Projectile.Center;
|
||||
int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 244, vector7.X * 2f, vector7.Y * 2f, 100, default, 1.4f);
|
||||
Main.dust[num228].noGravity = true;
|
||||
Main.dust[num228].noLight = true;
|
||||
Main.dust[num228].velocity = vector7;
|
||||
Vector2 dustRotate = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
dustRotate = dustRotate.RotatedBy((double)((float)(i - (dustAmt / 2 - 1)) * 6.28318548f / (float)dustAmt), default) + Projectile.Center;
|
||||
Vector2 dustDirection = dustRotate - Projectile.Center;
|
||||
int flareDust = Dust.NewDust(dustRotate + dustDirection, 0, 0, 244, dustDirection.X * 2f, dustDirection.Y * 2f, 100, default, 1.4f);
|
||||
Main.dust[flareDust].noGravity = true;
|
||||
Main.dust[flareDust].noLight = true;
|
||||
Main.dust[flareDust].velocity = dustDirection;
|
||||
}
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int num231 = (int)(Projectile.Center.Y / 16f);
|
||||
int num232 = (int)(Projectile.Center.X / 16f);
|
||||
int num233 = 100;
|
||||
if (num232 < 10)
|
||||
int projTileX = (int)(Projectile.Center.Y / 16f);
|
||||
int projTileY = (int)(Projectile.Center.X / 16f);
|
||||
if (projTileY < 10)
|
||||
{
|
||||
num232 = 10;
|
||||
projTileY = 10;
|
||||
}
|
||||
if (num232 > Main.maxTilesX - 10)
|
||||
if (projTileY > Main.maxTilesX - 10)
|
||||
{
|
||||
num232 = Main.maxTilesX - 10;
|
||||
projTileY = Main.maxTilesX - 10;
|
||||
}
|
||||
if (num231 < 10)
|
||||
if (projTileX < 10)
|
||||
{
|
||||
num231 = 10;
|
||||
projTileX = 10;
|
||||
}
|
||||
if (num231 > Main.maxTilesY - num233 - 10)
|
||||
if (projTileX > Main.maxTilesY - 110)
|
||||
{
|
||||
num231 = Main.maxTilesY - num233 - 10;
|
||||
projTileX = Main.maxTilesY - 110;
|
||||
}
|
||||
for (int num234 = num231; num234 < num231 + num233; num234++)
|
||||
for (int j = projTileX; j < projTileX + 100; j++)
|
||||
{
|
||||
Tile tile = Main.tile[num232, num234];
|
||||
Tile tile = Main.tile[projTileY, j];
|
||||
if (tile.HasTile && (Main.tileSolid[(int)tile.TileType] || tile.LiquidAmount != 0))
|
||||
{
|
||||
num231 = num234;
|
||||
projTileX = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
int spawnLimitY = (int)(Main.player[Projectile.owner].Center.Y / 16f) + 25;
|
||||
if (num231 > spawnLimitY)
|
||||
if (projTileX > spawnLimitY)
|
||||
{
|
||||
num231 = spawnLimitY;
|
||||
projTileX = spawnLimitY;
|
||||
}
|
||||
int num236 = Projectile.NewProjectile(Projectile.GetSource_FromThis(), (float)(num232 * 16 + 8), (float)(num231 * 16 - 24), 0f, 0f, ModContent.ProjectileType<Flarenado>(), 0, 4f, Main.myPlayer, 11f, 10f + (revenge ? 1f : 0f));
|
||||
Main.projectile[num236].netUpdate = true;
|
||||
int flarenadoSpawn = Projectile.NewProjectile(Projectile.GetSource_FromThis(), (float)(projTileY * 16 + 8), (float)(projTileX * 16 - 24), 0f, 0f, ModContent.ProjectileType<Flarenado>(), 0, 4f, Main.myPlayer, 11f, 10f + (revenge ? 1f : 0f));
|
||||
Main.projectile[flarenadoSpawn].netUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,15 +57,14 @@ namespace CalamityMod.Projectiles.Boss
|
||||
return;
|
||||
|
||||
float inertia = revenge ? 70f : 77f;
|
||||
float num954 = 40f;
|
||||
float scaleFactor12 = revenge ? 35f : 28f;
|
||||
int num959 = (int)Projectile.ai[0];
|
||||
if (num959 >= 0 && Main.player[num959].active && !Main.player[num959].dead)
|
||||
float velocityMult = revenge ? 35f : 28f;
|
||||
int playerTracker = (int)Projectile.ai[0];
|
||||
if (playerTracker >= 0 && Main.player[playerTracker].active && !Main.player[playerTracker].dead)
|
||||
{
|
||||
if (Projectile.Distance(Main.player[num959].Center) > num954)
|
||||
if (Projectile.Distance(Main.player[playerTracker].Center) > 40f)
|
||||
{
|
||||
Vector2 moveDirection = Projectile.SafeDirectionTo(Main.player[num959].Center, Vector2.UnitY);
|
||||
Projectile.velocity = (Projectile.velocity * (inertia - 1f) + moveDirection * scaleFactor12) / inertia;
|
||||
Vector2 moveDirection = Projectile.SafeDirectionTo(Main.player[playerTracker].Center, Vector2.UnitY);
|
||||
Projectile.velocity = (Projectile.velocity * (inertia - 1f) + moveDirection * velocityMult) / inertia;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -80,24 +79,24 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.timeLeft < 60)
|
||||
return;
|
||||
|
||||
float num1247 = 0.5f;
|
||||
for (int num1248 = 0; num1248 < Main.maxProjectiles; num1248++)
|
||||
float acceleration = 0.5f;
|
||||
for (int j = 0; j < Main.maxProjectiles; j++)
|
||||
{
|
||||
if (Main.projectile[num1248].active)
|
||||
if (Main.projectile[j].active)
|
||||
{
|
||||
if (num1248 != Projectile.whoAmI && Main.projectile[num1248].type == Projectile.type)
|
||||
if (j != Projectile.whoAmI && Main.projectile[j].type == Projectile.type)
|
||||
{
|
||||
if (Vector2.Distance(Projectile.Center, Main.projectile[num1248].Center) < 24f)
|
||||
if (Vector2.Distance(Projectile.Center, Main.projectile[j].Center) < 24f)
|
||||
{
|
||||
if (Projectile.position.X < Main.projectile[num1248].position.X)
|
||||
Projectile.velocity.X -= num1247;
|
||||
if (Projectile.position.X < Main.projectile[j].position.X)
|
||||
Projectile.velocity.X -= acceleration;
|
||||
else
|
||||
Projectile.velocity.X += num1247;
|
||||
Projectile.velocity.X += acceleration;
|
||||
|
||||
if (Projectile.position.Y < Main.projectile[num1248].position.Y)
|
||||
Projectile.velocity.Y -= num1247;
|
||||
if (Projectile.position.Y < Main.projectile[j].position.Y)
|
||||
Projectile.velocity.Y -= acceleration;
|
||||
else
|
||||
Projectile.velocity.Y += num1247;
|
||||
Projectile.velocity.Y += acceleration;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -109,9 +108,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
int num214 = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Rectangle(0, y6, texture.Width, num214), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
int framing = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Rectangle(0, y6, texture.Width, framing), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,17 +79,17 @@ namespace CalamityMod.Projectiles.Boss
|
||||
start = false;
|
||||
}
|
||||
|
||||
float amount = Projectile.localAI[0] / 120f;
|
||||
if (amount > 1f)
|
||||
amount = 1f;
|
||||
distance += MathHelper.Lerp(1f, 9f, amount);
|
||||
float earlyTimeProjSpeed = Projectile.localAI[0] / 120f;
|
||||
if (earlyTimeProjSpeed > 1f)
|
||||
earlyTimeProjSpeed = 1f;
|
||||
distance += MathHelper.Lerp(1f, 9f, earlyTimeProjSpeed);
|
||||
|
||||
if (Projectile.timeLeft < 380)
|
||||
{
|
||||
float amount2 = (Projectile.localAI[0] - 300f) / 240f;
|
||||
if (amount2 > 1f)
|
||||
amount2 = 1f;
|
||||
distance += MathHelper.Lerp(1f, 9f, amount2);
|
||||
float longTimeProjSpeed = (Projectile.localAI[0] - 300f) / 240f;
|
||||
if (longTimeProjSpeed > 1f)
|
||||
longTimeProjSpeed = 1f;
|
||||
distance += MathHelper.Lerp(1f, 9f, longTimeProjSpeed);
|
||||
}
|
||||
|
||||
double rad = MathHelper.ToRadians(Projectile.ai[1]);
|
||||
@@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.position.Y = startingPosY - (int)(Math.Sin(rad) * distance) - Projectile.height / 2;
|
||||
}
|
||||
|
||||
Projectile.ai[1] += (1.1f - amount) * 0.5f;
|
||||
Projectile.ai[1] += (1.1f - earlyTimeProjSpeed) * 0.5f;
|
||||
Projectile.localAI[0] += 1f;
|
||||
}
|
||||
|
||||
@@ -113,9 +113,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
int num214 = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
int framing = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,9 +53,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
int num214 = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
int framing = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,8 +105,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.netUpdate = true;
|
||||
Vector2 center = Projectile.Center;
|
||||
center.Y -= baseHeight * Projectile.scale / 2f;
|
||||
float num618 = (scaleBase - Projectile.ai[1] + 1f) * scaleMult / scaleBase;
|
||||
center.Y -= baseHeight * num618 / 2f;
|
||||
float finalProjHeight = (scaleBase - Projectile.ai[1] + 1f) * scaleMult / scaleBase;
|
||||
center.Y -= baseHeight * finalProjHeight / 2f;
|
||||
center.Y += 2f;
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), center, Projectile.velocity, Projectile.type, Projectile.damage, Projectile.knockBack, Projectile.owner, 11f, Projectile.ai[1] - 1f);
|
||||
}
|
||||
@@ -116,14 +116,14 @@ namespace CalamityMod.Projectiles.Boss
|
||||
bool breakapart = Main.zenithWorld && Projectile.localAI[1] >= breakThreshold;
|
||||
if (Projectile.ai[0] <= 0f && !breakapart)
|
||||
{
|
||||
float num622 = 0.104719758f;
|
||||
float num623 = (float)Projectile.width / 5f;
|
||||
num623 *= 2f;
|
||||
float num624 = (float)(Math.Cos((double)(num622 * -(double)Projectile.ai[0])) - 0.5) * num623;
|
||||
Projectile.position.X -= num624 * -Projectile.direction;
|
||||
float swaySize = 0.104719758f;
|
||||
float smolWidth = (float)Projectile.width / 5f;
|
||||
smolWidth *= 2f;
|
||||
float projXChange = (float)(Math.Cos((double)(swaySize * -(double)Projectile.ai[0])) - 0.5) * smolWidth;
|
||||
Projectile.position.X -= projXChange * -Projectile.direction;
|
||||
Projectile.ai[0] -= 1f;
|
||||
num624 = (float)(Math.Cos((double)(num622 * -(double)Projectile.ai[0])) - 0.5) * num623;
|
||||
Projectile.position.X += num624 * -Projectile.direction;
|
||||
projXChange = (float)(Math.Cos((double)(swaySize * -(double)Projectile.ai[0])) - 0.5) * smolWidth;
|
||||
Projectile.position.X += projXChange * -Projectile.direction;
|
||||
}
|
||||
if (Projectile.localAI[1] == breakThreshold && Main.zenithWorld)
|
||||
{
|
||||
@@ -147,9 +147,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
int num214 = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
int framing = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,14 +55,14 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
if (Projectile.ai[1] == 0f)
|
||||
{
|
||||
for (int num621 = 0; num621 < 5; num621++)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 187, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int mistDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 187, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[mistDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[mistDust].scale = 0.5f;
|
||||
Main.dust[mistDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
Projectile.ai[1] = 1f;
|
||||
@@ -74,15 +74,15 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.localAI[1] = 0f;
|
||||
for (int l = 0; l < 12; l++)
|
||||
{
|
||||
Vector2 vector3 = Vector2.UnitX * -Projectile.width / 2f;
|
||||
vector3 += -Vector2.UnitY.RotatedBy(l * MathHelper.Pi / 6f) * new Vector2(8f, 16f);
|
||||
vector3 = vector3.RotatedBy(Projectile.rotation - MathHelper.PiOver2);
|
||||
int num9 = Dust.NewDust(Projectile.Center, 0, 0, 187, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[num9].scale = 1.1f;
|
||||
Main.dust[num9].noGravity = true;
|
||||
Main.dust[num9].position = Projectile.Center + vector3;
|
||||
Main.dust[num9].velocity = Projectile.velocity * 0.1f;
|
||||
Main.dust[num9].velocity = Vector2.Normalize(Projectile.Center - Projectile.velocity * 3f - Main.dust[num9].position) * 1.25f;
|
||||
Vector2 dustRotation = Vector2.UnitX * -Projectile.width / 2f;
|
||||
dustRotation += -Vector2.UnitY.RotatedBy(l * MathHelper.Pi / 6f) * new Vector2(8f, 16f);
|
||||
dustRotation = dustRotation.RotatedBy(Projectile.rotation - MathHelper.PiOver2);
|
||||
int extraMistDust = Dust.NewDust(Projectile.Center, 0, 0, 187, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[extraMistDust].scale = 1.1f;
|
||||
Main.dust[extraMistDust].noGravity = true;
|
||||
Main.dust[extraMistDust].position = Projectile.Center + dustRotation;
|
||||
Main.dust[extraMistDust].velocity = Projectile.velocity * 0.1f;
|
||||
Main.dust[extraMistDust].velocity = Vector2.Normalize(Projectile.Center - Projectile.velocity * 3f - Main.dust[extraMistDust].position) * 1.25f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,17 +91,17 @@ namespace CalamityMod.Projectiles.Boss
|
||||
else
|
||||
Projectile.Opacity = MathHelper.Clamp(1f - ((Projectile.timeLeft - 270) / 30f), 0f, 1f);
|
||||
|
||||
int num103 = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
int playerTracker = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
Projectile.ai[1] += 1f;
|
||||
if (Projectile.ai[1] < 140f && Projectile.ai[1] > 60f)
|
||||
{
|
||||
float scaleFactor2 = Projectile.velocity.Length();
|
||||
Vector2 vector11 = Main.player[num103].Center - Projectile.Center;
|
||||
vector11.Normalize();
|
||||
vector11 *= scaleFactor2;
|
||||
Projectile.velocity = (Projectile.velocity * 24f + vector11) / 25f;
|
||||
float projVelocityMult = Projectile.velocity.Length();
|
||||
Vector2 playerDistance = Main.player[playerTracker].Center - Projectile.Center;
|
||||
playerDistance.Normalize();
|
||||
playerDistance *= projVelocityMult;
|
||||
Projectile.velocity = (Projectile.velocity * 24f + playerDistance) / 25f;
|
||||
Projectile.velocity.Normalize();
|
||||
Projectile.velocity *= scaleFactor2;
|
||||
Projectile.velocity *= projVelocityMult;
|
||||
}
|
||||
if (Projectile.velocity.Length() < 12f)
|
||||
Projectile.velocity *= 1.02f;
|
||||
|
||||
@@ -54,9 +54,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
Projectile.alpha = 0;
|
||||
}
|
||||
int num469 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 85, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num469].noGravity = true;
|
||||
Main.dust[num469].velocity *= 0f;
|
||||
int sandyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 85, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[sandyDust].noGravity = true;
|
||||
Main.dust[sandyDust].velocity *= 0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,16 +67,16 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.width = Projectile.height = (int)(32 * Projectile.scale);
|
||||
Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
|
||||
int num226 = 36;
|
||||
for (int num227 = 0; num227 < num226; num227++)
|
||||
int dustAmt = 36;
|
||||
for (int i = 0; i < dustAmt; i++)
|
||||
{
|
||||
Vector2 vector6 = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + Projectile.Center;
|
||||
Vector2 vector7 = vector6 - Projectile.Center;
|
||||
int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 85, vector7.X * 1.5f, vector7.Y * 1.5f, 100, default, 1.2f);
|
||||
Main.dust[num228].noGravity = true;
|
||||
Main.dust[num228].noLight = true;
|
||||
Main.dust[num228].velocity = vector7;
|
||||
Vector2 dustRotate = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
dustRotate = dustRotate.RotatedBy((double)((float)(i - (dustAmt / 2 - 1)) * 6.28318548f / (float)dustAmt), default) + Projectile.Center;
|
||||
Vector2 dustDirection = dustRotate - Projectile.Center;
|
||||
int killSand = Dust.NewDust(dustRotate + dustDirection, 0, 0, 85, dustDirection.X * 1.5f, dustDirection.Y * 1.5f, 100, default, 1.2f);
|
||||
Main.dust[killSand].noGravity = true;
|
||||
Main.dust[killSand].noLight = true;
|
||||
Main.dust[killSand].velocity = dustDirection;
|
||||
}
|
||||
Projectile.Damage();
|
||||
}
|
||||
|
||||
@@ -25,48 +25,47 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
int num487 = (int)Projectile.ai[0];
|
||||
float num488 = 2.5f;
|
||||
Vector2 vector36 = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f);
|
||||
float num489 = Main.player[num487].Center.X - vector36.X;
|
||||
float num490 = Main.player[num487].Center.Y - vector36.Y;
|
||||
float num491 = (float)Math.Sqrt((double)(num489 * num489 + num490 * num490));
|
||||
if (num491 < 50f && Projectile.position.X < Main.player[num487].position.X + (float)Main.player[num487].width && Projectile.position.X + (float)Projectile.width > Main.player[num487].position.X && Projectile.position.Y < Main.player[num487].position.Y + (float)Main.player[num487].height && Projectile.position.Y + (float)Projectile.height > Main.player[num487].position.Y)
|
||||
int playerTracker = (int)Projectile.ai[0];
|
||||
Vector2 projDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f);
|
||||
float playerDistX = Main.player[playerTracker].Center.X - projDirection.X;
|
||||
float playerDistY = Main.player[playerTracker].Center.Y - projDirection.Y;
|
||||
float playerDistance = (float)Math.Sqrt((double)(playerDistX * playerDistX + playerDistY * playerDistY));
|
||||
if (playerDistance < 50f && Projectile.position.X < Main.player[playerTracker].position.X + (float)Main.player[playerTracker].width && Projectile.position.X + (float)Projectile.width > Main.player[playerTracker].position.X && Projectile.position.Y < Main.player[playerTracker].position.Y + (float)Main.player[playerTracker].height && Projectile.position.Y + (float)Projectile.height > Main.player[playerTracker].position.Y)
|
||||
{
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int num492 = (int)Projectile.ai[1];
|
||||
Main.player[num487].HealEffect(num492, false);
|
||||
Main.player[num487].statLife += num492;
|
||||
if (Main.player[num487].statLife > Main.player[num487].statLifeMax2)
|
||||
int healAmount = (int)Projectile.ai[1];
|
||||
Main.player[playerTracker].HealEffect(healAmount, false);
|
||||
Main.player[playerTracker].statLife += healAmount;
|
||||
if (Main.player[playerTracker].statLife > Main.player[playerTracker].statLifeMax2)
|
||||
{
|
||||
Main.player[num487].statLife = Main.player[num487].statLifeMax2;
|
||||
Main.player[playerTracker].statLife = Main.player[playerTracker].statLifeMax2;
|
||||
}
|
||||
// TODO -- but why
|
||||
if (Main.player[num487].statLife < 0)
|
||||
if (Main.player[playerTracker].statLife < 0)
|
||||
{
|
||||
Main.player[num487].KillMe(PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.ProvidenceAntiHealing").Format(Main.player[num487].name)), 1000.0, 0, false);
|
||||
Main.player[playerTracker].KillMe(PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.ProvidenceAntiHealing").Format(Main.player[playerTracker].name)), 1000.0, 0, false);
|
||||
}
|
||||
NetMessage.SendData(MessageID.SpiritHeal, -1, -1, null, num487, (float)num492, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.SpiritHeal, -1, -1, null, playerTracker, (float)healAmount, 0f, 0f, 0, 0, 0);
|
||||
}
|
||||
Projectile.Kill();
|
||||
}
|
||||
num491 = num488 / num491;
|
||||
num489 *= num491;
|
||||
num490 *= num491;
|
||||
Projectile.velocity.X = (Projectile.velocity.X * 15f + num489) / 16f;
|
||||
Projectile.velocity.Y = (Projectile.velocity.Y * 15f + num490) / 16f;
|
||||
for (int num497 = 0; num497 < 1; num497++)
|
||||
playerDistance = 2.5f / playerDistance;
|
||||
playerDistX *= playerDistance;
|
||||
playerDistY *= playerDistance;
|
||||
Projectile.velocity.X = (Projectile.velocity.X * 15f + playerDistX) / 16f;
|
||||
Projectile.velocity.Y = (Projectile.velocity.Y * 15f + playerDistY) / 16f;
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
float num498 = Projectile.velocity.X * 0.2f * (float)num497;
|
||||
float num499 = -(Projectile.velocity.Y * 0.2f) * (float)num497;
|
||||
int num500 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 127, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num500].noGravity = true;
|
||||
Main.dust[num500].velocity *= 0f;
|
||||
Dust expr_154F9_cp_0 = Main.dust[num500];
|
||||
expr_154F9_cp_0.position.X -= num498;
|
||||
Dust expr_15518_cp_0 = Main.dust[num500];
|
||||
expr_15518_cp_0.position.Y -= num499;
|
||||
float shortXVel = Projectile.velocity.X * 0.2f * (float)i;
|
||||
float shortYVel = -(Projectile.velocity.Y * 0.2f) * (float)i;
|
||||
int holyFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 127, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[holyFire].noGravity = true;
|
||||
Main.dust[holyFire].velocity *= 0f;
|
||||
Dust expr_154F9_cp_0 = Main.dust[holyFire];
|
||||
expr_154F9_cp_0.position.X -= shortXVel;
|
||||
Dust expr_15518_cp_0 = Main.dust[holyFire];
|
||||
expr_15518_cp_0.position.Y -= shortYVel;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -43,61 +43,61 @@ namespace CalamityMod.Projectiles.Boss
|
||||
SoundEngine.PlaySound(SoundID.Item20, Projectile.Center);
|
||||
Projectile.localAI[0] += 1f;
|
||||
}
|
||||
bool flag15 = false;
|
||||
bool flag16 = false;
|
||||
bool xflag = false;
|
||||
bool yflag = false;
|
||||
if (Projectile.velocity.X < 0f && Projectile.position.X < Projectile.ai[0])
|
||||
{
|
||||
flag15 = true;
|
||||
xflag = true;
|
||||
}
|
||||
if (Projectile.velocity.X > 0f && Projectile.position.X > Projectile.ai[0])
|
||||
{
|
||||
flag15 = true;
|
||||
xflag = true;
|
||||
}
|
||||
if (Projectile.velocity.Y < 0f && Projectile.position.Y < Projectile.ai[1])
|
||||
{
|
||||
flag16 = true;
|
||||
yflag = true;
|
||||
}
|
||||
if (Projectile.velocity.Y > 0f && Projectile.position.Y > Projectile.ai[1])
|
||||
{
|
||||
flag16 = true;
|
||||
yflag = true;
|
||||
}
|
||||
if (flag15 && flag16)
|
||||
if (xflag && yflag)
|
||||
{
|
||||
Projectile.Kill();
|
||||
}
|
||||
float num461 = 25f;
|
||||
float projTimer = 25f;
|
||||
if (Projectile.ai[0] > 180f)
|
||||
{
|
||||
num461 -= (Projectile.ai[0] - 180f) / 2f;
|
||||
projTimer -= (Projectile.ai[0] - 180f) / 2f;
|
||||
}
|
||||
if (num461 <= 0f)
|
||||
if (projTimer <= 0f)
|
||||
{
|
||||
num461 = 0f;
|
||||
projTimer = 0f;
|
||||
Projectile.Kill();
|
||||
}
|
||||
num461 *= 0.7f;
|
||||
projTimer *= 0.7f;
|
||||
Projectile.ai[0] += 4f;
|
||||
int num462 = 0;
|
||||
while ((float)num462 < num461)
|
||||
int timerCounter = 0;
|
||||
while ((float)timerCounter < projTimer)
|
||||
{
|
||||
float num463 = (float)Main.rand.Next(-10, 11);
|
||||
float num464 = (float)Main.rand.Next(-10, 11);
|
||||
float num465 = (float)Main.rand.Next(3, 9);
|
||||
float num466 = (float)Math.Sqrt((double)(num463 * num463 + num464 * num464));
|
||||
num466 = num465 / num466;
|
||||
num463 *= num466;
|
||||
num464 *= num466;
|
||||
int num467 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f);
|
||||
Main.dust[num467].noGravity = true;
|
||||
Main.dust[num467].position.X = Projectile.Center.X;
|
||||
Main.dust[num467].position.Y = Projectile.Center.Y;
|
||||
Dust expr_149DF_cp_0 = Main.dust[num467];
|
||||
float rando1 = (float)Main.rand.Next(-10, 11);
|
||||
float rando2 = (float)Main.rand.Next(-10, 11);
|
||||
float rando3 = (float)Main.rand.Next(3, 9);
|
||||
float randoAdjuster = (float)Math.Sqrt((double)(rando1 * rando1 + rando2 * rando2));
|
||||
randoAdjuster = rando3 / randoAdjuster;
|
||||
rando1 *= randoAdjuster;
|
||||
rando2 *= randoAdjuster;
|
||||
int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f);
|
||||
Main.dust[brimDust].noGravity = true;
|
||||
Main.dust[brimDust].position.X = Projectile.Center.X;
|
||||
Main.dust[brimDust].position.Y = Projectile.Center.Y;
|
||||
Dust expr_149DF_cp_0 = Main.dust[brimDust];
|
||||
expr_149DF_cp_0.position.X += (float)Main.rand.Next(-10, 11);
|
||||
Dust expr_14A09_cp_0 = Main.dust[num467];
|
||||
Dust expr_14A09_cp_0 = Main.dust[brimDust];
|
||||
expr_14A09_cp_0.position.Y += (float)Main.rand.Next(-10, 11);
|
||||
Main.dust[num467].velocity.X = num463;
|
||||
Main.dust[num467].velocity.Y = num464;
|
||||
num462++;
|
||||
Main.dust[brimDust].velocity.X = rando1;
|
||||
Main.dust[brimDust].velocity.Y = rando2;
|
||||
timerCounter++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,33 +50,33 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
if (Math.Abs(Projectile.velocity.X) >= 3f || Math.Abs(Projectile.velocity.Y) >= 3f)
|
||||
{
|
||||
float num247 = 0f;
|
||||
float num248 = 0f;
|
||||
float randDustXVel = 0f;
|
||||
float randDustYVel = 0f;
|
||||
if (Main.rand.Next(2) == 1)
|
||||
{
|
||||
num247 = Projectile.velocity.X * 0.5f;
|
||||
num248 = Projectile.velocity.Y * 0.5f;
|
||||
randDustXVel = Projectile.velocity.X * 0.5f;
|
||||
randDustYVel = Projectile.velocity.Y * 0.5f;
|
||||
}
|
||||
int num249 = Dust.NewDust(new Vector2(Projectile.position.X + 3f + num247, Projectile.position.Y + 3f + num248) - Projectile.velocity * 0.5f, Projectile.width - 8, Projectile.height - 8, 6, 0f, 0f, 100, default, 0.5f);
|
||||
Main.dust[num249].scale *= 2f + (float)Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[num249].velocity *= 0.2f;
|
||||
Main.dust[num249].noGravity = true;
|
||||
num249 = Dust.NewDust(new Vector2(Projectile.position.X + 3f + num247, Projectile.position.Y + 3f + num248) - Projectile.velocity * 0.5f, Projectile.width - 8, Projectile.height - 8, 31, 0f, 0f, 100, default, 0.25f);
|
||||
Main.dust[num249].fadeIn = 1f + (float)Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[num249].velocity *= 0.05f;
|
||||
int bombDust = Dust.NewDust(new Vector2(Projectile.position.X + 3f + randDustXVel, Projectile.position.Y + 3f + randDustYVel) - Projectile.velocity * 0.5f, Projectile.width - 8, Projectile.height - 8, 6, 0f, 0f, 100, default, 0.5f);
|
||||
Main.dust[bombDust].scale *= 2f + (float)Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[bombDust].velocity *= 0.2f;
|
||||
Main.dust[bombDust].noGravity = true;
|
||||
bombDust = Dust.NewDust(new Vector2(Projectile.position.X + 3f + randDustXVel, Projectile.position.Y + 3f + randDustYVel) - Projectile.velocity * 0.5f, Projectile.width - 8, Projectile.height - 8, 31, 0f, 0f, 100, default, 0.25f);
|
||||
Main.dust[bombDust].fadeIn = 1f + (float)Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[bombDust].velocity *= 0.05f;
|
||||
}
|
||||
else if (Main.rand.NextBool(4))
|
||||
{
|
||||
int num252 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 31, 0f, 0f, 100, default, 0.5f);
|
||||
Main.dust[num252].scale = 0.1f + (float)Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[num252].fadeIn = 1.5f + (float)Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[num252].noGravity = true;
|
||||
Main.dust[num252].position = Projectile.Center + new Vector2(0f, (float)(-(float)Projectile.height / 2)).RotatedBy((double)Projectile.rotation, default) * 1.1f;
|
||||
int smoke = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 31, 0f, 0f, 100, default, 0.5f);
|
||||
Main.dust[smoke].scale = 0.1f + (float)Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[smoke].fadeIn = 1.5f + (float)Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[smoke].noGravity = true;
|
||||
Main.dust[smoke].position = Projectile.Center + new Vector2(0f, (float)(-(float)Projectile.height / 2)).RotatedBy((double)Projectile.rotation, default) * 1.1f;
|
||||
Main.rand.Next(2);
|
||||
num252 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num252].scale = 1f + (float)Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[num252].noGravity = true;
|
||||
Main.dust[num252].position = Projectile.Center + new Vector2(0f, (float)(-(float)Projectile.height / 2 - 6)).RotatedBy((double)Projectile.rotation, default) * 1.1f;
|
||||
smoke = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[smoke].scale = 1f + (float)Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[smoke].noGravity = true;
|
||||
Main.dust[smoke].position = Projectile.Center + new Vector2(0f, (float)(-(float)Projectile.height / 2 - 6)).RotatedBy((double)Projectile.rotation, default) * 1.1f;
|
||||
}
|
||||
Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f;
|
||||
}
|
||||
@@ -100,23 +100,23 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
|
||||
Projectile.Damage();
|
||||
SoundEngine.PlaySound(SoundID.Item14, Projectile.Center);
|
||||
for (int num621 = 0; num621 < 8; num621++)
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 89, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int plagued = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 89, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[plagued].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[plagued].scale = 0.5f;
|
||||
Main.dust[plagued].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 10; num623++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 89, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 89, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int plagued2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 89, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[plagued2].noGravity = true;
|
||||
Main.dust[plagued2].velocity *= 5f;
|
||||
plagued2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 89, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[plagued2].velocity *= 2f;
|
||||
}
|
||||
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
|
||||
@@ -73,15 +73,15 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.localAI[0] == 0f)
|
||||
{
|
||||
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
|
||||
for (int num621 = 0; num621 < 10; num621++)
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
Main.dust[num622].noGravity = true;
|
||||
int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[holyDust].velocity *= 3f;
|
||||
Main.dust[holyDust].noGravity = true;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[holyDust].scale = 0.5f;
|
||||
Main.dust[holyDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
Projectile.localAI[0] = 1f;
|
||||
@@ -105,10 +105,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = (Projectile.maxPenetrate != (int)Providence.BossMode.Day) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/HolyBlastNight").Value;
|
||||
int num214 = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
int framing = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.maxPenetrate, Projectile.alpha, true), 4f, texture);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -134,19 +134,19 @@ namespace CalamityMod.Projectiles.Boss
|
||||
SoundEngine.PlaySound(ImpactSound, Projectile.Center);
|
||||
|
||||
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
|
||||
for (int num193 = 0; num193 < 4; num193++)
|
||||
for (int j = 0; j < 4; j++)
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 2f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
for (int num194 = 0; num194 < 40; num194++)
|
||||
for (int k = 0; k < 40; k++)
|
||||
{
|
||||
int num195 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 4f);
|
||||
Main.dust[num195].noGravity = true;
|
||||
Main.dust[num195].velocity *= 3f;
|
||||
num195 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 2f);
|
||||
Main.dust[num195].velocity *= 2f;
|
||||
Main.dust[num195].noGravity = true;
|
||||
int profaned = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 4f);
|
||||
Main.dust[profaned].noGravity = true;
|
||||
Main.dust[profaned].velocity *= 3f;
|
||||
profaned = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 2f);
|
||||
Main.dust[profaned].velocity *= 2f;
|
||||
Main.dust[profaned].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,19 +57,19 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
float velocityY = -2f;
|
||||
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
|
||||
for (int num193 = 0; num193 < 2; num193++)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, velocityY, 50, default, 1.5f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
for (int num194 = 0; num194 < 20; num194++)
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int num195 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, velocityY, 0, default, 2.5f);
|
||||
Main.dust[num195].noGravity = true;
|
||||
Main.dust[num195].velocity *= 2f;
|
||||
num195 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, velocityY, 50, default, 1.5f);
|
||||
Main.dust[num195].velocity *= 1.5f;
|
||||
Main.dust[num195].noGravity = true;
|
||||
int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, velocityY, 0, default, 2.5f);
|
||||
Main.dust[holyDust].noGravity = true;
|
||||
Main.dust[holyDust].velocity *= 2f;
|
||||
holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, velocityY, 50, default, 1.5f);
|
||||
Main.dust[holyDust].velocity *= 1.5f;
|
||||
Main.dust[holyDust].noGravity = true;
|
||||
}
|
||||
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
@@ -102,10 +102,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/HolyBombNight").Value;
|
||||
int num214 = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
int framing = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.maxPenetrate, Projectile.alpha, true), 4f, texture);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -119,19 +119,19 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.position.X = Projectile.position.X - (Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
|
||||
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
|
||||
for (int num193 = 0; num193 < 2; num193++)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1.5f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
for (int num194 = 0; num194 < 20; num194++)
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int num195 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 2.5f);
|
||||
Main.dust[num195].noGravity = true;
|
||||
Main.dust[num195].velocity *= 3f;
|
||||
num195 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1.5f);
|
||||
Main.dust[num195].velocity *= 2f;
|
||||
Main.dust[num195].noGravity = true;
|
||||
int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 2.5f);
|
||||
Main.dust[holyDust].noGravity = true;
|
||||
Main.dust[holyDust].velocity *= 3f;
|
||||
holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1.5f);
|
||||
Main.dust[holyDust].velocity *= 2f;
|
||||
Main.dust[holyDust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,10 +73,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/HolyFireNight").Value;
|
||||
int num214 = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
int framing = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.maxPenetrate, Projectile.alpha, true), 4f, texture);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -122,22 +122,22 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.position.X = Projectile.position.X - (Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
|
||||
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
|
||||
for (int num621 = 0; num621 < 5; num621++)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].noGravity = true;
|
||||
int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[holyDust].noGravity = true;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[holyDust].scale = 0.5f;
|
||||
Main.dust[holyDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 10; num623++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
int holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[holyDust2].noGravity = true;
|
||||
holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[holyDust2].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Math.Abs(Projectile.velocity.X) < 7f)
|
||||
Projectile.velocity.X *= 1.05f;
|
||||
|
||||
int num103 = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
int playerTracker = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
|
||||
if (Projectile.ai[1] == 0f)
|
||||
Projectile.damage = Projectile.GetProjectileDamage(ModContent.NPCType<Providence>());
|
||||
@@ -65,14 +65,14 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.ai[1] += 1f;
|
||||
if (Projectile.ai[1] < 180f && Projectile.ai[1] > 60f)
|
||||
{
|
||||
float scaleFactor2 = Projectile.velocity.Length();
|
||||
Vector2 vector11 = Main.player[num103].Center - Projectile.Center;
|
||||
vector11.Normalize();
|
||||
vector11 *= scaleFactor2;
|
||||
float projVelocityMult = Projectile.velocity.Length();
|
||||
Vector2 playerDirection = Main.player[playerTracker].Center - Projectile.Center;
|
||||
playerDirection.Normalize();
|
||||
playerDirection *= projVelocityMult;
|
||||
float inertia = (Projectile.maxPenetrate != (int)Providence.BossMode.Day) ? 20f : 25f;
|
||||
Projectile.velocity = (Projectile.velocity * (inertia - 1f) + vector11) / inertia;
|
||||
Projectile.velocity = (Projectile.velocity * (inertia - 1f) + playerDirection) / inertia;
|
||||
Projectile.velocity.Normalize();
|
||||
Projectile.velocity *= scaleFactor2;
|
||||
Projectile.velocity *= projVelocityMult;
|
||||
}
|
||||
|
||||
Projectile.rotation = Projectile.velocity.X * 0.025f;
|
||||
@@ -86,10 +86,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/HolyFire2Night").Value;
|
||||
int num214 = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
int framing = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.maxPenetrate, Projectile.alpha, true), 4f, texture);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -103,22 +103,22 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.position.X = Projectile.position.X - (Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
|
||||
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
|
||||
for (int num621 = 0; num621 < 5; num621++)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].noGravity = true;
|
||||
int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[holyDust].noGravity = true;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[holyDust].scale = 0.5f;
|
||||
Main.dust[holyDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 10; num623++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
int holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[holyDust2].noGravity = true;
|
||||
holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[holyDust2].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -90,10 +90,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = Projectile.maxPenetrate == (int)Providence.BossMode.Day ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/HolyFlareNight").Value;
|
||||
int num214 = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
int framing = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.maxPenetrate, Projectile.alpha, true), 4f, texture);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -107,22 +107,22 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.position.X = Projectile.position.X - (Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
|
||||
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
|
||||
for (int num621 = 0; num621 < 5; num621++)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].noGravity = true;
|
||||
int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[holyDust].noGravity = true;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[holyDust].scale = 0.5f;
|
||||
Main.dust[holyDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 10; num623++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
int holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[holyDust2].noGravity = true;
|
||||
holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[holyDust2].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,34 +62,32 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D value = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Color color33 = new Color(54, 209, 54, 0);
|
||||
Vector2 vector28 = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY);
|
||||
Color color34 = color33;
|
||||
Vector2 origin5 = value.Size() / 2f;
|
||||
Color color35 = color33 * 0.5f;
|
||||
float num162 = Utils.GetLerpValue(15f, 30f, Projectile.timeLeft, clamped: true) * Utils.GetLerpValue(240f, 200f, Projectile.timeLeft, clamped: true) * (1f + 0.2f * (float)Math.Cos(Main.GlobalTimeWrappedHourly % 30f / 0.5f * ((float)Math.PI * 2f) * 3f)) * 0.8f;
|
||||
Vector2 vector29 = new Vector2(0.5f, 1f) * num162;
|
||||
Vector2 vector30 = new Vector2(0.5f, 1f) * num162;
|
||||
color34 *= num162;
|
||||
color35 *= num162;
|
||||
Texture2D drawTexture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Color brightGreen = new Color(54, 209, 54, 0);
|
||||
Vector2 projDirection = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY);
|
||||
Vector2 halfTextureSize = drawTexture.Size() / 2f;
|
||||
Color halfBrightGreen = brightGreen * 0.5f;
|
||||
float timeLeftColorScale = Utils.GetLerpValue(15f, 30f, Projectile.timeLeft, clamped: true) * Utils.GetLerpValue(240f, 200f, Projectile.timeLeft, clamped: true) * (1f + 0.2f * (float)Math.Cos(Main.GlobalTimeWrappedHourly % 30f / 0.5f * ((float)Math.PI * 2f) * 3f)) * 0.8f;
|
||||
Vector2 timeLeftDrawEffect = new Vector2(0.5f, 1f) * timeLeftColorScale;
|
||||
Vector2 timeLeftDrawEffect2 = new Vector2(0.5f, 1f) * timeLeftColorScale;
|
||||
brightGreen *= timeLeftColorScale;
|
||||
halfBrightGreen *= timeLeftColorScale;
|
||||
|
||||
int num163 = 0;
|
||||
Vector2 position3 = vector28 + Projectile.velocity.SafeNormalize(Vector2.Zero) * Utils.GetLerpValue(0.5f, 1f, Projectile.localAI[0] / 60f, clamped: true) * num163;
|
||||
Vector2 position3 = projDirection + Projectile.velocity.SafeNormalize(Vector2.Zero) * Utils.GetLerpValue(0.5f, 1f, Projectile.localAI[0] / 60f, clamped: true) * 0;
|
||||
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(value, position3, null, color34, (float)Math.PI / 2f, origin5, vector29, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(value, position3, null, color34, 0f, origin5, vector30, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(value, position3, null, color35, (float)Math.PI / 2f, origin5, vector29 * 0.6f, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(value, position3, null, color35, 0f, origin5, vector30 * 0.6f, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(drawTexture, position3, null, brightGreen, (float)Math.PI / 2f, halfTextureSize, timeLeftDrawEffect, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(drawTexture, position3, null, brightGreen, 0f, halfTextureSize, timeLeftDrawEffect2, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(drawTexture, position3, null, halfBrightGreen, (float)Math.PI / 2f, halfTextureSize, timeLeftDrawEffect * 0.6f, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(drawTexture, position3, null, halfBrightGreen, 0f, halfTextureSize, timeLeftDrawEffect2 * 0.6f, spriteEffects, 0);
|
||||
|
||||
Main.EntitySpriteDraw(value, position3, null, color34, MathHelper.PiOver4, origin5, vector29 * 0.6f, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(value, position3, null, color34, MathHelper.PiOver4 * 3f, origin5, vector30 * 0.6f, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(value, position3, null, color35, MathHelper.PiOver4, origin5, vector29 * 0.36f, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(value, position3, null, color35, MathHelper.PiOver4 * 3f, origin5, vector30 * 0.36f, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(drawTexture, position3, null, brightGreen, MathHelper.PiOver4, halfTextureSize, timeLeftDrawEffect * 0.6f, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(drawTexture, position3, null, brightGreen, MathHelper.PiOver4 * 3f, halfTextureSize, timeLeftDrawEffect2 * 0.6f, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(drawTexture, position3, null, halfBrightGreen, MathHelper.PiOver4, halfTextureSize, timeLeftDrawEffect * 0.36f, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(drawTexture, position3, null, halfBrightGreen, MathHelper.PiOver4 * 3f, halfTextureSize, timeLeftDrawEffect2 * 0.36f, spriteEffects, 0);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -103,25 +101,25 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.height = 40;
|
||||
Projectile.position.X = Projectile.position.X - (Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
|
||||
for (int num621 = 0; num621 < 5; num621++)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 246, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
Main.dust[num622].noGravity = true;
|
||||
int holyYellow = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 246, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[holyYellow].velocity *= 3f;
|
||||
Main.dust[holyYellow].noGravity = true;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[holyYellow].scale = 0.5f;
|
||||
Main.dust[holyYellow].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 8; num623++)
|
||||
for (int j = 0; j < 8; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 247, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 246, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
Main.dust[num624].noGravity = true;
|
||||
int holyYellow2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 247, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[holyYellow2].noGravity = true;
|
||||
Main.dust[holyYellow2].velocity *= 5f;
|
||||
holyYellow2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 246, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[holyYellow2].velocity *= 2f;
|
||||
Main.dust[holyYellow2].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D value = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Texture2D drawTexture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
bool aimedSpear = Projectile.ai[0] > 0f;
|
||||
|
||||
int red = 255;
|
||||
@@ -180,17 +180,16 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
Color baseColor = new Color(red, green, blue, 255);
|
||||
|
||||
Color color33 = baseColor * 0.5f;
|
||||
color33.A = 0;
|
||||
Vector2 vector28 = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY);
|
||||
Color color34 = color33;
|
||||
Vector2 origin5 = value.Size() / 2f;
|
||||
Color color35 = color33 * 0.5f;
|
||||
float num162 = Utils.GetLerpValue(15f, 30f, Projectile.timeLeft, clamped: true) * Utils.GetLerpValue(240f, 200f, Projectile.timeLeft, clamped: true) * (1f + 0.2f * (float)Math.Cos(Main.GlobalTimeWrappedHourly % 30f / 0.5f * ((float)Math.PI * 2f) * 3f)) * 0.8f;
|
||||
Vector2 vector29 = new Vector2(1f, 1.5f) * num162;
|
||||
Vector2 vector30 = new Vector2(0.5f, 1f) * num162;
|
||||
color34 *= num162;
|
||||
color35 *= num162;
|
||||
Color halfBaseColor = baseColor * 0.5f;
|
||||
halfBaseColor.A = 0;
|
||||
Vector2 projDirection = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY);
|
||||
Vector2 halfTextureSize = drawTexture.Size() / 2f;
|
||||
Color halfOfHalfBaseColor = halfBaseColor * 0.5f;
|
||||
float timeLeftColorScale = Utils.GetLerpValue(15f, 30f, Projectile.timeLeft, clamped: true) * Utils.GetLerpValue(240f, 200f, Projectile.timeLeft, clamped: true) * (1f + 0.2f * (float)Math.Cos(Main.GlobalTimeWrappedHourly % 30f / 0.5f * ((float)Math.PI * 2f) * 3f)) * 0.8f;
|
||||
Vector2 timeLeftDrawEffect = new Vector2(1f, 1.5f) * timeLeftColorScale;
|
||||
Vector2 timeLeftDrawEffect2 = new Vector2(0.5f, 1f) * timeLeftColorScale;
|
||||
halfBaseColor *= timeLeftColorScale;
|
||||
halfOfHalfBaseColor *= timeLeftColorScale;
|
||||
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == -1)
|
||||
@@ -200,21 +199,21 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
for (int i = 0; i < Projectile.oldPos.Length; i++)
|
||||
{
|
||||
Vector2 drawPos = Projectile.oldPos[i] + vector28;
|
||||
Color color = Projectile.GetAlpha(color34) * ((Projectile.oldPos.Length - i) / Projectile.oldPos.Length);
|
||||
Main.spriteBatch.Draw(value, drawPos, null, color, Projectile.rotation, origin5, vector29, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(value, drawPos, null, color, Projectile.rotation, origin5, vector30, SpriteEffects.None, 0);
|
||||
Vector2 drawPos = Projectile.oldPos[i] + projDirection;
|
||||
Color baseColorAlpha = Projectile.GetAlpha(halfBaseColor) * ((Projectile.oldPos.Length - i) / Projectile.oldPos.Length);
|
||||
Main.spriteBatch.Draw(drawTexture, drawPos, null, baseColorAlpha, Projectile.rotation, halfTextureSize, timeLeftDrawEffect, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(drawTexture, drawPos, null, baseColorAlpha, Projectile.rotation, halfTextureSize, timeLeftDrawEffect2, SpriteEffects.None, 0);
|
||||
|
||||
color = Projectile.GetAlpha(color35) * ((Projectile.oldPos.Length - i) / Projectile.oldPos.Length);
|
||||
Main.spriteBatch.Draw(value, drawPos, null, color, Projectile.rotation, origin5, vector29 * 0.6f, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(value, drawPos, null, color, Projectile.rotation, origin5, vector30 * 0.6f, SpriteEffects.None, 0);
|
||||
baseColorAlpha = Projectile.GetAlpha(halfOfHalfBaseColor) * ((Projectile.oldPos.Length - i) / Projectile.oldPos.Length);
|
||||
Main.spriteBatch.Draw(drawTexture, drawPos, null, baseColorAlpha, Projectile.rotation, halfTextureSize, timeLeftDrawEffect * 0.6f, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(drawTexture, drawPos, null, baseColorAlpha, Projectile.rotation, halfTextureSize, timeLeftDrawEffect2 * 0.6f, SpriteEffects.None, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Main.EntitySpriteDraw(value, vector28, null, color34, Projectile.rotation, origin5, vector29, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(value, vector28, null, color34, Projectile.rotation, origin5, vector30, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(value, vector28, null, color35, Projectile.rotation, origin5, vector29 * 0.6f, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(value, vector28, null, color35, Projectile.rotation, origin5, vector30 * 0.6f, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(drawTexture, projDirection, null, halfBaseColor, Projectile.rotation, halfTextureSize, timeLeftDrawEffect, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(drawTexture, projDirection, null, halfBaseColor, Projectile.rotation, halfTextureSize, timeLeftDrawEffect2, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(drawTexture, projDirection, null, halfOfHalfBaseColor, Projectile.rotation, halfTextureSize, timeLeftDrawEffect * 0.6f, spriteEffects, 0);
|
||||
Main.EntitySpriteDraw(drawTexture, projDirection, null, halfOfHalfBaseColor, Projectile.rotation, halfTextureSize, timeLeftDrawEffect2 * 0.6f, spriteEffects, 0);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -66,22 +66,21 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
int num497 = 5;
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.Center);
|
||||
for (int num498 = 0; num498 < num497; num498++)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int num499 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 92, 0f, 0f, 0, default, 1f);
|
||||
int iceDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 92, 0f, 0f, 0, default, 1f);
|
||||
if (!Main.rand.NextBool(3))
|
||||
{
|
||||
Dust dust = Main.dust[num499];
|
||||
Dust dust = Main.dust[iceDust];
|
||||
dust.velocity *= 2f;
|
||||
Main.dust[num499].noGravity = true;
|
||||
dust = Main.dust[num499];
|
||||
Main.dust[iceDust].noGravity = true;
|
||||
dust = Main.dust[iceDust];
|
||||
dust.scale *= 1.75f;
|
||||
}
|
||||
else
|
||||
{
|
||||
Dust dust = Main.dust[num499];
|
||||
Dust dust = Main.dust[iceDust];
|
||||
dust.scale *= 0.5f;
|
||||
}
|
||||
}
|
||||
|
||||
+11
-11
@@ -35,23 +35,23 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.ai[0] += 1f;
|
||||
if (Projectile.ai[0] == 120f)
|
||||
{
|
||||
for (int num621 = 0; num621 < 8; num621++)
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 67, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int iceDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 67, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[iceDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[iceDust].scale = 0.5f;
|
||||
Main.dust[iceDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 14; num623++)
|
||||
for (int j = 0; j < 14; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 67, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 67, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int iceDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 67, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[iceDust2].noGravity = true;
|
||||
Main.dust[iceDust2].velocity *= 5f;
|
||||
iceDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 67, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[iceDust2].velocity *= 2f;
|
||||
}
|
||||
|
||||
Projectile.scale = 1.2f;
|
||||
|
||||
+13
-13
@@ -46,11 +46,11 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2;
|
||||
|
||||
for (int num322 = 0; num322 < 2; num322++)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int num323 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 92, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f);
|
||||
Main.dust[num323].noGravity = true;
|
||||
Dust dust = Main.dust[num323];
|
||||
int icyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 92, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f);
|
||||
Main.dust[icyDust].noGravity = true;
|
||||
Dust dust = Main.dust[icyDust];
|
||||
dust.velocity *= 0.3f;
|
||||
}
|
||||
}
|
||||
@@ -61,11 +61,11 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2;
|
||||
|
||||
for (int num322 = 0; num322 < 2; num322++)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int num323 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 92, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f);
|
||||
Main.dust[num323].noGravity = true;
|
||||
Dust dust = Main.dust[num323];
|
||||
int icyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 92, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f);
|
||||
Main.dust[icyDust].noGravity = true;
|
||||
Dust dust = Main.dust[icyDust];
|
||||
dust.velocity *= 0.3f;
|
||||
}
|
||||
}
|
||||
@@ -91,12 +91,12 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item27 with { Volume = SoundID.Item27.Volume * 0.25f }, Projectile.Center);
|
||||
for (int num373 = 0; num373 < 3; num373++)
|
||||
for (int j = 0; j < 3; j++)
|
||||
{
|
||||
int num374 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 76, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num374].noGravity = true;
|
||||
Main.dust[num374].noLight = true;
|
||||
Main.dust[num374].scale = 0.7f;
|
||||
int snowDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 76, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[snowDust].noGravity = true;
|
||||
Main.dust[snowDust].noLight = true;
|
||||
Main.dust[snowDust].scale = 0.7f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,37 +98,34 @@ namespace CalamityMod.Projectiles.Boss
|
||||
SoundEngine.PlaySound(SoundID.NPCDeath21, Projectile.Center);
|
||||
|
||||
// Emit dust
|
||||
float num50 = 1.6f;
|
||||
float num51 = 0.8f;
|
||||
float num52 = 2f;
|
||||
Vector2 value3 = (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2();
|
||||
Vector2 value4 = value3 * Projectile.velocity.Length();
|
||||
for (int num53 = 0; num53 < 10; num53++)
|
||||
Vector2 dustRotation = (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2();
|
||||
Vector2 dustVelocity = dustRotation * Projectile.velocity.Length();
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 170, 0f, 0f, 200, default, num50);
|
||||
Dust dust = Main.dust[num54];
|
||||
int ichorDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 170, 0f, 0f, 200, default, 1.6f);
|
||||
Dust dust = Main.dust[ichorDust];
|
||||
dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
dust.noGravity = true;
|
||||
dust.velocity.Y -= 2f;
|
||||
dust.velocity *= 3f;
|
||||
dust.velocity += value4 * Main.rand.NextFloat();
|
||||
num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 170, 0f, 0f, 100, default, num51);
|
||||
dust.velocity += dustVelocity * Main.rand.NextFloat();
|
||||
ichorDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 170, 0f, 0f, 100, default, 0.8f);
|
||||
dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
dust.velocity.Y -= 2f;
|
||||
dust.velocity *= 2f;
|
||||
dust.noGravity = true;
|
||||
dust.fadeIn = 1f;
|
||||
dust.velocity += value4 * Main.rand.NextFloat();
|
||||
dust.velocity += dustVelocity * Main.rand.NextFloat();
|
||||
}
|
||||
for (int num55 = 0; num55 < 5; num55++)
|
||||
for (int j = 0; j < 5; j++)
|
||||
{
|
||||
int num56 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 170, 0f, 0f, 0, default, num52);
|
||||
Dust dust = Main.dust[num56];
|
||||
int ichorDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 170, 0f, 0f, 0, default, 2f);
|
||||
Dust dust = Main.dust[ichorDust2];
|
||||
dust.position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
dust.noGravity = true;
|
||||
dust.velocity.Y -= 2f;
|
||||
dust.velocity *= 0.5f;
|
||||
dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat());
|
||||
dust.velocity += dustVelocity * (0.6f + 0.6f * Main.rand.NextFloat());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,9 +42,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2;
|
||||
|
||||
int num469 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 170, 0f, 0f, 100, default, 0.5f);
|
||||
Main.dust[num469].noGravity = true;
|
||||
Main.dust[num469].velocity *= 0f;
|
||||
int ichorDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 170, 0f, 0f, 100, default, 0.5f);
|
||||
Main.dust[ichorDust].noGravity = true;
|
||||
Main.dust[ichorDust].velocity *= 0f;
|
||||
|
||||
if (Projectile.velocity.Y < 12f)
|
||||
Projectile.velocity.Y += 0.06f;
|
||||
|
||||
@@ -107,8 +107,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.netUpdate = true;
|
||||
Vector2 center = Projectile.Center;
|
||||
center.Y -= baseHeight * Projectile.scale / 2f;
|
||||
float num618 = (scaleBase - Projectile.ai[1] + 1f) * scaleMult / scaleBase;
|
||||
center.Y -= baseHeight * num618 / 2f;
|
||||
float finalProjHeight = (scaleBase - Projectile.ai[1] + 1f) * scaleMult / scaleBase;
|
||||
center.Y -= baseHeight * finalProjHeight / 2f;
|
||||
center.Y += 2f;
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), center, Projectile.velocity, Projectile.type, Projectile.damage, Projectile.knockBack, Projectile.owner, 11f, Projectile.ai[1] - 1f);
|
||||
}
|
||||
@@ -118,14 +118,14 @@ namespace CalamityMod.Projectiles.Boss
|
||||
bool breakapart = Main.zenithWorld && Projectile.localAI[1] >= breakThreshold;
|
||||
if (Projectile.ai[0] <= 0f && !breakapart)
|
||||
{
|
||||
float num622 = 0.104719758f;
|
||||
float num623 = (float)Projectile.width / 5f;
|
||||
num623 *= 2f;
|
||||
float num624 = (float)(Math.Cos((double)(num622 * -(double)Projectile.ai[0])) - 0.5) * num623;
|
||||
Projectile.position.X -= num624 * -Projectile.direction;
|
||||
float swaySize = 0.104719758f;
|
||||
float smolWidth = (float)Projectile.width / 5f;
|
||||
smolWidth *= 2f;
|
||||
float projXChange = (float)(Math.Cos((double)(swaySize * -(double)Projectile.ai[0])) - 0.5) * smolWidth;
|
||||
Projectile.position.X -= projXChange * -Projectile.direction;
|
||||
Projectile.ai[0] -= 1f;
|
||||
num624 = (float)(Math.Cos((double)(num622 * -(double)Projectile.ai[0])) - 0.5) * num623;
|
||||
Projectile.position.X += num624 * -Projectile.direction;
|
||||
projXChange = (float)(Math.Cos((double)(swaySize * -(double)Projectile.ai[0])) - 0.5) * smolWidth;
|
||||
Projectile.position.X += projXChange * -Projectile.direction;
|
||||
}
|
||||
if (Projectile.localAI[1] == breakThreshold && Main.zenithWorld)
|
||||
{
|
||||
@@ -149,9 +149,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture2D13 = ModContent.Request<Texture2D>(Texture).Value;
|
||||
int num214 = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
int framing = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,8 +105,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.netUpdate = true;
|
||||
Vector2 center = Projectile.Center;
|
||||
center.Y -= baseHeight * Projectile.scale / 2f;
|
||||
float num618 = (scaleBase - Projectile.ai[1] + 1f) * scaleMult / scaleBase;
|
||||
center.Y -= baseHeight * num618 / 2f;
|
||||
float finalProjHeight = (scaleBase - Projectile.ai[1] + 1f) * scaleMult / scaleBase;
|
||||
center.Y -= baseHeight * finalProjHeight / 2f;
|
||||
center.Y += 2f;
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), center, Projectile.velocity, Projectile.type, Projectile.damage, Projectile.knockBack, Projectile.owner, 11f, Projectile.ai[1] - 1f);
|
||||
}
|
||||
@@ -115,14 +115,14 @@ namespace CalamityMod.Projectiles.Boss
|
||||
bool breakapart = Main.zenithWorld && Projectile.ai[0] <= breakThreshold;
|
||||
if (Projectile.ai[0] <= 0f && !breakapart)
|
||||
{
|
||||
float num622 = 0.104719758f;
|
||||
float num623 = (float)Projectile.width / 5f;
|
||||
num623 *= 2f;
|
||||
float num624 = (float)(Math.Cos((double)(num622 * -(double)Projectile.ai[0])) - 0.5) * num623;
|
||||
Projectile.position.X -= num624 * -Projectile.direction;
|
||||
float swaySize = 0.104719758f;
|
||||
float smolWidth = (float)Projectile.width / 5f;
|
||||
smolWidth *= 2f;
|
||||
float projXChange = (float)(Math.Cos((double)(swaySize * -(double)Projectile.ai[0])) - 0.5) * smolWidth;
|
||||
Projectile.position.X -= projXChange * -Projectile.direction;
|
||||
Projectile.ai[0] -= 1f;
|
||||
num624 = (float)(Math.Cos((double)(num622 * -(double)Projectile.ai[0])) - 0.5) * num623;
|
||||
Projectile.position.X += num624 * -Projectile.direction;
|
||||
projXChange = (float)(Math.Cos((double)(swaySize * -(double)Projectile.ai[0])) - 0.5) * smolWidth;
|
||||
Projectile.position.X += projXChange * -Projectile.direction;
|
||||
}
|
||||
if (Projectile.ai[0] == breakThreshold && Main.zenithWorld)
|
||||
{
|
||||
@@ -143,9 +143,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture2D13 = ModContent.Request<Texture2D>(Texture).Value;
|
||||
int num214 = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
int framing = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,23 +71,23 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item14, Projectile.Center);
|
||||
for (int num621 = 0; num621 < 10; num621++)
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 244, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int meteorDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 244, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[meteorDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[meteorDust].scale = 0.5f;
|
||||
Main.dust[meteorDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 15; num623++)
|
||||
for (int j = 0; j < 15; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 244, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 244, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int meteorDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 244, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[meteorDust2].noGravity = true;
|
||||
Main.dust[meteorDust2].velocity *= 5f;
|
||||
meteorDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 244, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[meteorDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,13 +75,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
for (int d = 0; d < 10; d++)
|
||||
{
|
||||
int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
Main.dust[num622].noGravity = true;
|
||||
int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[holyDust].velocity *= 3f;
|
||||
Main.dust[holyDust].noGravity = true;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[holyDust].scale = 0.5f;
|
||||
Main.dust[holyDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
Projectile.localAI[1] = 1f;
|
||||
@@ -94,15 +94,15 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.localAI[0] = 0f;
|
||||
for (int l = 0; l < 12; l++)
|
||||
{
|
||||
Vector2 vector3 = Vector2.UnitX * -Projectile.width / 2f;
|
||||
vector3 += -Vector2.UnitY.RotatedBy(l * 3.14159274f / 6f, default) * new Vector2(8f, 16f);
|
||||
vector3 = vector3.RotatedBy(Projectile.rotation - 1.57079637f, default);
|
||||
int num9 = Dust.NewDust(Projectile.Center, 0, 0, dustType, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[num9].scale = 1.1f;
|
||||
Main.dust[num9].noGravity = true;
|
||||
Main.dust[num9].position = Projectile.Center + vector3;
|
||||
Main.dust[num9].velocity = Projectile.velocity * 0.1f;
|
||||
Main.dust[num9].velocity = Vector2.Normalize(Projectile.Center - Projectile.velocity * 3f - Main.dust[num9].position) * 1.25f;
|
||||
Vector2 dustRotate = Vector2.UnitX * -Projectile.width / 2f;
|
||||
dustRotate += -Vector2.UnitY.RotatedBy(l * 3.14159274f / 6f, default) * new Vector2(8f, 16f);
|
||||
dustRotate = dustRotate.RotatedBy(Projectile.rotation - 1.57079637f, default);
|
||||
int profaned = Dust.NewDust(Projectile.Center, 0, 0, dustType, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[profaned].scale = 1.1f;
|
||||
Main.dust[profaned].noGravity = true;
|
||||
Main.dust[profaned].position = Projectile.Center + dustRotate;
|
||||
Main.dust[profaned].velocity = Projectile.velocity * 0.1f;
|
||||
Main.dust[profaned].velocity = Vector2.Normalize(Projectile.Center - Projectile.velocity * 3f - Main.dust[profaned].position) * 1.25f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,10 +117,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/MoltenBlastNight").Value;
|
||||
int num214 = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
int framing = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.maxPenetrate, Projectile.alpha, true), 4f, texture);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -141,19 +141,19 @@ namespace CalamityMod.Projectiles.Boss
|
||||
SoundEngine.PlaySound(SoundID.Item74, Projectile.Center);
|
||||
|
||||
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
|
||||
for (int num193 = 0; num193 < 4; num193++)
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1.5f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
for (int num194 = 0; num194 < 40; num194++)
|
||||
for (int j = 0; j < 40; j++)
|
||||
{
|
||||
int num195 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 2.5f);
|
||||
Main.dust[num195].noGravity = true;
|
||||
Main.dust[num195].velocity *= 3f;
|
||||
num195 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1.5f);
|
||||
Main.dust[num195].velocity *= 2f;
|
||||
Main.dust[num195].noGravity = true;
|
||||
int killHolyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 2.5f);
|
||||
Main.dust[killHolyDust].noGravity = true;
|
||||
Main.dust[killHolyDust].velocity *= 3f;
|
||||
killHolyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1.5f);
|
||||
Main.dust[killHolyDust].velocity *= 2f;
|
||||
Main.dust[killHolyDust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -86,10 +86,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/MoltenBlobNight").Value;
|
||||
int num214 = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
int framing = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.maxPenetrate, Projectile.alpha, true), 4f, texture);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -103,22 +103,22 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.position.X = Projectile.position.X - (Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
|
||||
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
|
||||
for (int num621 = 0; num621 < 3; num621++)
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].noGravity = true;
|
||||
int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[holyDust].noGravity = true;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[holyDust].scale = 0.5f;
|
||||
Main.dust[holyDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 5; num623++)
|
||||
for (int j = 0; j < 5; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
int holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[holyDust2].noGravity = true;
|
||||
holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[holyDust2].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -111,21 +111,21 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.height = 20;
|
||||
Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
|
||||
for (int num621 = 0; num621 < 4; num621++)
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 56, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 1.5f;
|
||||
int shroomDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 56, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[shroomDust].velocity *= 1.5f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[shroomDust].scale = 0.5f;
|
||||
Main.dust[shroomDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 12; num623++)
|
||||
for (int j = 0; j < 12; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 56, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int shroomDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 56, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[shroomDust2].noGravity = true;
|
||||
Main.dust[shroomDust2].velocity *= 2f;
|
||||
Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 56, 0f, 0f, 100, default, 2f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,21 +119,21 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.height = 20;
|
||||
Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
|
||||
for (int num621 = 0; num621 < 4; num621++)
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 56, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 1.5f;
|
||||
int shroomDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 56, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[shroomDust].velocity *= 1.5f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[shroomDust].scale = 0.5f;
|
||||
Main.dust[shroomDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 12; num623++)
|
||||
for (int j = 0; j < 12; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 56, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int shroomDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 56, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[shroomDust2].noGravity = true;
|
||||
Main.dust[shroomDust2].velocity *= 2f;
|
||||
Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 56, 0f, 0f, 100, default, 2f);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,13 +61,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.NPCDeath12, Projectile.Center);
|
||||
|
||||
int num226 = 8;
|
||||
for (int num227 = 0; num227 < num226; num227++)
|
||||
int dustAmt = 8;
|
||||
for (int i = 0; i < dustAmt; i++)
|
||||
{
|
||||
Vector2 source = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
source = source.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + Projectile.Center;
|
||||
Vector2 dustVel = source - Projectile.Center;
|
||||
int blood = Dust.NewDust(source + dustVel, 0, 0, DustID.Blood, dustVel.X, dustVel.Y, 100, default, 1.2f);
|
||||
Vector2 dustRotation = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
dustRotation = dustRotation.RotatedBy((double)((float)(i - (dustAmt / 2 - 1)) * 6.28318548f / (float)dustAmt), default) + Projectile.Center;
|
||||
Vector2 dustVel = dustRotation - Projectile.Center;
|
||||
int blood = Dust.NewDust(dustRotation + dustVel, 0, 0, DustID.Blood, dustVel.X, dustVel.Y, 100, default, 1.2f);
|
||||
Main.dust[blood].noGravity = true;
|
||||
Main.dust[blood].noLight = true;
|
||||
Main.dust[blood].velocity = dustVel;
|
||||
|
||||
@@ -64,15 +64,15 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.localAI[1] = 0f;
|
||||
for (int l = 0; l < 12; l++)
|
||||
{
|
||||
Vector2 vector3 = Vector2.UnitX * -Projectile.width / 2f;
|
||||
vector3 += -Vector2.UnitY.RotatedBy(l * MathHelper.Pi / 6f) * new Vector2(8f, 16f);
|
||||
vector3 = vector3.RotatedBy(Projectile.rotation - MathHelper.PiOver2);
|
||||
int num9 = Dust.NewDust(Projectile.Center, 0, 0, 180, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[num9].scale = 1.1f;
|
||||
Main.dust[num9].noGravity = true;
|
||||
Main.dust[num9].position = Projectile.Center + vector3;
|
||||
Main.dust[num9].velocity = Projectile.velocity * 0.1f;
|
||||
Main.dust[num9].velocity = Vector2.Normalize(Projectile.Center - Projectile.velocity * 3f - Main.dust[num9].position) * 1.25f;
|
||||
Vector2 dustRotation = Vector2.UnitX * -Projectile.width / 2f;
|
||||
dustRotation += -Vector2.UnitY.RotatedBy(l * MathHelper.Pi / 6f) * new Vector2(8f, 16f);
|
||||
dustRotation = dustRotation.RotatedBy(Projectile.rotation - MathHelper.PiOver2);
|
||||
int phantomDust = Dust.NewDust(Projectile.Center, 0, 0, 180, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[phantomDust].scale = 1.1f;
|
||||
Main.dust[phantomDust].noGravity = true;
|
||||
Main.dust[phantomDust].position = Projectile.Center + dustRotation;
|
||||
Main.dust[phantomDust].velocity = Projectile.velocity * 0.1f;
|
||||
Main.dust[phantomDust].velocity = Vector2.Normalize(Projectile.Center - Projectile.velocity * 3f - Main.dust[phantomDust].position) * 1.25f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,24 +91,24 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.height = 50;
|
||||
Projectile.position.X = Projectile.position.X - (Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
|
||||
for (int num621 = 0; num621 < 3; num621++)
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 180, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
Main.dust[num622].noGravity = true;
|
||||
int killGhostDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 180, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[killGhostDust].velocity *= 3f;
|
||||
Main.dust[killGhostDust].noGravity = true;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[killGhostDust].scale = 0.5f;
|
||||
Main.dust[killGhostDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 5; num623++)
|
||||
for (int j = 0; j < 5; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 180, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 180, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int killGhostDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 180, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[killGhostDust2].noGravity = true;
|
||||
Main.dust[killGhostDust2].velocity *= 5f;
|
||||
killGhostDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 180, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[killGhostDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,15 +64,15 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.localAI[1] = 0f;
|
||||
for (int l = 0; l < 12; l++)
|
||||
{
|
||||
Vector2 vector3 = Vector2.UnitX * -Projectile.width / 2f;
|
||||
vector3 += -Vector2.UnitY.RotatedBy(l * MathHelper.Pi / 6f) * new Vector2(8f, 16f);
|
||||
vector3 = vector3.RotatedBy(Projectile.rotation - MathHelper.PiOver2);
|
||||
int num9 = Dust.NewDust(Projectile.Center, 0, 0, 60, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[num9].scale = 1.1f;
|
||||
Main.dust[num9].noGravity = true;
|
||||
Main.dust[num9].position = Projectile.Center + vector3;
|
||||
Main.dust[num9].velocity = Projectile.velocity * 0.1f;
|
||||
Main.dust[num9].velocity = Vector2.Normalize(Projectile.Center - Projectile.velocity * 3f - Main.dust[num9].position) * 1.25f;
|
||||
Vector2 dustRotation = Vector2.UnitX * -Projectile.width / 2f;
|
||||
dustRotation += -Vector2.UnitY.RotatedBy(l * MathHelper.Pi / 6f) * new Vector2(8f, 16f);
|
||||
dustRotation = dustRotation.RotatedBy(Projectile.rotation - MathHelper.PiOver2);
|
||||
int phantomDust = Dust.NewDust(Projectile.Center, 0, 0, 60, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[phantomDust].scale = 1.1f;
|
||||
Main.dust[phantomDust].noGravity = true;
|
||||
Main.dust[phantomDust].position = Projectile.Center + dustRotation;
|
||||
Main.dust[phantomDust].velocity = Projectile.velocity * 0.1f;
|
||||
Main.dust[phantomDust].velocity = Vector2.Normalize(Projectile.Center - Projectile.velocity * 3f - Main.dust[phantomDust].position) * 1.25f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,24 +91,24 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.height = 50;
|
||||
Projectile.position.X = Projectile.position.X - (Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
|
||||
for (int num621 = 0; num621 < 3; num621++)
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
Main.dust[num622].noGravity = true;
|
||||
int killGhostDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[killGhostDust].velocity *= 3f;
|
||||
Main.dust[killGhostDust].noGravity = true;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[killGhostDust].scale = 0.5f;
|
||||
Main.dust[killGhostDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 5; num623++)
|
||||
for (int j = 0; j < 5; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int killGhostDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[killGhostDust2].noGravity = true;
|
||||
Main.dust[killGhostDust2].velocity *= 5f;
|
||||
killGhostDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[killGhostDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,13 +48,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.localAI[0] += 1f;
|
||||
if (Projectile.localAI[0] == 6f)
|
||||
{
|
||||
for (int num151 = 0; num151 < 40; num151++)
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int num152 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num152].velocity *= 3f;
|
||||
Main.dust[num152].velocity += Projectile.velocity * 0.75f;
|
||||
Main.dust[num152].scale *= 1.2f;
|
||||
Main.dust[num152].noGravity = true;
|
||||
int redDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[redDust].velocity *= 3f;
|
||||
Main.dust[redDust].velocity += Projectile.velocity * 0.75f;
|
||||
Main.dust[redDust].scale *= 1.2f;
|
||||
Main.dust[redDust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,13 +48,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.localAI[0] += 1f;
|
||||
if (Projectile.localAI[0] == 6f)
|
||||
{
|
||||
for (int num151 = 0; num151 < 40; num151++)
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int num152 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 180, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num152].velocity *= 3f;
|
||||
Main.dust[num152].velocity += Projectile.velocity * 0.75f;
|
||||
Main.dust[num152].scale *= 1.2f;
|
||||
Main.dust[num152].noGravity = true;
|
||||
int redDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 180, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[redDust].velocity *= 3f;
|
||||
Main.dust[redDust].velocity += Projectile.velocity * 0.75f;
|
||||
Main.dust[redDust].scale *= 1.2f;
|
||||
Main.dust[redDust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,23 +79,23 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.height = 150;
|
||||
Projectile.position.X = Projectile.position.X - (Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
|
||||
for (int num621 = 0; num621 < 15; num621++)
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 180, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int phantomDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 180, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[phantomDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[phantomDust].scale = 0.5f;
|
||||
Main.dust[phantomDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 30; num623++)
|
||||
for (int j = 0; j < 30; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 180, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int phantomDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 180, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[phantomDust2].noGravity = true;
|
||||
Main.dust[phantomDust2].velocity *= 5f;
|
||||
phantomDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[phantomDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,12 +55,11 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.ai[0] == 0f)
|
||||
Projectile.ai[0] = Projectile.velocity.Length() * 3f;
|
||||
|
||||
int num189 = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
Vector2 vector20 = Main.player[num189].Center - Projectile.Center;
|
||||
vector20.Normalize();
|
||||
vector20 *= Projectile.ai[0];
|
||||
int num190 = 80;
|
||||
Projectile.velocity = (Projectile.velocity * (num190 - 1) + vector20) / num190;
|
||||
int playerTracker = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
Vector2 playerDirection = Main.player[playerTracker].Center - Projectile.Center;
|
||||
playerDirection.Normalize();
|
||||
playerDirection *= Projectile.ai[0];
|
||||
Projectile.velocity = (Projectile.velocity * 79 + playerDirection) / 80;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,12 +55,11 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.ai[0] == 0f)
|
||||
Projectile.ai[0] = Projectile.velocity.Length() * 2f;
|
||||
|
||||
int num189 = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
Vector2 vector20 = Main.player[num189].Center - Projectile.Center;
|
||||
vector20.Normalize();
|
||||
vector20 *= Projectile.ai[0];
|
||||
int num190 = 80;
|
||||
Projectile.velocity = (Projectile.velocity * (num190 - 1) + vector20) / num190;
|
||||
int playerTracker = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
Vector2 playerDirection = Main.player[playerTracker].Center - Projectile.Center;
|
||||
playerDirection.Normalize();
|
||||
playerDirection *= Projectile.ai[0];
|
||||
Projectile.velocity = (Projectile.velocity * 79 + playerDirection) / 80;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,39 +23,39 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
Lighting.AddLight(Projectile.Center, 0f, 0.15f, 0f);
|
||||
|
||||
float num461 = 25f;
|
||||
float projTimer = 25f;
|
||||
if (Projectile.ai[0] > 180f)
|
||||
{
|
||||
num461 -= (Projectile.ai[0] - 180f) / 2f;
|
||||
projTimer -= (Projectile.ai[0] - 180f) / 2f;
|
||||
}
|
||||
if (num461 <= 0f)
|
||||
if (projTimer <= 0f)
|
||||
{
|
||||
num461 = 0f;
|
||||
projTimer = 0f;
|
||||
Projectile.Kill();
|
||||
}
|
||||
num461 *= 0.7f;
|
||||
projTimer *= 0.7f;
|
||||
|
||||
Projectile.ai[0] += 4f;
|
||||
int num462 = 0;
|
||||
while (num462 < num461)
|
||||
int timerCounter = 0;
|
||||
while (timerCounter < projTimer)
|
||||
{
|
||||
float num463 = Main.rand.Next(-7, 8) * Projectile.scale;
|
||||
float num464 = Main.rand.Next(-7, 8) * Projectile.scale;
|
||||
float num465 = Main.rand.Next(2, 6) * Projectile.scale;
|
||||
float num466 = (float)Math.Sqrt(num463 * num463 + num464 * num464);
|
||||
num466 = num465 / num466;
|
||||
num463 *= num466;
|
||||
num464 *= num466;
|
||||
int num467 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 89, 0f, 0f, 100, default);
|
||||
Main.dust[num467].noGravity = true;
|
||||
Main.dust[num467].position.X = Projectile.Center.X;
|
||||
Main.dust[num467].position.Y = Projectile.Center.Y;
|
||||
Main.dust[num467].position.X += Main.rand.Next(-10, 11);
|
||||
Main.dust[num467].position.Y += Main.rand.Next(-10, 11);
|
||||
Main.dust[num467].velocity.X = num463;
|
||||
Main.dust[num467].velocity.Y = num464;
|
||||
Main.dust[num467].scale = Projectile.scale * 0.35f;
|
||||
num462++;
|
||||
float rando1 = Main.rand.Next(-7, 8) * Projectile.scale;
|
||||
float rando2 = Main.rand.Next(-7, 8) * Projectile.scale;
|
||||
float rando3 = Main.rand.Next(2, 6) * Projectile.scale;
|
||||
float randoAdjuster = (float)Math.Sqrt(rando1 * rando1 + rando2 * rando2);
|
||||
randoAdjuster = rando3 / randoAdjuster;
|
||||
rando1 *= randoAdjuster;
|
||||
rando2 *= randoAdjuster;
|
||||
int greenPlague = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 89, 0f, 0f, 100, default);
|
||||
Main.dust[greenPlague].noGravity = true;
|
||||
Main.dust[greenPlague].position.X = Projectile.Center.X;
|
||||
Main.dust[greenPlague].position.Y = Projectile.Center.Y;
|
||||
Main.dust[greenPlague].position.X += Main.rand.Next(-10, 11);
|
||||
Main.dust[greenPlague].position.Y += Main.rand.Next(-10, 11);
|
||||
Main.dust[greenPlague].velocity.X = rando1;
|
||||
Main.dust[greenPlague].velocity.Y = rando2;
|
||||
Main.dust[greenPlague].scale = Projectile.scale * 0.35f;
|
||||
timerCounter++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,17 +27,17 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2;
|
||||
|
||||
int num123 = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
int playerTracker = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
Projectile.localAI[0] += 1f;
|
||||
if (Projectile.localAI[0] < (60f + Projectile.ai[0] * 0.5f) && Projectile.localAI[0] > 30f)
|
||||
{
|
||||
float scaleFactor2 = Projectile.velocity.Length();
|
||||
Vector2 vector17 = Main.player[num123].Center - Projectile.Center;
|
||||
vector17.Normalize();
|
||||
vector17 *= scaleFactor2;
|
||||
Projectile.velocity = (Projectile.velocity * 24f + vector17) / 25f;
|
||||
float projVelocity = Projectile.velocity.Length();
|
||||
Vector2 playerDirection = Main.player[playerTracker].Center - Projectile.Center;
|
||||
playerDirection.Normalize();
|
||||
playerDirection *= projVelocity;
|
||||
Projectile.velocity = (Projectile.velocity * 24f + playerDirection) / 25f;
|
||||
Projectile.velocity.Normalize();
|
||||
Projectile.velocity *= scaleFactor2;
|
||||
Projectile.velocity *= projVelocity;
|
||||
}
|
||||
|
||||
if (Projectile.velocity.Length() < (16f + Projectile.ai[0] * 0.04f))
|
||||
@@ -55,13 +55,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override void PostDraw(Color lightColor)
|
||||
{
|
||||
Vector2 center = new Vector2(Projectile.Center.X, Projectile.Center.Y);
|
||||
Vector2 vector11 = new Vector2(ModContent.Request<Texture2D>(Texture).Value.Width / 2, ModContent.Request<Texture2D>(Texture).Value.Height / 2);
|
||||
Vector2 vector = center - Main.screenPosition;
|
||||
vector -= new Vector2(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value.Width, ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value.Height) * 1f / 2f;
|
||||
vector += vector11 * 1f + new Vector2(0f, 4f + Projectile.gfxOffY);
|
||||
Color color = Color.White;
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value, vector,
|
||||
null, color, Projectile.rotation, vector11, Projectile.scale, SpriteEffects.None, 0);
|
||||
Vector2 textureArea = new Vector2(ModContent.Request<Texture2D>(Texture).Value.Width / 2, ModContent.Request<Texture2D>(Texture).Value.Height / 2);
|
||||
Vector2 drawArea = center - Main.screenPosition;
|
||||
drawArea -= new Vector2(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value.Width, ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value.Height) * 1f / 2f;
|
||||
drawArea += textureArea * 1f + new Vector2(0f, 4f + Projectile.gfxOffY);
|
||||
Color whiteColor = Color.White;
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value, drawArea,
|
||||
null, whiteColor, Projectile.rotation, textureArea, Projectile.scale, SpriteEffects.None, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,12 +74,12 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Color BaseColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0);
|
||||
float Brightness = 0.8f;
|
||||
Color DustColor = Color.Lerp(BaseColor, Color.White, Brightness);
|
||||
Dust dust34 = Main.dust[Dust.NewDust(Projectile.Top, 0, 0, 267, 0f, 0f, 100, DustColor, 1f)];
|
||||
dust34.velocity.X = 0f;
|
||||
dust34.noGravity = true;
|
||||
dust34.fadeIn = 1f;
|
||||
dust34.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.TwoPi) * (4f * Main.rand.NextFloat() + 26f);
|
||||
dust34.scale = 0.5f;
|
||||
Dust crystalDust = Main.dust[Dust.NewDust(Projectile.Top, 0, 0, 267, 0f, 0f, 100, DustColor, 1f)];
|
||||
crystalDust.velocity.X = 0f;
|
||||
crystalDust.noGravity = true;
|
||||
crystalDust.fadeIn = 1f;
|
||||
crystalDust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.TwoPi) * (4f * Main.rand.NextFloat() + 26f);
|
||||
crystalDust.scale = 0.5f;
|
||||
}
|
||||
|
||||
float lifeRatio = Projectile.ai[0];
|
||||
@@ -126,18 +126,18 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Color color25 = Lighting.GetColor((int)(Projectile.position.X + Projectile.width * 0.5) / 16, (int)((Projectile.position.Y + Projectile.height * 0.5) / 16.0));
|
||||
Vector2 vector59 = Projectile.position + new Vector2(Projectile.width, Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition;
|
||||
Color colorArea = Lighting.GetColor((int)(Projectile.position.X + Projectile.width * 0.5) / 16, (int)((Projectile.position.Y + Projectile.height * 0.5) / 16.0));
|
||||
Vector2 drawArea = Projectile.position + new Vector2(Projectile.width, Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition;
|
||||
Texture2D texture2D34 = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Rectangle rectangle17 = texture2D34.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame);
|
||||
Color alpha5 = Projectile.GetAlpha(color25);
|
||||
Vector2 origin11 = rectangle17.Size() / 2f;
|
||||
float scaleFactor5 = (float)Math.Cos(MathHelper.TwoPi * (Projectile.localAI[0] / 60f)) + 3f + 3f;
|
||||
for (float num286 = 0f; num286 < 4f; num286 += 1f)
|
||||
Rectangle textureRect = texture2D34.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame);
|
||||
Color colorAlpha = Projectile.GetAlpha(colorArea);
|
||||
Vector2 halfRect = textureRect.Size() / 2f;
|
||||
float scaleFactor = (float)Math.Cos(MathHelper.TwoPi * (Projectile.localAI[0] / 60f)) + 3f + 3f;
|
||||
for (float i = 0f; i < 4f; i += 1f)
|
||||
{
|
||||
double angle = num286 * MathHelper.PiOver2;
|
||||
double angle = i * MathHelper.PiOver2;
|
||||
Vector2 center = default;
|
||||
Main.spriteBatch.Draw(texture2D34, vector59 + Vector2.UnitY.RotatedBy(angle, center) * scaleFactor5, new Microsoft.Xna.Framework.Rectangle?(rectangle17), alpha5 * 0.2f, Projectile.rotation, origin11, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(texture2D34, drawArea + Vector2.UnitY.RotatedBy(angle, center) * scaleFactor, new Microsoft.Xna.Framework.Rectangle?(textureRect), colorAlpha * 0.2f, Projectile.rotation, halfRect, Projectile.scale, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -96,71 +96,71 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) - MathHelper.PiOver2;
|
||||
|
||||
for (int num979 = 0; num979 < 2; num979++)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
if (Main.rand.NextBool(10))
|
||||
{
|
||||
Vector2 value55 = Vector2.UnitY.RotatedBy(num979 * MathHelper.Pi).RotatedBy(Projectile.rotation);
|
||||
Dust dust24 = Main.dust[Dust.NewDust(Projectile.Center, 0, 0, 267, 0f, 0f, 225, newColor2, 1.5f)];
|
||||
dust24.noGravity = true;
|
||||
dust24.noLight = true;
|
||||
dust24.scale = Projectile.Opacity * Projectile.localAI[0];
|
||||
dust24.position = Projectile.Center;
|
||||
dust24.velocity = value55;
|
||||
Vector2 dustRotation = Vector2.UnitY.RotatedBy(i * MathHelper.Pi).RotatedBy(Projectile.rotation);
|
||||
Dust crystalDust = Main.dust[Dust.NewDust(Projectile.Center, 0, 0, 267, 0f, 0f, 225, newColor2, 1.5f)];
|
||||
crystalDust.noGravity = true;
|
||||
crystalDust.noLight = true;
|
||||
crystalDust.scale = Projectile.Opacity * Projectile.localAI[0];
|
||||
crystalDust.position = Projectile.Center;
|
||||
crystalDust.velocity = dustRotation;
|
||||
}
|
||||
}
|
||||
|
||||
for (int num980 = 0; num980 < 2; num980++)
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
if (Main.rand.NextBool(10))
|
||||
{
|
||||
Vector2 value56 = Vector2.UnitY.RotatedBy(num980 * MathHelper.Pi);
|
||||
Dust dust25 = Main.dust[Dust.NewDust(Projectile.Center, 0, 0, 267, 0f, 0f, 225, newColor2, 1.5f)];
|
||||
dust25.noGravity = true;
|
||||
dust25.noLight = true;
|
||||
dust25.scale = Projectile.Opacity * Projectile.localAI[0];
|
||||
dust25.position = Projectile.Center;
|
||||
dust25.velocity = value56;
|
||||
Vector2 dustRotate = Vector2.UnitY.RotatedBy(j * MathHelper.Pi);
|
||||
Dust crystalDust2 = Main.dust[Dust.NewDust(Projectile.Center, 0, 0, 267, 0f, 0f, 225, newColor2, 1.5f)];
|
||||
crystalDust2.noGravity = true;
|
||||
crystalDust2.noLight = true;
|
||||
crystalDust2.scale = Projectile.Opacity * Projectile.localAI[0];
|
||||
crystalDust2.position = Projectile.Center;
|
||||
crystalDust2.velocity = dustRotate;
|
||||
}
|
||||
}
|
||||
|
||||
if (Main.rand.NextBool(10))
|
||||
{
|
||||
float scaleFactor13 = 1f + Main.rand.NextFloat() * 2f;
|
||||
float dustVelScale = 1f + Main.rand.NextFloat() * 2f;
|
||||
float fadeIn = 1f + Main.rand.NextFloat();
|
||||
float num981 = 1f + Main.rand.NextFloat();
|
||||
Vector2 vector136 = Utils.RandomVector2(Main.rand, -1f, 1f);
|
||||
if (vector136 != Vector2.Zero)
|
||||
float dustScale = 1f + Main.rand.NextFloat();
|
||||
Vector2 randomDustOffset = Utils.RandomVector2(Main.rand, -1f, 1f);
|
||||
if (randomDustOffset != Vector2.Zero)
|
||||
{
|
||||
vector136.Normalize();
|
||||
randomDustOffset.Normalize();
|
||||
}
|
||||
vector136 *= 16f + Main.rand.NextFloat() * 16f;
|
||||
Vector2 vector137 = Projectile.Center + vector136;
|
||||
Point point3 = vector137.ToTileCoordinates();
|
||||
bool flag52 = true;
|
||||
if (!WorldGen.InWorld(point3.X, point3.Y, 0))
|
||||
randomDustOffset *= 16f + Main.rand.NextFloat() * 16f;
|
||||
Vector2 dustPos = Projectile.Center + randomDustOffset;
|
||||
Point dustTileCoords = dustPos.ToTileCoordinates();
|
||||
bool shouldSpawn = true;
|
||||
if (!WorldGen.InWorld(dustTileCoords.X, dustTileCoords.Y, 0))
|
||||
{
|
||||
flag52 = false;
|
||||
shouldSpawn = false;
|
||||
}
|
||||
if (flag52 && WorldGen.SolidTile(point3.X, point3.Y))
|
||||
if (shouldSpawn && WorldGen.SolidTile(dustTileCoords.X, dustTileCoords.Y))
|
||||
{
|
||||
flag52 = false;
|
||||
shouldSpawn = false;
|
||||
}
|
||||
if (flag52)
|
||||
if (shouldSpawn)
|
||||
{
|
||||
Dust dust26 = Main.dust[Dust.NewDust(vector137, 0, 0, 267, 0f, 0f, 127, newColor2, 1f)];
|
||||
dust26.noGravity = true;
|
||||
dust26.position = vector137;
|
||||
dust26.velocity = -Vector2.UnitY * scaleFactor13 * (Main.rand.NextFloat() * 0.9f + 1.6f);
|
||||
dust26.fadeIn = fadeIn;
|
||||
dust26.scale = num981;
|
||||
dust26.noLight = true;
|
||||
Dust dust27 = Dust.CloneDust(dust26);
|
||||
Dust dust = dust27;
|
||||
Dust holyDust = Main.dust[Dust.NewDust(dustPos, 0, 0, 267, 0f, 0f, 127, newColor2, 1f)];
|
||||
holyDust.noGravity = true;
|
||||
holyDust.position = dustPos;
|
||||
holyDust.velocity = -Vector2.UnitY * dustVelScale * (Main.rand.NextFloat() * 0.9f + 1.6f);
|
||||
holyDust.fadeIn = fadeIn;
|
||||
holyDust.scale = dustScale;
|
||||
holyDust.noLight = true;
|
||||
Dust holyDust2 = Dust.CloneDust(holyDust);
|
||||
Dust dust = holyDust2;
|
||||
dust.scale *= 0.65f;
|
||||
dust = dust27;
|
||||
dust = holyDust2;
|
||||
dust.fadeIn *= 0.65f;
|
||||
dust27.color = new Color(255, 255, 255, 255);
|
||||
holyDust2.color = new Color(255, 255, 255, 255);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -169,41 +169,41 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.Center);
|
||||
Vector2 spinningpoint = new Vector2(0f, -3f).RotatedByRandom(MathHelper.Pi);
|
||||
float num69 = Main.rand.Next(7, 13);
|
||||
Vector2 value5 = new Vector2(1.6f, 1.5f);
|
||||
float dustAmt = Main.rand.Next(7, 13);
|
||||
Vector2 randomDustVelMod = new Vector2(1.6f, 1.5f);
|
||||
Color newColor = Main.hslToRgb(Projectile.ai[0], 1f, 0.5f);
|
||||
newColor.A = 255;
|
||||
for (float num70 = 0f; num70 < num69; num70++)
|
||||
for (float i = 0f; i < dustAmt; i++)
|
||||
{
|
||||
int num71 = Dust.NewDust(Projectile.Center, 0, 0, 267, 0f, 0f, 0, newColor, 1f);
|
||||
Main.dust[num71].position = Projectile.Center;
|
||||
Main.dust[num71].velocity = spinningpoint.RotatedBy(MathHelper.TwoPi * num70 / num69) * value5 * (0.8f + Main.rand.NextFloat() * 0.4f);
|
||||
Main.dust[num71].noGravity = true;
|
||||
Main.dust[num71].scale = 2f;
|
||||
Main.dust[num71].fadeIn = Main.rand.NextFloat() * 2f;
|
||||
Dust dust11 = Dust.CloneDust(num71);
|
||||
Dust dust = dust11;
|
||||
int killDust = Dust.NewDust(Projectile.Center, 0, 0, 267, 0f, 0f, 0, newColor, 1f);
|
||||
Main.dust[killDust].position = Projectile.Center;
|
||||
Main.dust[killDust].velocity = spinningpoint.RotatedBy(MathHelper.TwoPi * i / dustAmt) * randomDustVelMod * (0.8f + Main.rand.NextFloat() * 0.4f);
|
||||
Main.dust[killDust].noGravity = true;
|
||||
Main.dust[killDust].scale = 2f;
|
||||
Main.dust[killDust].fadeIn = Main.rand.NextFloat() * 2f;
|
||||
Dust killDustClone = Dust.CloneDust(killDust);
|
||||
Dust dust = killDustClone;
|
||||
dust.scale /= 2f;
|
||||
dust = dust11;
|
||||
dust = killDustClone;
|
||||
dust.fadeIn /= 2f;
|
||||
dust11.color = new Color(255, 255, 255, 255);
|
||||
killDustClone.color = new Color(255, 255, 255, 255);
|
||||
}
|
||||
for (float num73 = 0f; num73 < num69; num73++)
|
||||
for (float j = 0f; j < dustAmt; j++)
|
||||
{
|
||||
int num74 = Dust.NewDust(Projectile.Center, 0, 0, 267, 0f, 0f, 0, newColor, 1f);
|
||||
Main.dust[num74].position = Projectile.Center;
|
||||
Main.dust[num74].velocity = spinningpoint.RotatedBy(MathHelper.TwoPi * num73 / num69) * value5 * (0.8f + Main.rand.NextFloat() * 0.4f);
|
||||
Dust dust = Main.dust[num74];
|
||||
int killDust2 = Dust.NewDust(Projectile.Center, 0, 0, 267, 0f, 0f, 0, newColor, 1f);
|
||||
Main.dust[killDust2].position = Projectile.Center;
|
||||
Main.dust[killDust2].velocity = spinningpoint.RotatedBy(MathHelper.TwoPi * j / dustAmt) * randomDustVelMod * (0.8f + Main.rand.NextFloat() * 0.4f);
|
||||
Dust dust = Main.dust[killDust2];
|
||||
dust.velocity *= Main.rand.NextFloat() * 0.8f;
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat() * 1f;
|
||||
dust.fadeIn = Main.rand.NextFloat() * 2f;
|
||||
Dust dust12 = Dust.CloneDust(num74);
|
||||
dust = dust12;
|
||||
Dust killDustClone2 = Dust.CloneDust(killDust2);
|
||||
dust = killDustClone2;
|
||||
dust.scale /= 2f;
|
||||
dust = dust12;
|
||||
dust = killDustClone2;
|
||||
dust.fadeIn /= 2f;
|
||||
dust12.color = new Color(255, 255, 255, 255);
|
||||
killDustClone2.color = new Color(255, 255, 255, 255);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using System;
|
||||
using System.IO;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.ProfanedGuardians;
|
||||
using CalamityMod.NPCs.Providence;
|
||||
@@ -6,12 +7,11 @@ using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
public class ProvidenceHolyRay : ModProjectile, ILocalizedModType
|
||||
@@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.velocity.HasNaNs() || Projectile.velocity == Vector2.Zero)
|
||||
Projectile.velocity = -Vector2.UnitY;
|
||||
|
||||
float num801 = Main.npc[(int)Projectile.ai[1]].type == ModContent.NPCType<ProfanedGuardianCommander>() ? 0.66f : 1f;
|
||||
float projScale = Main.npc[(int)Projectile.ai[1]].type == ModContent.NPCType<ProfanedGuardianCommander>() ? 0.66f : 1f;
|
||||
Projectile.localAI[0] += 1f;
|
||||
if (Projectile.localAI[0] >= (scissorLasers ? 100f : 180f))
|
||||
{
|
||||
@@ -84,56 +84,54 @@ namespace CalamityMod.Projectiles.Boss
|
||||
return;
|
||||
}
|
||||
|
||||
Projectile.scale = (float)Math.Sin(Projectile.localAI[0] * MathHelper.Pi / (scissorLasers ? 100f : 180f)) * 10f * num801;
|
||||
if (Projectile.scale > num801)
|
||||
Projectile.scale = num801;
|
||||
Projectile.scale = (float)Math.Sin(Projectile.localAI[0] * MathHelper.Pi / (scissorLasers ? 100f : 180f)) * 10f * projScale;
|
||||
if (Projectile.scale > projScale)
|
||||
Projectile.scale = projScale;
|
||||
|
||||
float num804 = Projectile.velocity.ToRotation();
|
||||
num804 += Projectile.ai[0];
|
||||
Projectile.rotation = num804 - MathHelper.PiOver2;
|
||||
Projectile.velocity = num804.ToRotationVector2();
|
||||
float projVelRotation = Projectile.velocity.ToRotation();
|
||||
projVelRotation += Projectile.ai[0];
|
||||
Projectile.rotation = projVelRotation - MathHelper.PiOver2;
|
||||
Projectile.velocity = projVelRotation.ToRotationVector2();
|
||||
|
||||
float num805 = 3f;
|
||||
float num806 = Projectile.width;
|
||||
float projWidth = Projectile.width;
|
||||
|
||||
Vector2 samplingPoint = Projectile.Center;
|
||||
if (vector78.HasValue)
|
||||
samplingPoint = vector78.Value;
|
||||
|
||||
float[] array3 = new float[(int)num805];
|
||||
Collision.LaserScan(samplingPoint, Projectile.velocity, num806 * Projectile.scale, 2400f, array3);
|
||||
float num807 = 0f;
|
||||
for (int num808 = 0; num808 < array3.Length; num808++)
|
||||
float[] array3 = new float[3];
|
||||
Collision.LaserScan(samplingPoint, Projectile.velocity, projWidth * Projectile.scale, 2400f, array3);
|
||||
float rayLength = 0f;
|
||||
for (int i = 0; i < array3.Length; i++)
|
||||
{
|
||||
num807 += array3[num808];
|
||||
rayLength += array3[i];
|
||||
}
|
||||
num807 /= num805;
|
||||
rayLength /= 3f;
|
||||
|
||||
// Fire laser through walls at max length if target cannot be seen
|
||||
if (!Collision.CanHitLine(Main.npc[(int)Projectile.ai[1]].Center, 1, 1, Main.player[Main.npc[(int)Projectile.ai[1]].target].Center, 1, 1))
|
||||
num807 = 2400f;
|
||||
rayLength = 2400f;
|
||||
|
||||
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
|
||||
float amount = 0.5f;
|
||||
Projectile.localAI[1] = MathHelper.Lerp(Projectile.localAI[1], num807, amount); // Length of laser, linear interpolation
|
||||
Vector2 vector79 = Projectile.Center + Projectile.velocity * (Projectile.localAI[1] - 14f);
|
||||
for (int num809 = 0; num809 < 2; num809++)
|
||||
Projectile.localAI[1] = MathHelper.Lerp(Projectile.localAI[1], rayLength, 0.5f); // Length of laser, linear interpolation
|
||||
Vector2 dustRotation = Projectile.Center + Projectile.velocity * (Projectile.localAI[1] - 14f);
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
float num810 = Projectile.velocity.ToRotation() + (Main.rand.NextBool() ? -1f : 1f) * MathHelper.PiOver2;
|
||||
float num811 = (float)Main.rand.NextDouble() * 2f + 2f;
|
||||
Vector2 vector80 = new Vector2((float)Math.Cos(num810) * num811, (float)Math.Sin(num810) * num811);
|
||||
int num812 = Dust.NewDust(vector79, 0, 0, dustType, vector80.X, vector80.Y, 0, default, 1f);
|
||||
Main.dust[num812].noGravity = true;
|
||||
Main.dust[num812].scale = 1.7f;
|
||||
float randDustDirection = Projectile.velocity.ToRotation() + (Main.rand.NextBool() ? -1f : 1f) * MathHelper.PiOver2;
|
||||
float randDustVel = (float)Main.rand.NextDouble() * 2f + 2f;
|
||||
Vector2 finalDustVel = new Vector2((float)Math.Cos(randDustDirection) * randDustVel, (float)Math.Sin(randDustDirection) * randDustVel);
|
||||
int holyDust = Dust.NewDust(dustRotation, 0, 0, dustType, finalDustVel.X, finalDustVel.Y, 0, default, 1f);
|
||||
Main.dust[holyDust].noGravity = true;
|
||||
Main.dust[holyDust].scale = 1.7f;
|
||||
}
|
||||
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
Vector2 value29 = Projectile.velocity.RotatedBy(MathHelper.PiOver2, default) * ((float)Main.rand.NextDouble() - 0.5f) * Projectile.width;
|
||||
int num813 = Dust.NewDust(vector79 + value29 - Vector2.One * 4f, 8, 8, dustType, 0f, 0f, 100, default, 1.5f);
|
||||
Dust dust = Main.dust[num813];
|
||||
Vector2 extraDustRotate = Projectile.velocity.RotatedBy(MathHelper.PiOver2, default) * ((float)Main.rand.NextDouble() - 0.5f) * Projectile.width;
|
||||
int extraHolyDust = Dust.NewDust(dustRotation + extraDustRotate - Vector2.One * 4f, 8, 8, dustType, 0f, 0f, 100, default, 1.5f);
|
||||
Dust dust = Main.dust[extraHolyDust];
|
||||
dust.velocity *= 0.5f;
|
||||
Main.dust[num813].velocity.Y = -Math.Abs(Main.dust[num813].velocity.Y);
|
||||
Main.dust[extraHolyDust].velocity.Y = -Math.Abs(Main.dust[extraHolyDust].velocity.Y);
|
||||
}
|
||||
|
||||
DelegateMethods.v3_1 = new Vector3(0.3f, 0.65f, 0.7f);
|
||||
@@ -153,38 +151,38 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Texture2D texture2D21 = dayTime ? ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/ProvidenceHolyRayEnd", AssetRequestMode.ImmediateLoad).Value :
|
||||
ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/ProvidenceHolyRayEndNight", AssetRequestMode.ImmediateLoad).Value;
|
||||
|
||||
float num223 = Projectile.localAI[1]; //length of laser
|
||||
Color color44 = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0) * 0.9f;
|
||||
float rayDrawLength = Projectile.localAI[1]; //length of laser
|
||||
Color baseColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0) * 0.9f;
|
||||
Vector2 vector = Projectile.Center - Main.screenPosition;
|
||||
Rectangle? sourceRectangle2 = null;
|
||||
Main.spriteBatch.Draw(texture2D19, vector, sourceRectangle2, color44, Projectile.rotation, texture2D19.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
num223 -= (texture2D19.Height / 2 + texture2D21.Height) * Projectile.scale;
|
||||
Vector2 value20 = Projectile.Center;
|
||||
value20 += Projectile.velocity * Projectile.scale * texture2D19.Height / 2f;
|
||||
Main.spriteBatch.Draw(texture2D19, vector, sourceRectangle2, baseColor, Projectile.rotation, texture2D19.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
rayDrawLength -= (texture2D19.Height / 2 + texture2D21.Height) * Projectile.scale;
|
||||
Vector2 projCenter = Projectile.Center;
|
||||
projCenter += Projectile.velocity * Projectile.scale * texture2D19.Height / 2f;
|
||||
|
||||
if (num223 > 0f)
|
||||
if (rayDrawLength > 0f)
|
||||
{
|
||||
float num224 = 0f;
|
||||
Rectangle rectangle7 = new Rectangle(0, 36 * (Projectile.timeLeft / 3 % 4), texture2D20.Width, 36);
|
||||
while (num224 + 1f < num223)
|
||||
float raySegment = 0f;
|
||||
Rectangle drawRectangle = new Rectangle(0, 36 * (Projectile.timeLeft / 3 % 4), texture2D20.Width, 36);
|
||||
while (raySegment + 1f < rayDrawLength)
|
||||
{
|
||||
if (num223 - num224 < rectangle7.Height)
|
||||
rectangle7.Height = (int)(num223 - num224);
|
||||
if (rayDrawLength - raySegment < drawRectangle.Height)
|
||||
drawRectangle.Height = (int)(rayDrawLength - raySegment);
|
||||
|
||||
Main.spriteBatch.Draw(texture2D20, value20 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(rectangle7), color44, Projectile.rotation, new Vector2(rectangle7.Width / 2, 0f), Projectile.scale, SpriteEffects.None, 0);
|
||||
num224 += rectangle7.Height * Projectile.scale;
|
||||
value20 += Projectile.velocity * rectangle7.Height * Projectile.scale;
|
||||
rectangle7.Y += 36;
|
||||
Main.spriteBatch.Draw(texture2D20, projCenter - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(drawRectangle), baseColor, Projectile.rotation, new Vector2(drawRectangle.Width / 2, 0f), Projectile.scale, SpriteEffects.None, 0);
|
||||
raySegment += drawRectangle.Height * Projectile.scale;
|
||||
projCenter += Projectile.velocity * drawRectangle.Height * Projectile.scale;
|
||||
drawRectangle.Y += 36;
|
||||
|
||||
if (rectangle7.Y + rectangle7.Height > texture2D20.Height)
|
||||
rectangle7.Y = 0;
|
||||
if (drawRectangle.Y + drawRectangle.Height > texture2D20.Height)
|
||||
drawRectangle.Y = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Vector2 vector2 = value20 - Main.screenPosition;
|
||||
Vector2 vector2 = projCenter - Main.screenPosition;
|
||||
sourceRectangle2 = null;
|
||||
|
||||
Main.spriteBatch.Draw(texture2D21, vector2, sourceRectangle2, color44, Projectile.rotation, texture2D21.Frame(1, 1, 0, 0).Top(), Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(texture2D21, vector2, sourceRectangle2, baseColor, Projectile.rotation, texture2D21.Frame(1, 1, 0, 0).Top(), Projectile.scale, SpriteEffects.None, 0);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -200,9 +198,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
if (projHitbox.Intersects(targetHitbox))
|
||||
return true;
|
||||
|
||||
float num6 = 0f;
|
||||
if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, Projectile.Center + Projectile.velocity * Projectile.localAI[1], 22f * Projectile.scale, ref num6))
|
||||
|
||||
float useless = 0f;
|
||||
if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, Projectile.Center + Projectile.velocity * Projectile.localAI[1], 22f * Projectile.scale, ref useless))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -29,11 +29,11 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
for (int num468 = 0; num468 < 2; num468++)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int num469 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 135, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num469].noGravity = true;
|
||||
Main.dust[num469].velocity *= 0f;
|
||||
int icyFlame = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 135, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[icyFlame].noGravity = true;
|
||||
Main.dust[icyFlame].velocity *= 0f;
|
||||
}
|
||||
if (Projectile.ai[1] == 0f)
|
||||
{
|
||||
|
||||
@@ -49,40 +49,40 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
if (Projectile.frameCounter == 0 || Projectile.oldPos[0] == Vector2.Zero)
|
||||
{
|
||||
for (int num31 = Projectile.oldPos.Length - 1; num31 > 0; num31--)
|
||||
for (int i = Projectile.oldPos.Length - 1; i > 0; i--)
|
||||
{
|
||||
Projectile.oldPos[num31] = Projectile.oldPos[num31 - 1];
|
||||
Projectile.oldPos[i] = Projectile.oldPos[i - 1];
|
||||
}
|
||||
Projectile.oldPos[0] = Projectile.position;
|
||||
if (Projectile.velocity == Vector2.Zero)
|
||||
{
|
||||
float num32 = Projectile.rotation + MathHelper.PiOver2 + ((Main.rand.Next(2) == 1) ? -1f : 1f) * MathHelper.PiOver2;
|
||||
float num33 = (float)Main.rand.NextDouble() * 2f + 2f;
|
||||
Vector2 vector2 = new Vector2((float)Math.Cos((double)num32) * num33, (float)Math.Sin((double)num32) * num33);
|
||||
int num34 = Dust.NewDust(Projectile.oldPos[Projectile.oldPos.Length - 1], 0, 0, 60, vector2.X, vector2.Y, 0, default, 1f);
|
||||
Main.dust[num34].noGravity = true;
|
||||
Main.dust[num34].scale = 1.7f;
|
||||
float dustRotation = Projectile.rotation + MathHelper.PiOver2 + ((Main.rand.Next(2) == 1) ? -1f : 1f) * MathHelper.PiOver2;
|
||||
float randDustRotateMod = (float)Main.rand.NextDouble() * 2f + 2f;
|
||||
Vector2 dustVelocity = new Vector2((float)Math.Cos((double)dustRotation) * randDustRotateMod, (float)Math.Sin((double)dustRotation) * randDustRotateMod);
|
||||
int redDust = Dust.NewDust(Projectile.oldPos[Projectile.oldPos.Length - 1], 0, 0, 60, dustVelocity.X, dustVelocity.Y, 0, default, 1f);
|
||||
Main.dust[redDust].noGravity = true;
|
||||
Main.dust[redDust].scale = 1.7f;
|
||||
}
|
||||
}
|
||||
|
||||
int num3 = Projectile.frameCounter;
|
||||
Projectile.frameCounter = num3 + 1;
|
||||
int inc = Projectile.frameCounter;
|
||||
Projectile.frameCounter = inc + 1;
|
||||
Lighting.AddLight(Projectile.Center, 0.8f, 0.25f, 0.15f);
|
||||
if (Projectile.velocity == Vector2.Zero)
|
||||
{
|
||||
if (Projectile.frameCounter >= Projectile.extraUpdates * 2)
|
||||
{
|
||||
Projectile.frameCounter = 0;
|
||||
bool flag36 = true;
|
||||
for (int num855 = 1; num855 < Projectile.oldPos.Length; num855 = num3 + 1)
|
||||
bool lightningExpired = true;
|
||||
for (int j = 1; j < Projectile.oldPos.Length; j = inc + 1)
|
||||
{
|
||||
if (Projectile.oldPos[num855] != Projectile.oldPos[0])
|
||||
if (Projectile.oldPos[j] != Projectile.oldPos[0])
|
||||
{
|
||||
flag36 = false;
|
||||
lightningExpired = false;
|
||||
}
|
||||
num3 = num855;
|
||||
inc = j;
|
||||
}
|
||||
if (flag36)
|
||||
if (lightningExpired)
|
||||
{
|
||||
Projectile.Kill();
|
||||
return;
|
||||
@@ -90,66 +90,66 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
if (Main.rand.Next(Projectile.extraUpdates) == 0)
|
||||
{
|
||||
for (int num856 = 0; num856 < 2; num856 = num3 + 1)
|
||||
for (int k = 0; k < 2; k = inc + 1)
|
||||
{
|
||||
float num857 = Projectile.rotation + ((Main.rand.Next(2) == 1) ? -1f : 1f) * MathHelper.PiOver2;
|
||||
float num858 = (float)Main.rand.NextDouble() * 0.8f + 1f;
|
||||
Vector2 vector96 = new Vector2((float)Math.Cos((double)num857) * num858, (float)Math.Sin((double)num857) * num858);
|
||||
int num859 = Dust.NewDust(Projectile.Center, 0, 0, 60, vector96.X, vector96.Y, 0, default, 1f);
|
||||
Main.dust[num859].noGravity = true;
|
||||
Main.dust[num859].scale = 1.2f;
|
||||
num3 = num856;
|
||||
float extraDustRotate = Projectile.rotation + ((Main.rand.Next(2) == 1) ? -1f : 1f) * MathHelper.PiOver2;
|
||||
float extraRandRotate = (float)Main.rand.NextDouble() * 0.8f + 1f;
|
||||
Vector2 dustVelocity = new Vector2((float)Math.Cos((double)extraDustRotate) * extraRandRotate, (float)Math.Sin((double)extraDustRotate) * extraRandRotate);
|
||||
int extraRedDust = Dust.NewDust(Projectile.Center, 0, 0, 60, dustVelocity.X, dustVelocity.Y, 0, default, 1f);
|
||||
Main.dust[extraRedDust].noGravity = true;
|
||||
Main.dust[extraRedDust].scale = 1.2f;
|
||||
inc = k;
|
||||
}
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
Vector2 value39 = Projectile.velocity.RotatedBy((double)MathHelper.PiOver2, default(Vector2)) * ((float)Main.rand.NextDouble() - 0.5f) * (float)Projectile.width;
|
||||
int num860 = Dust.NewDust(Projectile.Center + value39 - Vector2.One * 4f, 8, 8, 60, 0f, 0f, 100, default, 1.5f);
|
||||
Dust dust = Main.dust[num860];
|
||||
Vector2 moreDustRotation = Projectile.velocity.RotatedBy((double)MathHelper.PiOver2, default(Vector2)) * ((float)Main.rand.NextDouble() - 0.5f) * (float)Projectile.width;
|
||||
int moreExtraRedDust = Dust.NewDust(Projectile.Center + moreDustRotation - Vector2.One * 4f, 8, 8, 60, 0f, 0f, 100, default, 1.5f);
|
||||
Dust dust = Main.dust[moreExtraRedDust];
|
||||
dust.velocity *= 0.5f;
|
||||
Main.dust[num860].velocity.Y = -Math.Abs(Main.dust[num860].velocity.Y);
|
||||
Main.dust[moreExtraRedDust].velocity.Y = -Math.Abs(Main.dust[moreExtraRedDust].velocity.Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (Projectile.frameCounter >= Projectile.extraUpdates * 2)
|
||||
{
|
||||
Projectile.frameCounter = 0;
|
||||
float num861 = Projectile.velocity.Length();
|
||||
float projSpeed = Projectile.velocity.Length();
|
||||
UnifiedRandom unifiedRandom = new UnifiedRandom((int)Projectile.ai[1]);
|
||||
int num862 = 0;
|
||||
Vector2 vector97 = -Vector2.UnitY;
|
||||
Vector2 vector98;
|
||||
int frameIncrement = 0;
|
||||
Vector2 randomLightningMovement = -Vector2.UnitY;
|
||||
Vector2 lightningYRotation;
|
||||
do
|
||||
{
|
||||
int num863 = unifiedRandom.Next();
|
||||
Projectile.ai[1] = (float)num863;
|
||||
num863 %= 100;
|
||||
float f = (float)num863 / 100f * MathHelper.TwoPi;
|
||||
vector98 = f.ToRotationVector2();
|
||||
if (vector98.Y > 0f)
|
||||
int randomIncrement = unifiedRandom.Next();
|
||||
Projectile.ai[1] = (float)randomIncrement;
|
||||
randomIncrement %= 100;
|
||||
float f = (float)randomIncrement / 100f * MathHelper.TwoPi;
|
||||
lightningYRotation = f.ToRotationVector2();
|
||||
if (lightningYRotation.Y > 0f)
|
||||
{
|
||||
vector98.Y *= -1f;
|
||||
lightningYRotation.Y *= -1f;
|
||||
}
|
||||
bool flag37 = false;
|
||||
if (vector98.Y > -0.02f)
|
||||
bool stopLightning = false;
|
||||
if (lightningYRotation.Y > -0.02f)
|
||||
{
|
||||
flag37 = true;
|
||||
stopLightning = true;
|
||||
}
|
||||
if (vector98.X * (float)(Projectile.extraUpdates + 1) * 2f * num861 + Projectile.localAI[0] > 40f)
|
||||
if (lightningYRotation.X * (float)(Projectile.extraUpdates + 1) * 2f * projSpeed + Projectile.localAI[0] > 40f)
|
||||
{
|
||||
flag37 = true;
|
||||
stopLightning = true;
|
||||
}
|
||||
if (vector98.X * (float)(Projectile.extraUpdates + 1) * 2f * num861 + Projectile.localAI[0] < -40f)
|
||||
if (lightningYRotation.X * (float)(Projectile.extraUpdates + 1) * 2f * projSpeed + Projectile.localAI[0] < -40f)
|
||||
{
|
||||
flag37 = true;
|
||||
stopLightning = true;
|
||||
}
|
||||
if (!flag37)
|
||||
if (!stopLightning)
|
||||
{
|
||||
goto IL_25086;
|
||||
}
|
||||
num3 = num862;
|
||||
num862 = num3 + 1;
|
||||
inc = frameIncrement;
|
||||
frameIncrement = inc + 1;
|
||||
}
|
||||
while (num3 < 100);
|
||||
while (inc < 100);
|
||||
|
||||
Projectile.velocity = Vector2.Zero;
|
||||
Projectile.localAI[1] = 1f;
|
||||
@@ -157,13 +157,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
goto IL_25092;
|
||||
|
||||
IL_25086:
|
||||
vector97 = vector98;
|
||||
randomLightningMovement = lightningYRotation;
|
||||
|
||||
IL_25092:
|
||||
if (Projectile.velocity != Vector2.Zero)
|
||||
{
|
||||
Projectile.localAI[0] += vector97.X * (float)(Projectile.extraUpdates + 1) * 2f * num861;
|
||||
Projectile.velocity = vector97.RotatedBy((double)(Projectile.ai[0] + MathHelper.PiOver2), default(Vector2)) * num861;
|
||||
Projectile.localAI[0] += randomLightningMovement.X * (float)(Projectile.extraUpdates + 1) * 2f * projSpeed;
|
||||
Projectile.velocity = randomLightningMovement.RotatedBy((double)(Projectile.ai[0] + MathHelper.PiOver2), default(Vector2)) * projSpeed;
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
}
|
||||
}
|
||||
@@ -182,39 +182,39 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Vector2 end = Projectile.position + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition;
|
||||
Texture2D tex3 = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/RedLightningTexture").Value;
|
||||
Projectile.GetAlpha(lightColor);
|
||||
Vector2 scale16 = new Vector2(Projectile.scale) / 2f;
|
||||
for (int num289 = 0; num289 < 3; num289++)
|
||||
Vector2 lightningScale = new Vector2(Projectile.scale) / 2f;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (num289 == 0)
|
||||
if (i == 0)
|
||||
{
|
||||
scale16 = new Vector2(Projectile.scale) * 0.6f;
|
||||
lightningScale = new Vector2(Projectile.scale) * 0.6f;
|
||||
DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color(219, 104, 58, 0) * 0.5f;
|
||||
}
|
||||
else if (num289 == 1)
|
||||
else if (i == 1)
|
||||
{
|
||||
scale16 = new Vector2(Projectile.scale) * 0.4f;
|
||||
lightningScale = new Vector2(Projectile.scale) * 0.4f;
|
||||
DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color(255, 126, 56, 0) * 0.5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
scale16 = new Vector2(Projectile.scale) * 0.2f;
|
||||
lightningScale = new Vector2(Projectile.scale) * 0.2f;
|
||||
DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color(255, 128, 128, 0) * 0.5f;
|
||||
}
|
||||
DelegateMethods.f_1 = 1f;
|
||||
for (int num290 = Projectile.oldPos.Length - 1; num290 > 0; num290--)
|
||||
for (int j = Projectile.oldPos.Length - 1; j > 0; j--)
|
||||
{
|
||||
if (!(Projectile.oldPos[num290] == Vector2.Zero))
|
||||
if (!(Projectile.oldPos[j] == Vector2.Zero))
|
||||
{
|
||||
Vector2 start = Projectile.oldPos[num290] + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition;
|
||||
Vector2 end2 = Projectile.oldPos[num290 - 1] + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition;
|
||||
Utils.DrawLaser(Main.spriteBatch, tex3, start, end2, scale16, new Utils.LaserLineFraming(DelegateMethods.LightningLaserDraw));
|
||||
Vector2 start = Projectile.oldPos[j] + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition;
|
||||
Vector2 end2 = Projectile.oldPos[j - 1] + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition;
|
||||
Utils.DrawLaser(Main.spriteBatch, tex3, start, end2, lightningScale, new Utils.LaserLineFraming(DelegateMethods.LightningLaserDraw));
|
||||
}
|
||||
}
|
||||
if (Projectile.oldPos[0] != Vector2.Zero)
|
||||
{
|
||||
DelegateMethods.f_1 = 1f;
|
||||
Vector2 start2 = Projectile.oldPos[0] + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition;
|
||||
Utils.DrawLaser(Main.spriteBatch, tex3, start2, end, scale16, new Utils.LaserLineFraming(DelegateMethods.LightningLaserDraw));
|
||||
Utils.DrawLaser(Main.spriteBatch, tex3, start2, end, lightningScale, new Utils.LaserLineFraming(DelegateMethods.LightningLaserDraw));
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -67,15 +67,15 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.velocity.Length() < 10f)
|
||||
Projectile.velocity *= 1.015f;
|
||||
|
||||
int num103 = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
float scaleFactor2 = Projectile.velocity.Length();
|
||||
Vector2 vector11 = Main.player[num103].Center - Projectile.Center;
|
||||
vector11.Normalize();
|
||||
vector11 *= scaleFactor2;
|
||||
int playerTracker = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
float projVelocity = Projectile.velocity.Length();
|
||||
Vector2 playerDirection = Main.player[playerTracker].Center - Projectile.Center;
|
||||
playerDirection.Normalize();
|
||||
playerDirection *= projVelocity;
|
||||
|
||||
Projectile.velocity = (Projectile.velocity * 19f + vector11) / 20f;
|
||||
Projectile.velocity = (Projectile.velocity * 19f + playerDirection) / 20f;
|
||||
Projectile.velocity.Normalize();
|
||||
Projectile.velocity *= scaleFactor2;
|
||||
Projectile.velocity *= projVelocity;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -106,18 +106,18 @@ namespace CalamityMod.Projectiles.Boss
|
||||
private void EmitDust()
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item109, Projectile.Center);
|
||||
for (int num193 = 0; num193 < 6; num193++)
|
||||
for (int j = 0; j < 6; j++)
|
||||
{
|
||||
Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 100, default, 1.5f);
|
||||
}
|
||||
for (int num194 = 0; num194 < 10; num194++)
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
int num195 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 0, default, 2.5f);
|
||||
Main.dust[num195].noGravity = true;
|
||||
Main.dust[num195].velocity *= 3f;
|
||||
num195 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 100, default, 1.5f);
|
||||
Main.dust[num195].velocity *= 2f;
|
||||
Main.dust[num195].noGravity = true;
|
||||
int redDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 0, default, 2.5f);
|
||||
Main.dust[redDust].noGravity = true;
|
||||
Main.dust[redDust].velocity *= 3f;
|
||||
redDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 60, 0f, 0f, 100, default, 1.5f);
|
||||
Main.dust[redDust].velocity *= 2f;
|
||||
Main.dust[redDust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,23 +46,23 @@ namespace CalamityMod.Projectiles.Boss
|
||||
SoundEngine.PlaySound(SoundID.Item14, Projectile.Center);
|
||||
for (int dust = 0; dust <= 3; dust++)
|
||||
{
|
||||
float num463 = Main.rand.Next(-10, 11);
|
||||
float num464 = Main.rand.Next(-10, 11);
|
||||
float num465 = Main.rand.Next(3, 9);
|
||||
float num466 = (float)Math.Sqrt(num463 * num463 + num464 * num464);
|
||||
num466 = num465 / num466;
|
||||
num463 *= num466;
|
||||
num464 *= num466;
|
||||
int num467 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 85, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[num467].noGravity = true;
|
||||
Main.dust[num467].position.X = Projectile.Center.X;
|
||||
Main.dust[num467].position.Y = Projectile.Center.Y;
|
||||
Dust expr_149DF_cp_0 = Main.dust[num467];
|
||||
float rando1 = Main.rand.Next(-10, 11);
|
||||
float rando2 = Main.rand.Next(-10, 11);
|
||||
float rando3 = Main.rand.Next(3, 9);
|
||||
float randoAdjuster = (float)Math.Sqrt(rando1 * rando1 + rando2 * rando2);
|
||||
randoAdjuster = rando3 / randoAdjuster;
|
||||
rando1 *= randoAdjuster;
|
||||
rando2 *= randoAdjuster;
|
||||
int sandyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 85, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[sandyDust].noGravity = true;
|
||||
Main.dust[sandyDust].position.X = Projectile.Center.X;
|
||||
Main.dust[sandyDust].position.Y = Projectile.Center.Y;
|
||||
Dust expr_149DF_cp_0 = Main.dust[sandyDust];
|
||||
expr_149DF_cp_0.position.X += Main.rand.Next(-10, 11);
|
||||
Dust expr_14A09_cp_0 = Main.dust[num467];
|
||||
Dust expr_14A09_cp_0 = Main.dust[sandyDust];
|
||||
expr_14A09_cp_0.position.Y += Main.rand.Next(-10, 11);
|
||||
Main.dust[num467].velocity.X = num463;
|
||||
Main.dust[num467].velocity.Y = num464;
|
||||
Main.dust[sandyDust].velocity.X = rando1;
|
||||
Main.dust[sandyDust].velocity.Y = rando2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,18 +20,18 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
int num103 = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
int playerTracker = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
Projectile.ai[1] += 1f;
|
||||
if (Projectile.ai[1] < 150f && Projectile.ai[1] > 30f)
|
||||
{
|
||||
float inertia = 30f;
|
||||
float scaleFactor2 = Projectile.velocity.Length();
|
||||
Vector2 vector11 = Main.player[num103].Center - Projectile.Center;
|
||||
vector11.Normalize();
|
||||
vector11 *= scaleFactor2;
|
||||
Projectile.velocity = (Projectile.velocity * (inertia - 1f) + vector11) / inertia;
|
||||
float projVelocity = Projectile.velocity.Length();
|
||||
Vector2 playerDirection = Main.player[playerTracker].Center - Projectile.Center;
|
||||
playerDirection.Normalize();
|
||||
playerDirection *= projVelocity;
|
||||
Projectile.velocity = (Projectile.velocity * (inertia - 1f) + playerDirection) / inertia;
|
||||
Projectile.velocity.Normalize();
|
||||
Projectile.velocity *= scaleFactor2;
|
||||
Projectile.velocity *= projVelocity;
|
||||
}
|
||||
else if (Projectile.ai[0] == 1f)
|
||||
{
|
||||
|
||||
@@ -61,8 +61,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
if (Projectile.alpha < 40)
|
||||
{
|
||||
int num805 = Dust.NewDust(Projectile.Center - Vector2.One * 5f, 10, 10, 244, -Projectile.velocity.X / 3f, -Projectile.velocity.Y / 3f, 150, Color.Transparent, 0.6f);
|
||||
Main.dust[num805].noGravity = true;
|
||||
int laserDust = Dust.NewDust(Projectile.Center - Vector2.One * 5f, 10, 10, 244, -Projectile.velocity.X / 3f, -Projectile.velocity.Y / 3f, 150, Color.Transparent, 0.6f);
|
||||
Main.dust[laserDust].noGravity = true;
|
||||
}
|
||||
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
@@ -121,44 +121,44 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
float speed = revenge ? 9f : 7.5f;
|
||||
|
||||
Vector2 vector70 = Main.player[(int)Projectile.ai[1]].Center - Projectile.Center;
|
||||
if (vector70.Length() < 20f)
|
||||
Vector2 playerDistance = Main.player[(int)Projectile.ai[1]].Center - Projectile.Center;
|
||||
if (playerDistance.Length() < 20f)
|
||||
{
|
||||
Projectile.Kill();
|
||||
return;
|
||||
}
|
||||
|
||||
vector70.Normalize();
|
||||
vector70 *= 14f;
|
||||
vector70 = Vector2.Lerp(Projectile.velocity, vector70, 0.6f);
|
||||
if (vector70.Y < speed)
|
||||
vector70.Y = speed;
|
||||
playerDistance.Normalize();
|
||||
playerDistance *= 14f;
|
||||
playerDistance = Vector2.Lerp(Projectile.velocity, playerDistance, 0.6f);
|
||||
if (playerDistance.Y < speed)
|
||||
playerDistance.Y = speed;
|
||||
|
||||
float num804 = 0.4f;
|
||||
if (Projectile.velocity.X < vector70.X)
|
||||
float projVelocityMult = 0.4f;
|
||||
if (Projectile.velocity.X < playerDistance.X)
|
||||
{
|
||||
Projectile.velocity.X = Projectile.velocity.X + num804;
|
||||
if (Projectile.velocity.X < 0f && vector70.X > 0f)
|
||||
Projectile.velocity.X = Projectile.velocity.X + num804;
|
||||
Projectile.velocity.X = Projectile.velocity.X + projVelocityMult;
|
||||
if (Projectile.velocity.X < 0f && playerDistance.X > 0f)
|
||||
Projectile.velocity.X = Projectile.velocity.X + projVelocityMult;
|
||||
}
|
||||
else if (Projectile.velocity.X > vector70.X)
|
||||
else if (Projectile.velocity.X > playerDistance.X)
|
||||
{
|
||||
Projectile.velocity.X = Projectile.velocity.X - num804;
|
||||
if (Projectile.velocity.X > 0f && vector70.X < 0f)
|
||||
Projectile.velocity.X = Projectile.velocity.X - num804;
|
||||
Projectile.velocity.X = Projectile.velocity.X - projVelocityMult;
|
||||
if (Projectile.velocity.X > 0f && playerDistance.X < 0f)
|
||||
Projectile.velocity.X = Projectile.velocity.X - projVelocityMult;
|
||||
}
|
||||
|
||||
if (Projectile.velocity.Y < vector70.Y)
|
||||
if (Projectile.velocity.Y < playerDistance.Y)
|
||||
{
|
||||
Projectile.velocity.Y = Projectile.velocity.Y + num804;
|
||||
if (Projectile.velocity.Y < 0f && vector70.Y > 0f)
|
||||
Projectile.velocity.Y = Projectile.velocity.Y + num804;
|
||||
Projectile.velocity.Y = Projectile.velocity.Y + projVelocityMult;
|
||||
if (Projectile.velocity.Y < 0f && playerDistance.Y > 0f)
|
||||
Projectile.velocity.Y = Projectile.velocity.Y + projVelocityMult;
|
||||
}
|
||||
else if (Projectile.velocity.Y > vector70.Y)
|
||||
else if (Projectile.velocity.Y > playerDistance.Y)
|
||||
{
|
||||
Projectile.velocity.Y = Projectile.velocity.Y - num804;
|
||||
if (Projectile.velocity.Y > 0f && vector70.Y < 0f)
|
||||
Projectile.velocity.Y = Projectile.velocity.Y - num804;
|
||||
Projectile.velocity.Y = Projectile.velocity.Y - projVelocityMult;
|
||||
if (Projectile.velocity.Y > 0f && playerDistance.Y < 0f)
|
||||
Projectile.velocity.Y = Projectile.velocity.Y - projVelocityMult;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -189,18 +189,18 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.width = Projectile.height = 64;
|
||||
Projectile.position.X = Projectile.position.X - (Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
|
||||
for (int num193 = 0; num193 < 2; num193++)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 31, 0f, 0f, 100, default, 1.5f);
|
||||
}
|
||||
for (int num194 = 0; num194 < 20; num194++)
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int num195 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 244, 0f, 0f, 0, default, 2.5f);
|
||||
Main.dust[num195].noGravity = true;
|
||||
Main.dust[num195].velocity *= 3f;
|
||||
num195 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 244, 0f, 0f, 100, default, 1.5f);
|
||||
Main.dust[num195].velocity *= 2f;
|
||||
Main.dust[num195].noGravity = true;
|
||||
int killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 244, 0f, 0f, 0, default, 2.5f);
|
||||
Main.dust[killDust].noGravity = true;
|
||||
Main.dust[killDust].velocity *= 3f;
|
||||
killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 244, 0f, 0f, 100, default, 1.5f);
|
||||
Main.dust[killDust].velocity *= 2f;
|
||||
Main.dust[killDust].noGravity = true;
|
||||
}
|
||||
Projectile.Damage();
|
||||
}
|
||||
|
||||
@@ -59,12 +59,12 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
Lighting.AddLight(Projectile.Center, 1f, 0.7f, 0f);
|
||||
|
||||
int num959 = (int)Projectile.ai[0];
|
||||
if (num959 >= 0 && Main.player[num959].active && !Main.player[num959].dead)
|
||||
int playerTracker = (int)Projectile.ai[0];
|
||||
if (playerTracker >= 0 && Main.player[playerTracker].active && !Main.player[playerTracker].dead)
|
||||
{
|
||||
if (Projectile.Distance(Main.player[num959].Center) > 320f)
|
||||
if (Projectile.Distance(Main.player[playerTracker].Center) > 320f)
|
||||
{
|
||||
Vector2 moveDirection = Projectile.SafeDirectionTo(Main.player[num959].Center, Vector2.UnitY);
|
||||
Vector2 moveDirection = Projectile.SafeDirectionTo(Main.player[playerTracker].Center, Vector2.UnitY);
|
||||
Projectile.velocity = (Projectile.velocity * (inertia - 1f) + moveDirection * scaleFactor12) / inertia;
|
||||
}
|
||||
}
|
||||
@@ -89,23 +89,23 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.position.X = Projectile.position.X - (Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
|
||||
Projectile.Damage();
|
||||
for (int num621 = 0; num621 < 30; num621++)
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 244, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int nukeDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 244, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[nukeDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[nukeDust].scale = 0.5f;
|
||||
Main.dust[nukeDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 40; num623++)
|
||||
for (int j = 0; j < 40; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 244, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 244, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int nukeDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 244, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[nukeDust2].noGravity = true;
|
||||
Main.dust[nukeDust2].velocity *= 5f;
|
||||
nukeDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 244, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[nukeDust2].velocity *= 2f;
|
||||
}
|
||||
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
|
||||
@@ -51,9 +51,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.ai[0] >= (Main.getGoodWorld ? 10f : 36f))
|
||||
{
|
||||
Projectile.ai[0] = 0f;
|
||||
int num414 = (int)(Projectile.position.X + 14f + (float)Main.rand.Next(Projectile.width - 28));
|
||||
int num415 = (int)(Projectile.position.Y + (float)Projectile.height + 4f);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), (float)num414, (float)num415, 0f, 4f, ModContent.ProjectileType<ShaderainHostile>(), Projectile.damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
int rainSpawnX = (int)(Projectile.position.X + 14f + (float)Main.rand.Next(Projectile.width - 28));
|
||||
int rainSpawnY = (int)(Projectile.position.Y + (float)Projectile.height + 4f);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), (float)rainSpawnX, (float)rainSpawnY, 0f, 4f, ModContent.ProjectileType<ShaderainHostile>(), Projectile.damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
int num310 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y + (float)Projectile.height - 2f), 2, 2, 14, 0f, 0f, 0, default, 1f);
|
||||
Dust dust = Main.dust[num310];
|
||||
int shadeDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y + (float)Projectile.height - 2f), 2, 2, 14, 0f, 0f, 0, default, 1f);
|
||||
Dust dust = Main.dust[shadeDust];
|
||||
dust.position.X -= 2f;
|
||||
dust.alpha = 38;
|
||||
dust.velocity *= 0.1f;
|
||||
|
||||
@@ -58,19 +58,19 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
if (Projectile.ai[1] == 1f)
|
||||
{
|
||||
int num103 = (int)Player.FindClosest(Projectile.Center, 1, 1);
|
||||
Vector2 vector11 = Main.player[num103].Center - Projectile.Center;
|
||||
int playerTracker = (int)Player.FindClosest(Projectile.Center, 1, 1);
|
||||
Vector2 playerDirection = Main.player[playerTracker].Center - Projectile.Center;
|
||||
Projectile.ai[0] += 1f;
|
||||
if (Projectile.ai[0] >= 60f)
|
||||
{
|
||||
if (Projectile.ai[0] < 240f)
|
||||
{
|
||||
float scaleFactor2 = Projectile.velocity.Length();
|
||||
vector11.Normalize();
|
||||
vector11 *= scaleFactor2;
|
||||
Projectile.velocity = (Projectile.velocity * 24f + vector11) / 25f;
|
||||
float scaleFactor = Projectile.velocity.Length();
|
||||
playerDirection.Normalize();
|
||||
playerDirection *= scaleFactor;
|
||||
Projectile.velocity = (Projectile.velocity * 24f + playerDirection) / 25f;
|
||||
Projectile.velocity.Normalize();
|
||||
Projectile.velocity *= scaleFactor2;
|
||||
Projectile.velocity *= scaleFactor;
|
||||
}
|
||||
else if (Projectile.velocity.Length() < 18f)
|
||||
{
|
||||
|
||||
@@ -54,20 +54,20 @@ namespace CalamityMod.Projectiles.Boss
|
||||
SoundEngine.PlaySound(SoundID.Item73, Projectile.Center);
|
||||
}
|
||||
|
||||
int num469 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num469].noGravity = true;
|
||||
Main.dust[num469].velocity *= 0f;
|
||||
int shadowDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[shadowDust].noGravity = true;
|
||||
Main.dust[shadowDust].velocity *= 0f;
|
||||
|
||||
Projectile.ai[0] += 1f;
|
||||
if (Projectile.ai[0] >= 150f)
|
||||
{
|
||||
if (Projectile.ai[1] > 0f && Projectile.ai[0] < 160f)
|
||||
{
|
||||
int num625 = (int)Projectile.ai[1] - 1;
|
||||
if (num625 < Main.maxPlayers)
|
||||
int playerTracker = (int)Projectile.ai[1] - 1;
|
||||
if (playerTracker < Main.maxPlayers)
|
||||
{
|
||||
Vector2 value16 = Main.player[num625].Center - Projectile.Center;
|
||||
Projectile.velocity = Vector2.Normalize(value16) * 22f;
|
||||
Vector2 playerDirection = Main.player[playerTracker].Center - Projectile.Center;
|
||||
Projectile.velocity = Vector2.Normalize(playerDirection) * 22f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,23 +95,23 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item74, Projectile.Center);
|
||||
for (int num621 = 0; num621 < 5; num621++)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[killDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[killDust].scale = 0.5f;
|
||||
Main.dust[killDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 10; num623++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 1.5f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int killDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 1.5f);
|
||||
Main.dust[killDust2].noGravity = true;
|
||||
Main.dust[killDust2].velocity *= 5f;
|
||||
killDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 173, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[killDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,9 +57,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture2D13 = ModContent.Request<Texture2D>(Texture).Value;
|
||||
int num214 = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
int framing = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -67,59 +67,58 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
SoundEngine.PlaySound(FlareSound, Projectile.Center);
|
||||
int num226 = 36;
|
||||
for (int num227 = 0; num227 < num226; num227++)
|
||||
int dustAmt = 36;
|
||||
for (int i = 0; i < dustAmt; i++)
|
||||
{
|
||||
Vector2 vector6 = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + Projectile.Center;
|
||||
Vector2 vector7 = vector6 - Projectile.Center;
|
||||
int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 244, vector7.X * 2f, vector7.Y * 2f, 100, default, 1.4f);
|
||||
Main.dust[num228].noGravity = true;
|
||||
Main.dust[num228].noLight = true;
|
||||
Main.dust[num228].velocity = vector7;
|
||||
Vector2 dustRotate = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
dustRotate = dustRotate.RotatedBy((double)((float)(i - (dustAmt / 2 - 1)) * 6.28318548f / (float)dustAmt), default) + Projectile.Center;
|
||||
Vector2 dustDirection = dustRotate - Projectile.Center;
|
||||
int flareDust = Dust.NewDust(dustRotate + dustDirection, 0, 0, 244, dustDirection.X * 2f, dustDirection.Y * 2f, 100, default, 1.4f);
|
||||
Main.dust[flareDust].noGravity = true;
|
||||
Main.dust[flareDust].noLight = true;
|
||||
Main.dust[flareDust].velocity = dustDirection;
|
||||
}
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int num231 = (int)(Projectile.Center.Y / 16f);
|
||||
int num232 = (int)(Projectile.Center.X / 16f);
|
||||
int num233 = 100;
|
||||
if (num232 < 10)
|
||||
int projTileX = (int)(Projectile.Center.Y / 16f);
|
||||
int projTileY = (int)(Projectile.Center.X / 16f);
|
||||
if (projTileY < 10)
|
||||
{
|
||||
num232 = 10;
|
||||
projTileY = 10;
|
||||
}
|
||||
if (num232 > Main.maxTilesX - 10)
|
||||
if (projTileY > Main.maxTilesX - 10)
|
||||
{
|
||||
num232 = Main.maxTilesX - 10;
|
||||
projTileY = Main.maxTilesX - 10;
|
||||
}
|
||||
if (num231 < 10)
|
||||
if (projTileX < 10)
|
||||
{
|
||||
num231 = 10;
|
||||
projTileX = 10;
|
||||
}
|
||||
if (num231 > Main.maxTilesY - num233 - 10)
|
||||
if (projTileX > Main.maxTilesY - 110)
|
||||
{
|
||||
num231 = Main.maxTilesY - num233 - 10;
|
||||
projTileX = Main.maxTilesY - 110;
|
||||
}
|
||||
for (int num234 = num231; num234 < num231 + num233; num234++)
|
||||
for (int j = projTileX; j < projTileX + 100; j++)
|
||||
{
|
||||
Tile tile = Main.tile[num232, num234];
|
||||
Tile tile = Main.tile[projTileY, j];
|
||||
if (tile.HasTile && (Main.tileSolid[(int)tile.TileType] || tile.LiquidAmount != 0))
|
||||
{
|
||||
num231 = num234;
|
||||
projTileX = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
int tornadoType = Main.rand.Next(6);
|
||||
if (tornadoType < 5)
|
||||
{
|
||||
int num235 = Main.expertMode ? 180 : 300; //720
|
||||
int num236 = Projectile.NewProjectile(Projectile.GetSource_FromThis(), (float)(num232 * 16 + 8), (float)(num231 * 16 - 24), 0f, 0f, ModContent.ProjectileType<Flarenado>(), num235, 4f, Main.myPlayer, 16f, 15f + (revenge ? 4f : 0f));
|
||||
Main.projectile[num236].netUpdate = true;
|
||||
int nadoDamage = Main.expertMode ? 180 : 300; //720
|
||||
int nadoSpawn = Projectile.NewProjectile(Projectile.GetSource_FromThis(), (float)(projTileY * 16 + 8), (float)(projTileX * 16 - 24), 0f, 0f, ModContent.ProjectileType<Flarenado>(), nadoDamage, 4f, Main.myPlayer, 16f, 15f + (revenge ? 4f : 0f));
|
||||
Main.projectile[nadoSpawn].netUpdate = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
int num235 = Main.expertMode ? 230 : 400; //920
|
||||
int num236 = Projectile.NewProjectile(Projectile.GetSource_FromThis(), (float)(num232 * 16 + 8), (float)(num231 * 16 - 24), 0f, 0f, ModContent.ProjectileType<Infernado>(), num235, 4f, Main.myPlayer, 16f, 16f + (revenge ? 4f : 0f));
|
||||
Main.projectile[num236].netUpdate = true;
|
||||
int nadoDamage = Main.expertMode ? 230 : 400; //920
|
||||
int nadoSpawn = Projectile.NewProjectile(Projectile.GetSource_FromThis(), (float)(projTileY * 16 + 8), (float)(projTileX * 16 - 24), 0f, 0f, ModContent.ProjectileType<Infernado>(), nadoDamage, 4f, Main.myPlayer, 16f, 16f + (revenge ? 4f : 0f));
|
||||
Main.projectile[nadoSpawn].netUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,9 +47,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture2D13 = ModContent.Request<Texture2D>(Texture).Value;
|
||||
int num214 = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
int framing = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,9 +31,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.velocity.Length() < 12f)
|
||||
Projectile.velocity *= 1.01f;
|
||||
|
||||
int num104 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y),
|
||||
int vileDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y),
|
||||
Projectile.width, Projectile.height, (int)CalamityDusts.SulfurousSeaAcid, Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 100, default, 1.5f);
|
||||
Main.dust[num104].noGravity = true;
|
||||
Main.dust[vileDust].noGravity = true;
|
||||
|
||||
Projectile.rotation += 0.3f * (float)Projectile.direction;
|
||||
}
|
||||
@@ -49,14 +49,14 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item10, Projectile.Center);
|
||||
for (int num584 = 0; num584 < 6; num584++)
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
int num585 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.SulfurousSeaAcid, -Projectile.velocity.X * 0.2f, -Projectile.velocity.Y * 0.2f, 100, default, 2.5f);
|
||||
Main.dust[num585].noGravity = true;
|
||||
Dust dust = Main.dust[num585];
|
||||
int killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.SulfurousSeaAcid, -Projectile.velocity.X * 0.2f, -Projectile.velocity.Y * 0.2f, 100, default, 2.5f);
|
||||
Main.dust[killDust].noGravity = true;
|
||||
Dust dust = Main.dust[killDust];
|
||||
dust.velocity *= 2f;
|
||||
num585 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.SulfurousSeaAcid, -Projectile.velocity.X * 0.2f, -Projectile.velocity.Y * 0.2f, 100, default, 1.2f);
|
||||
dust = Main.dust[num585];
|
||||
killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.SulfurousSeaAcid, -Projectile.velocity.X * 0.2f, -Projectile.velocity.Y * 0.2f, 100, default, 1.2f);
|
||||
dust = Main.dust[killDust];
|
||||
dust.velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,14 +45,14 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
if (Projectile.ai[1] == 0f)
|
||||
{
|
||||
for (int num621 = 0; num621 < 10; num621++)
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 33, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int waterDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 33, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[waterDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[waterDust].scale = 0.5f;
|
||||
Main.dust[waterDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
Projectile.ai[1] = 1f;
|
||||
|
||||
@@ -1014,11 +1014,68 @@ namespace CalamityMod.Projectiles
|
||||
|
||||
if (CalamityWorld.revenge || BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (projectile.type == ProjectileID.DeerclopsIceSpike)
|
||||
{
|
||||
int dustType = 16;
|
||||
float dustVelocityMultiplier = 0.75f;
|
||||
int numDust = 5;
|
||||
int numDust2 = 5;
|
||||
int fadeInTime = 10;
|
||||
int fadeOutGateValue = 10;
|
||||
float killGateValue = 20f;
|
||||
int maxFrames = 5;
|
||||
|
||||
bool fadeIn = projectile.ai[0] < (float)fadeInTime;
|
||||
bool fadeOut = projectile.ai[0] >= (float)fadeOutGateValue;
|
||||
bool killProjectile = projectile.ai[0] >= killGateValue;
|
||||
projectile.ai[0] += 1f;
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.localAI[0] = 1f;
|
||||
projectile.rotation = projectile.velocity.ToRotation();
|
||||
projectile.frame = Main.rand.Next(maxFrames);
|
||||
|
||||
for (int i = 0; i < numDust; i++)
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(projectile.Center + Main.rand.NextVector2Circular(24f, 24f), dustType, projectile.velocity * dustVelocityMultiplier * MathHelper.Lerp(0.2f, 0.7f, Main.rand.NextFloat()));
|
||||
dust.velocity += Main.rand.NextVector2Circular(0.5f, 0.5f);
|
||||
dust.scale = 0.8f + Main.rand.NextFloat() * 0.5f;
|
||||
}
|
||||
|
||||
for (int j = 0; j < numDust2; j++)
|
||||
{
|
||||
Dust dust2 = Dust.NewDustPerfect(projectile.Center + Main.rand.NextVector2Circular(24f, 24f), dustType, Main.rand.NextVector2Circular(2f, 2f) + projectile.velocity * dustVelocityMultiplier * MathHelper.Lerp(0.2f, 0.5f, Main.rand.NextFloat()));
|
||||
dust2.velocity += Main.rand.NextVector2Circular(0.5f, 0.5f);
|
||||
dust2.scale = 0.8f + Main.rand.NextFloat() * 0.5f;
|
||||
dust2.fadeIn = 1f;
|
||||
}
|
||||
|
||||
SoundEngine.PlaySound(SoundID.DeerclopsIceAttack, projectile.Center);
|
||||
}
|
||||
|
||||
if (fadeIn)
|
||||
{
|
||||
projectile.Opacity += 0.1f;
|
||||
projectile.scale = projectile.Opacity * projectile.ai[1];
|
||||
}
|
||||
|
||||
if (fadeOut)
|
||||
projectile.Opacity -= 0.2f;
|
||||
|
||||
if (killProjectile)
|
||||
projectile.Kill();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Override Deerclops rubble behavior to create a wave of rubble instead of it all flying up at the same time
|
||||
// Rubble doesn't deal damage if it's not moving
|
||||
if (projectile.type == ProjectileID.DeerclopsRangedProjectile)
|
||||
else if (projectile.type == ProjectileID.DeerclopsRangedProjectile)
|
||||
{
|
||||
projectile.ai[0] += 1f;
|
||||
|
||||
projectile.frame = (int)projectile.ai[1];
|
||||
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.localAI[0] = 1f;
|
||||
@@ -2709,6 +2766,12 @@ namespace CalamityMod.Projectiles
|
||||
|
||||
switch (projectile.type)
|
||||
{
|
||||
// Rev+ Deerclops ice spikes can only deal damage while they're not fading out
|
||||
case ProjectileID.DeerclopsIceSpike:
|
||||
if (CalamityWorld.revenge || BossRushEvent.BossRushActive)
|
||||
return projectile.ai[0] < 10f;
|
||||
break;
|
||||
|
||||
// Rev+ Deerclops rubble doesn't deal damage while it's not flying upwards
|
||||
case ProjectileID.DeerclopsRangedProjectile:
|
||||
if (CalamityWorld.revenge || BossRushEvent.BossRushActive)
|
||||
|
||||
@@ -32,8 +32,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
if (SoundEngine.TryGetActiveSound(gatlingLaserLoopID, out var ShootingSound) && ShootingSound.IsPlaying)
|
||||
ShootingSound.Position = Projectile.Center;
|
||||
Player player = Main.player[Projectile.owner];
|
||||
float num = MathHelper.PiOver2;
|
||||
Vector2 vector = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
Vector2 playerRotation = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
if (Projectile.type == ModContent.ProjectileType<GatlingLaserProj>())
|
||||
{
|
||||
if (Projectile.ai[0] < 5f)
|
||||
@@ -82,26 +81,26 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
if (stillInUse && hasMana && hasCharge)
|
||||
{
|
||||
float scaleFactor = player.ActiveItem().shootSpeed * Projectile.scale;
|
||||
Vector2 value2 = vector;
|
||||
Vector2 value3 = Main.screenPosition + new Vector2(Main.mouseX, Main.mouseY) - value2;
|
||||
Vector2 laserDirection = playerRotation;
|
||||
Vector2 aimDirection = Main.screenPosition + new Vector2(Main.mouseX, Main.mouseY) - laserDirection;
|
||||
if (player.gravDir == -1f)
|
||||
{
|
||||
value3.Y = Main.screenHeight - Main.mouseY + Main.screenPosition.Y - value2.Y;
|
||||
aimDirection.Y = Main.screenHeight - Main.mouseY + Main.screenPosition.Y - laserDirection.Y;
|
||||
}
|
||||
Vector2 vector3 = Vector2.Normalize(value3);
|
||||
if (float.IsNaN(vector3.X) || float.IsNaN(vector3.Y))
|
||||
Vector2 projVelocity = Vector2.Normalize(aimDirection);
|
||||
if (float.IsNaN(projVelocity.X) || float.IsNaN(projVelocity.Y))
|
||||
{
|
||||
vector3 = -Vector2.UnitY;
|
||||
projVelocity = -Vector2.UnitY;
|
||||
}
|
||||
vector3 *= scaleFactor;
|
||||
if (vector3.X != Projectile.velocity.X || vector3.Y != Projectile.velocity.Y)
|
||||
projVelocity *= scaleFactor;
|
||||
if (projVelocity.X != Projectile.velocity.X || projVelocity.Y != Projectile.velocity.Y)
|
||||
{
|
||||
Projectile.netUpdate = true;
|
||||
}
|
||||
Projectile.velocity = vector3;
|
||||
Projectile.velocity = projVelocity;
|
||||
int type = ModContent.ProjectileType<GatlingLaserShot>();
|
||||
float velocity = 3f;
|
||||
value2 = Projectile.Center;
|
||||
laserDirection = Projectile.Center;
|
||||
Vector2 spinningpoint = Vector2.Normalize(Projectile.velocity) * velocity;
|
||||
|
||||
double spread = Math.PI / 32D;
|
||||
@@ -111,19 +110,19 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
{
|
||||
spinningpoint = -Vector2.UnitY;
|
||||
}
|
||||
Vector2 velocity2 = new Vector2(spinningpoint.X, spinningpoint.Y);
|
||||
if (velocity2.Length() > 5f)
|
||||
Vector2 projVelocitySpread = new Vector2(spinningpoint.X, spinningpoint.Y);
|
||||
if (projVelocitySpread.Length() > 5f)
|
||||
{
|
||||
velocity2.Normalize();
|
||||
velocity2 *= 5f;
|
||||
projVelocitySpread.Normalize();
|
||||
projVelocitySpread *= 5f;
|
||||
}
|
||||
float SpeedX = velocity2.X + Main.rand.Next(-1, 2) * 0.005f;
|
||||
float SpeedY = velocity2.Y + Main.rand.Next(-1, 2) * 0.005f;
|
||||
float SpeedX = projVelocitySpread.X + Main.rand.Next(-1, 2) * 0.005f;
|
||||
float SpeedY = projVelocitySpread.Y + Main.rand.Next(-1, 2) * 0.005f;
|
||||
float ai0 = Projectile.ai[0] - 2f; // 0, 1, or 2
|
||||
|
||||
// Use charge when firing a laser.
|
||||
modItem.Charge -= GatlingLaser.HoldoutChargeUse;
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), value2.X, value2.Y, SpeedX, SpeedY, type, currentDamage, Projectile.knockBack, Projectile.owner, ai0, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), laserDirection.X, laserDirection.Y, SpeedX, SpeedY, type, currentDamage, Projectile.knockBack, Projectile.owner, ai0, 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -137,7 +136,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
}
|
||||
}
|
||||
Projectile.position = player.RotatedRelativePoint(player.MountedCenter, true) - Projectile.Size / 2f;
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() + num;
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
Projectile.spriteDirection = Projectile.direction;
|
||||
Projectile.timeLeft = 2;
|
||||
player.ChangeDir(Projectile.direction);
|
||||
|
||||
@@ -55,31 +55,29 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
|
||||
LaserBurst(2.4f, 4.2f); // 60 dusts
|
||||
|
||||
int num3;
|
||||
for (int num640 = 0; num640 < 100; num640 = num3 + 1)
|
||||
int inc;
|
||||
for (int i = 0; i < 100; i = inc + 1)
|
||||
{
|
||||
float num641 = 4f;
|
||||
int gatlingDust = Dust.NewDust(Projectile.Center, 6, 6, dust, 0f, 0f, 100, default, 1f);
|
||||
float dustVelX = Main.dust[gatlingDust].velocity.X;
|
||||
float dustVelY = Main.dust[gatlingDust].velocity.Y;
|
||||
|
||||
int num643 = Dust.NewDust(Projectile.Center, 6, 6, dust, 0f, 0f, 100, default, 1f);
|
||||
float num644 = Main.dust[num643].velocity.X;
|
||||
float num645 = Main.dust[num643].velocity.Y;
|
||||
if (dustVelX == 0f && dustVelY == 0f)
|
||||
dustVelX = 1f;
|
||||
|
||||
if (num644 == 0f && num645 == 0f)
|
||||
num644 = 1f;
|
||||
float dustVelocity = (float)Math.Sqrt(dustVelX * dustVelX + dustVelY * dustVelY);
|
||||
dustVelocity = 4f / dustVelocity;
|
||||
dustVelX *= dustVelocity;
|
||||
dustVelY *= dustVelocity;
|
||||
|
||||
float num646 = (float)Math.Sqrt(num644 * num644 + num645 * num645);
|
||||
num646 = num641 / num646;
|
||||
num644 *= num646;
|
||||
num645 *= num646;
|
||||
|
||||
Dust dust2 = Main.dust[num643];
|
||||
Dust dust2 = Main.dust[gatlingDust];
|
||||
dust2.velocity *= 0.5f;
|
||||
dust2.velocity.X = dust2.velocity.X + num644;
|
||||
dust2.velocity.Y = dust2.velocity.Y + num645;
|
||||
dust2.velocity.X = dust2.velocity.X + dustVelX;
|
||||
dust2.velocity.Y = dust2.velocity.Y + dustVelY;
|
||||
dust2.scale = 0.66f;
|
||||
dust2.noGravity = true;
|
||||
|
||||
num3 = num640;
|
||||
inc = i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,52 +85,52 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
{
|
||||
float angleRandom = 0.05f;
|
||||
|
||||
int num3;
|
||||
for (int num53 = 0; num53 < 4; num53 = num3 + 1)
|
||||
int inc;
|
||||
for (int j = 0; j < 4; j = inc + 1)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
dustVel = dustVel.RotatedBy(-angleRandom);
|
||||
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
|
||||
|
||||
int num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 200, default, 0.9f);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[num54].noGravity = true;
|
||||
int burstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 200, default, 0.9f);
|
||||
Main.dust[burstDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[burstDust].noGravity = true;
|
||||
|
||||
Dust dust2 = Main.dust[num54];
|
||||
Dust dust2 = Main.dust[burstDust];
|
||||
dust2.velocity *= 3f;
|
||||
dust2 = Main.dust[num54];
|
||||
dust2 = Main.dust[burstDust];
|
||||
|
||||
num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 100, default, 0.66f);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
burstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 100, default, 0.66f);
|
||||
Main.dust[burstDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
|
||||
dust2 = Main.dust[num54];
|
||||
dust2 = Main.dust[burstDust];
|
||||
dust2.velocity *= 2f;
|
||||
|
||||
Main.dust[num54].noGravity = true;
|
||||
Main.dust[num54].fadeIn = 1f;
|
||||
Main.dust[num54].color = Color.Crimson * 0.5f;
|
||||
Main.dust[burstDust].noGravity = true;
|
||||
Main.dust[burstDust].fadeIn = 1f;
|
||||
Main.dust[burstDust].color = Color.Crimson * 0.5f;
|
||||
|
||||
dust2 = Main.dust[num54];
|
||||
dust2 = Main.dust[burstDust];
|
||||
|
||||
num3 = num53;
|
||||
inc = j;
|
||||
}
|
||||
for (int num55 = 0; num55 < 2; num55 = num3 + 1)
|
||||
for (int k = 0; k < 2; k = inc + 1)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
dustVel = dustVel.RotatedBy(-angleRandom);
|
||||
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
|
||||
|
||||
int num56 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 0, default, 1.2f);
|
||||
Main.dust[num56].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[num56].noGravity = true;
|
||||
int moreBurstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 0, default, 1.2f);
|
||||
Main.dust[moreBurstDust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[moreBurstDust].noGravity = true;
|
||||
|
||||
Dust dust2 = Main.dust[num56];
|
||||
Dust dust2 = Main.dust[moreBurstDust];
|
||||
dust2.velocity *= 0.5f;
|
||||
dust2 = Main.dust[num56];
|
||||
dust2 = Main.dust[moreBurstDust];
|
||||
|
||||
num3 = num55;
|
||||
inc = k;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,15 +32,12 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
Projectile.localAI[0] += 1f;
|
||||
if (Projectile.localAI[0] > createDustVar)
|
||||
{
|
||||
Vector2 value7 = new Vector2(5f, 10f);
|
||||
Vector2 value8 = Vector2.UnitX * -12f;
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int num41 = Dust.NewDust(Projectile.Center, 0, 0, dust, 0f, 0f, 160, Projectile.ai[0] == 0f ? default : new Color(255, 255, 0), 2f);
|
||||
Main.dust[num41].noGravity = true;
|
||||
Main.dust[num41].position = Projectile.Center;
|
||||
Main.dust[num41].velocity = Projectile.velocity;
|
||||
int laserDust = Dust.NewDust(Projectile.Center, 0, 0, dust, 0f, 0f, 160, Projectile.ai[0] == 0f ? default : new Color(255, 255, 0), 2f);
|
||||
Main.dust[laserDust].noGravity = true;
|
||||
Main.dust[laserDust].position = Projectile.Center;
|
||||
Main.dust[laserDust].velocity = Projectile.velocity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,26 +59,24 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
|
||||
LaserBurst(2.4f, 4.2f); // 60 dusts
|
||||
|
||||
for (int num640 = 0; num640 < 100; num640++)
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
float num641 = 4f;
|
||||
int killDust = Dust.NewDust(Projectile.Center, 6, 6, dust, 0f, 0f, 100, default, 2f);
|
||||
float killDustX = Main.dust[killDust].velocity.X;
|
||||
float killDustY = Main.dust[killDust].velocity.Y;
|
||||
|
||||
int num643 = Dust.NewDust(Projectile.Center, 6, 6, dust, 0f, 0f, 100, default, 2f);
|
||||
float num644 = Main.dust[num643].velocity.X;
|
||||
float num645 = Main.dust[num643].velocity.Y;
|
||||
if (killDustX == 0f && killDustY == 0f)
|
||||
killDustX = 1f;
|
||||
|
||||
if (num644 == 0f && num645 == 0f)
|
||||
num644 = 1f;
|
||||
float killDustVelocity = (float)Math.Sqrt(killDustX * killDustX + killDustY * killDustY);
|
||||
killDustVelocity = 4f / killDustVelocity;
|
||||
killDustX *= killDustVelocity;
|
||||
killDustY *= killDustVelocity;
|
||||
|
||||
float num646 = (float)Math.Sqrt(num644 * num644 + num645 * num645);
|
||||
num646 = num641 / num646;
|
||||
num644 *= num646;
|
||||
num645 *= num646;
|
||||
|
||||
Dust dust2 = Main.dust[num643];
|
||||
Dust dust2 = Main.dust[killDust];
|
||||
dust2.velocity *= 0.5f;
|
||||
dust2.velocity.X = dust2.velocity.X + num644;
|
||||
dust2.velocity.Y = dust2.velocity.Y + num645;
|
||||
dust2.velocity.X = dust2.velocity.X + killDustX;
|
||||
dust2.velocity.Y = dust2.velocity.Y + killDustY;
|
||||
dust2.noGravity = true;
|
||||
}
|
||||
}
|
||||
@@ -90,47 +85,47 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
{
|
||||
float angleRandom = 0.05f;
|
||||
|
||||
for (int num53 = 0; num53 < 20; num53++)
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
dustVel = dustVel.RotatedBy(-angleRandom);
|
||||
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
|
||||
|
||||
int num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 200, default, 2.5f);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[num54].noGravity = true;
|
||||
int burstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 200, default, 2.5f);
|
||||
Main.dust[burstDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[burstDust].noGravity = true;
|
||||
|
||||
Dust dust2 = Main.dust[num54];
|
||||
Dust dust2 = Main.dust[burstDust];
|
||||
dust2.velocity *= 3f;
|
||||
dust2 = Main.dust[num54];
|
||||
dust2 = Main.dust[burstDust];
|
||||
|
||||
num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 100, default, 1.9f);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
burstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 100, default, 1.9f);
|
||||
Main.dust[burstDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
|
||||
dust2 = Main.dust[num54];
|
||||
dust2 = Main.dust[burstDust];
|
||||
dust2.velocity *= 2f;
|
||||
|
||||
Main.dust[num54].noGravity = true;
|
||||
Main.dust[num54].fadeIn = 1f;
|
||||
Main.dust[num54].color = Color.Orange * 0.5f;
|
||||
Main.dust[burstDust].noGravity = true;
|
||||
Main.dust[burstDust].fadeIn = 1f;
|
||||
Main.dust[burstDust].color = Color.Orange * 0.5f;
|
||||
|
||||
dust2 = Main.dust[num54];
|
||||
dust2 = Main.dust[burstDust];
|
||||
}
|
||||
for (int num55 = 0; num55 < 10; num55++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
dustVel = dustVel.RotatedBy(-angleRandom);
|
||||
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
|
||||
|
||||
int num56 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 0, default, 3.2f);
|
||||
Main.dust[num56].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[num56].noGravity = true;
|
||||
int burstDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 0, default, 3.2f);
|
||||
Main.dust[burstDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[burstDust2].noGravity = true;
|
||||
|
||||
Dust dust2 = Main.dust[num56];
|
||||
Dust dust2 = Main.dust[burstDust2];
|
||||
dust2.velocity *= 0.5f;
|
||||
dust2 = Main.dust[num56];
|
||||
dust2 = Main.dust[burstDust2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,15 +36,15 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
Projectile.localAI[0] += 1f;
|
||||
if (Projectile.localAI[0] > createDustVar)
|
||||
{
|
||||
for (int num447 = 0; num447 < 2; num447++)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Vector2 vector33 = Projectile.position;
|
||||
vector33 -= Projectile.velocity * (num447 * 0.25f);
|
||||
int num448 = Dust.NewDust(vector33, 1, 1, dustTypeOnTimer, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num448].noGravity = true;
|
||||
Main.dust[num448].position = vector33;
|
||||
Main.dust[num448].scale = Main.rand.Next(70, 110) * 0.013f;
|
||||
Main.dust[num448].velocity *= 0.2f;
|
||||
Vector2 dustRotation = Projectile.position;
|
||||
dustRotation -= Projectile.velocity * (i * 0.25f);
|
||||
int dustSpawn = Dust.NewDust(dustRotation, 1, 1, dustTypeOnTimer, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dustSpawn].noGravity = true;
|
||||
Main.dust[dustSpawn].position = dustRotation;
|
||||
Main.dust[dustSpawn].scale = Main.rand.Next(70, 110) * 0.013f;
|
||||
Main.dust[dustSpawn].velocity *= 0.2f;
|
||||
}
|
||||
|
||||
Projectile.ai[0] += 1f;
|
||||
@@ -59,28 +59,28 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector2 value7 = new Vector2(5f, 10f);
|
||||
Vector2 dustRotateVector = new Vector2(5f, 10f);
|
||||
|
||||
for (int num41 = 0; num41 < 2; num41++)
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
Vector2 value8 = Vector2.UnitX * -12f;
|
||||
value8 = -Vector2.UnitY.RotatedBy(Projectile.ai[0] * 0.1308997f + num41 * MathHelper.Pi) * value7 * 0.75f;
|
||||
int num42 = Dust.NewDust(Projectile.Center, 0, 0, dust1, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[num42].scale = 0.6f;
|
||||
Main.dust[num42].noGravity = true;
|
||||
Main.dust[num42].position = Projectile.Center + value8;
|
||||
Main.dust[num42].velocity = Projectile.velocity;
|
||||
Vector2 dustRotate = Vector2.UnitX * -12f;
|
||||
dustRotate = -Vector2.UnitY.RotatedBy(Projectile.ai[0] * 0.1308997f + j * MathHelper.Pi) * dustRotateVector * 0.75f;
|
||||
int plasmaDust = Dust.NewDust(Projectile.Center, 0, 0, dust1, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[plasmaDust].scale = 0.6f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
Main.dust[plasmaDust].position = Projectile.Center + dustRotate;
|
||||
Main.dust[plasmaDust].velocity = Projectile.velocity;
|
||||
}
|
||||
|
||||
for (int num41 = 0; num41 < 2; num41++)
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
Vector2 value8 = Vector2.UnitX * -12f;
|
||||
value8 = -Vector2.UnitY.RotatedBy(Projectile.ai[0] * 0.1308997f + num41 * MathHelper.Pi) * value7 * 1.5f;
|
||||
int num42 = Dust.NewDust(Projectile.Center, 0, 0, dust2, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[num42].scale = 0.6f;
|
||||
Main.dust[num42].noGravity = true;
|
||||
Main.dust[num42].position = Projectile.Center + value8;
|
||||
Main.dust[num42].velocity = Projectile.velocity;
|
||||
Vector2 dustRotate = Vector2.UnitX * -12f;
|
||||
dustRotate = -Vector2.UnitY.RotatedBy(Projectile.ai[0] * 0.1308997f + j * MathHelper.Pi) * dustRotateVector * 1.5f;
|
||||
int plasmaDust = Dust.NewDust(Projectile.Center, 0, 0, dust2, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[plasmaDust].scale = 0.6f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
Main.dust[plasmaDust].position = Projectile.Center + dustRotate;
|
||||
Main.dust[plasmaDust].velocity = Projectile.velocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,30 +102,30 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
|
||||
PlasmaBurst(1.8f, 3.6f); // 60 dusts
|
||||
|
||||
for (int num640 = 0; num640 < 400; num640++)
|
||||
for (int i = 0; i < 400; i++)
|
||||
{
|
||||
float num641 = 16f;
|
||||
if (num640 < 300)
|
||||
num641 = 12f;
|
||||
if (num640 < 200)
|
||||
num641 = 8f;
|
||||
if (num640 < 100)
|
||||
num641 = 4f;
|
||||
float dustScale = 16f;
|
||||
if (i < 300)
|
||||
dustScale = 12f;
|
||||
if (i < 200)
|
||||
dustScale = 8f;
|
||||
if (i < 100)
|
||||
dustScale = 4f;
|
||||
|
||||
int num643 = Dust.NewDust(Projectile.Center, 6, 6, Main.rand.NextBool() ? dust1 : dust2, 0f, 0f, 100, default, 1f);
|
||||
float num644 = Main.dust[num643].velocity.X;
|
||||
float num645 = Main.dust[num643].velocity.Y;
|
||||
int deathDust = Dust.NewDust(Projectile.Center, 6, 6, Main.rand.NextBool() ? dust1 : dust2, 0f, 0f, 100, default, 1f);
|
||||
float deathDustX = Main.dust[deathDust].velocity.X;
|
||||
float deathDustY = Main.dust[deathDust].velocity.Y;
|
||||
|
||||
if (num644 == 0f && num645 == 0f)
|
||||
num644 = 1f;
|
||||
if (deathDustX == 0f && deathDustY == 0f)
|
||||
deathDustX = 1f;
|
||||
|
||||
float num646 = (float)Math.Sqrt(num644 * num644 + num645 * num645);
|
||||
num646 = num641 / num646;
|
||||
num644 *= num646;
|
||||
num645 *= num646;
|
||||
float deathDustVel = (float)Math.Sqrt(deathDustX * deathDustX + deathDustY * deathDustY);
|
||||
deathDustVel = dustScale / deathDustVel;
|
||||
deathDustX *= deathDustVel;
|
||||
deathDustY *= deathDustVel;
|
||||
|
||||
float scale = 1f;
|
||||
switch ((int)num641)
|
||||
switch ((int)dustScale)
|
||||
{
|
||||
case 4:
|
||||
scale = 1.2f;
|
||||
@@ -143,10 +143,10 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
break;
|
||||
}
|
||||
|
||||
Dust dust = Main.dust[num643];
|
||||
Dust dust = Main.dust[deathDust];
|
||||
dust.velocity *= 0.5f;
|
||||
dust.velocity.X = dust.velocity.X + num644;
|
||||
dust.velocity.Y = dust.velocity.Y + num645;
|
||||
dust.velocity.X = dust.velocity.X + deathDustX;
|
||||
dust.velocity.Y = dust.velocity.Y + deathDustY;
|
||||
dust.scale = scale;
|
||||
dust.noGravity = true;
|
||||
}
|
||||
@@ -156,7 +156,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
{
|
||||
float angleRandom = 0.35f;
|
||||
|
||||
for (int num53 = 0; num53 < 40; num53++)
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
@@ -164,27 +164,27 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
|
||||
int randomDustType = Main.rand.Next(2) == 0 ? dust1 : dust2;
|
||||
|
||||
int num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[num54].noGravity = true;
|
||||
int plasmaBurstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f);
|
||||
Main.dust[plasmaBurstDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[plasmaBurstDust].noGravity = true;
|
||||
|
||||
Dust dust = Main.dust[num54];
|
||||
Dust dust = Main.dust[plasmaBurstDust];
|
||||
dust.velocity *= 3f;
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[plasmaBurstDust];
|
||||
|
||||
num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
plasmaBurstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f);
|
||||
Main.dust[plasmaBurstDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[plasmaBurstDust];
|
||||
dust.velocity *= 2f;
|
||||
|
||||
Main.dust[num54].noGravity = true;
|
||||
Main.dust[num54].fadeIn = 1f;
|
||||
Main.dust[num54].color = Color.Green * 0.5f;
|
||||
Main.dust[plasmaBurstDust].noGravity = true;
|
||||
Main.dust[plasmaBurstDust].fadeIn = 1f;
|
||||
Main.dust[plasmaBurstDust].color = Color.Green * 0.5f;
|
||||
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[plasmaBurstDust];
|
||||
}
|
||||
for (int num55 = 0; num55 < 20; num55++)
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
@@ -192,13 +192,13 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
|
||||
int randomDustType = Main.rand.Next(2) == 0 ? dust1 : dust2;
|
||||
|
||||
int num56 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f);
|
||||
Main.dust[num56].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[num56].noGravity = true;
|
||||
int plasmaBurstDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f);
|
||||
Main.dust[plasmaBurstDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[plasmaBurstDust2].noGravity = true;
|
||||
|
||||
Dust dust = Main.dust[num56];
|
||||
Dust dust = Main.dust[plasmaBurstDust2];
|
||||
dust.velocity *= 0.5f;
|
||||
dust = Main.dust[num56];
|
||||
dust = Main.dust[plasmaBurstDust2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,42 +38,42 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
Projectile.localAI[0] += 1f;
|
||||
if (Projectile.localAI[0] > createDustVar)
|
||||
{
|
||||
for (int num447 = 0; num447 < 2; num447++)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Vector2 vector33 = Projectile.position;
|
||||
vector33 -= Projectile.velocity * (num447 * 0.25f);
|
||||
int num448 = Dust.NewDust(vector33, 1, 1, dust1, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num448].noGravity = true;
|
||||
Main.dust[num448].position = vector33;
|
||||
Main.dust[num448].scale = Main.rand.Next(70, 110) * 0.013f;
|
||||
Vector2 projPos = Projectile.position;
|
||||
projPos -= Projectile.velocity * (i * 0.25f);
|
||||
int purpleDust = Dust.NewDust(projPos, 1, 1, dust1, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[purpleDust].noGravity = true;
|
||||
Main.dust[purpleDust].position = projPos;
|
||||
Main.dust[purpleDust].scale = Main.rand.Next(70, 110) * 0.013f;
|
||||
|
||||
int num449 = Dust.NewDust(vector33, 1, 1, dust3, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num449].noGravity = true;
|
||||
Main.dust[num449].position = vector33;
|
||||
Main.dust[num449].scale = Main.rand.Next(70, 110) * 0.013f;
|
||||
int pinkDust = Dust.NewDust(projPos, 1, 1, dust3, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[pinkDust].noGravity = true;
|
||||
Main.dust[pinkDust].position = projPos;
|
||||
Main.dust[pinkDust].scale = Main.rand.Next(70, 110) * 0.013f;
|
||||
}
|
||||
|
||||
if (notSplitProjectile)
|
||||
{
|
||||
Vector2 value7 = new Vector2(5f, 10f);
|
||||
Vector2 value8 = Vector2.UnitX * -12f;
|
||||
Vector2 dustRotateVector = new Vector2(5f, 10f);
|
||||
Vector2 dustRotate = Vector2.UnitX * -12f;
|
||||
|
||||
for (int num41 = 0; num41 < 2; num41++)
|
||||
for (int k = 0; k < 2; k++)
|
||||
{
|
||||
value8 = -Vector2.UnitY.RotatedBy(24f * 0.1308997f + 0f * MathHelper.Pi) * value7;
|
||||
int num42 = Dust.NewDust(Projectile.Center, 0, 0, dust2, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[num42].scale = 1.5f;
|
||||
Main.dust[num42].noGravity = true;
|
||||
Main.dust[num42].position = Projectile.Center + value8;
|
||||
dustRotate = -Vector2.UnitY.RotatedBy(24f * 0.1308997f + 0f * MathHelper.Pi) * dustRotateVector;
|
||||
int darkPurpDust = Dust.NewDust(Projectile.Center, 0, 0, dust2, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[darkPurpDust].scale = 1.5f;
|
||||
Main.dust[darkPurpDust].noGravity = true;
|
||||
Main.dust[darkPurpDust].position = Projectile.Center + dustRotate;
|
||||
}
|
||||
|
||||
for (int num41 = 0; num41 < 2; num41++)
|
||||
for (int k = 0; k < 2; k++)
|
||||
{
|
||||
value8 = -Vector2.UnitY.RotatedBy(24f * 0.1308997f + 1f * MathHelper.Pi) * value7;
|
||||
int num42 = Dust.NewDust(Projectile.Center, 0, 0, dust2, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[num42].scale = 1.5f;
|
||||
Main.dust[num42].noGravity = true;
|
||||
Main.dust[num42].position = Projectile.Center + value8;
|
||||
dustRotate = -Vector2.UnitY.RotatedBy(24f * 0.1308997f + 1f * MathHelper.Pi) * dustRotateVector;
|
||||
int darkPurpDust = Dust.NewDust(Projectile.Center, 0, 0, dust2, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[darkPurpDust].scale = 1.5f;
|
||||
Main.dust[darkPurpDust].noGravity = true;
|
||||
Main.dust[darkPurpDust].position = Projectile.Center + dustRotate;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -153,47 +153,47 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
int half = totalDust / 2;
|
||||
int x = (int)(totalDust * 0.625f);
|
||||
|
||||
for (int num647 = 0; num647 < totalDust; num647++)
|
||||
for (int i = 0; i < totalDust; i++)
|
||||
{
|
||||
float num648 = 2f * (num647 / (float)fourth);
|
||||
float dustSpeed = 2f * (i / (float)fourth);
|
||||
int dustType = dust1;
|
||||
if (num647 > fourth)
|
||||
if (i > fourth)
|
||||
{
|
||||
num648 = speed1;
|
||||
dustSpeed = speed1;
|
||||
}
|
||||
if (num647 > x)
|
||||
if (i > x)
|
||||
{
|
||||
num648 = speed1 * 1.3f;
|
||||
dustSpeed = speed1 * 1.3f;
|
||||
dustType = dust3;
|
||||
}
|
||||
|
||||
int num650 = Dust.NewDust(Projectile.Center, 6, 6, dustType, 0f, 0f, 100, default, 1f);
|
||||
float num651 = Main.dust[num650].velocity.X;
|
||||
float num652 = Main.dust[num650].velocity.Y;
|
||||
if (num651 == 0f && num652 == 0f)
|
||||
int killDust = Dust.NewDust(Projectile.Center, 6, 6, dustType, 0f, 0f, 100, default, 1f);
|
||||
float killDustX = Main.dust[killDust].velocity.X;
|
||||
float killDustY = Main.dust[killDust].velocity.Y;
|
||||
if (killDustX == 0f && killDustY == 0f)
|
||||
{
|
||||
num651 = 1f;
|
||||
killDustX = 1f;
|
||||
}
|
||||
|
||||
float num653 = (float)Math.Sqrt(num651 * num651 + num652 * num652);
|
||||
num653 = num648 / num653;
|
||||
if (num647 <= half)
|
||||
float killDustYVel = (float)Math.Sqrt(killDustX * killDustX + killDustY * killDustY);
|
||||
killDustYVel = dustSpeed / killDustYVel;
|
||||
if (i <= half)
|
||||
{
|
||||
num651 *= num653;
|
||||
num652 *= num653;
|
||||
killDustX *= killDustYVel;
|
||||
killDustY *= killDustYVel;
|
||||
}
|
||||
else
|
||||
{
|
||||
num651 = num651 * num653 * 1.25f;
|
||||
num652 = num652 * num653 * 0.75f;
|
||||
killDustX = killDustX * killDustYVel * 1.25f;
|
||||
killDustY = killDustY * killDustYVel * 0.75f;
|
||||
}
|
||||
|
||||
Dust dust2 = Main.dust[num650];
|
||||
Dust dust2 = Main.dust[killDust];
|
||||
dust2.velocity *= 0.5f;
|
||||
dust2.velocity.X = dust2.velocity.X + num651;
|
||||
dust2.velocity.Y = dust2.velocity.Y + num652;
|
||||
dust2.velocity.X = dust2.velocity.X + killDustX;
|
||||
dust2.velocity.Y = dust2.velocity.Y + killDustY;
|
||||
|
||||
if (num647 > fourth)
|
||||
if (i > fourth)
|
||||
{
|
||||
dust2.scale = 1.3f;
|
||||
}
|
||||
@@ -206,47 +206,47 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
{
|
||||
float angleRandom = 0.05f;
|
||||
|
||||
for (int num53 = 0; num53 < 50; num53++)
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
dustVel = dustVel.RotatedBy(-angleRandom);
|
||||
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
|
||||
|
||||
int num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust3, dustVel.X, dustVel.Y, 200, default, 1.7f);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[num54].noGravity = true;
|
||||
int pulseDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust3, dustVel.X, dustVel.Y, 200, default, 1.7f);
|
||||
Main.dust[pulseDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[pulseDust].noGravity = true;
|
||||
|
||||
Dust dust = Main.dust[num54];
|
||||
Dust dust = Main.dust[pulseDust];
|
||||
dust.velocity *= 3f;
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[pulseDust];
|
||||
|
||||
num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust1, dustVel.X, dustVel.Y, 100, default, 1f);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
pulseDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust1, dustVel.X, dustVel.Y, 100, default, 1f);
|
||||
Main.dust[pulseDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[pulseDust];
|
||||
dust.velocity *= 2f;
|
||||
|
||||
Main.dust[num54].noGravity = true;
|
||||
Main.dust[num54].fadeIn = 1f;
|
||||
Main.dust[num54].color = Color.Green * 0.5f;
|
||||
Main.dust[pulseDust].noGravity = true;
|
||||
Main.dust[pulseDust].fadeIn = 1f;
|
||||
Main.dust[pulseDust].color = Color.Green * 0.5f;
|
||||
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[pulseDust];
|
||||
}
|
||||
for (int num55 = 0; num55 < 25; num55++)
|
||||
for (int j = 0; j < 25; j++)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
dustVel = dustVel.RotatedBy(-angleRandom);
|
||||
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
|
||||
|
||||
int num56 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust2, dustVel.X, dustVel.Y, 0, default, 3f);
|
||||
Main.dust[num56].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[num56].noGravity = true;
|
||||
int pulseDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust2, dustVel.X, dustVel.Y, 0, default, 3f);
|
||||
Main.dust[pulseDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[pulseDust2].noGravity = true;
|
||||
|
||||
Dust dust = Main.dust[num56];
|
||||
Dust dust = Main.dust[pulseDust2];
|
||||
dust.velocity *= 0.5f;
|
||||
dust = Main.dust[num56];
|
||||
dust = Main.dust[pulseDust2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,14 +37,14 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
Projectile.localAI[0] += 1f;
|
||||
if (Projectile.localAI[0] > createDustVar)
|
||||
{
|
||||
for (int num447 = 0; num447 < 2; num447++)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Vector2 vector33 = Projectile.position;
|
||||
vector33 -= Projectile.velocity * (num447 * 0.25f);
|
||||
int num448 = Dust.NewDust(vector33, 1, 1, dustArray[3], 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num448].noGravity = true;
|
||||
Main.dust[num448].position = vector33;
|
||||
Main.dust[num448].scale = Main.rand.Next(70, 110) * 0.026f;
|
||||
Vector2 projPos = Projectile.position;
|
||||
projPos -= Projectile.velocity * (i * 0.25f);
|
||||
int teslaDust = Dust.NewDust(projPos, 1, 1, dustArray[3], 0f, 0f, 0, default, 1f);
|
||||
Main.dust[teslaDust].noGravity = true;
|
||||
Main.dust[teslaDust].position = projPos;
|
||||
Main.dust[teslaDust].scale = Main.rand.Next(70, 110) * 0.026f;
|
||||
}
|
||||
|
||||
if (Main.rand.Next(6) == 0)
|
||||
@@ -60,35 +60,35 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
Projectile.ai[0] = 0f;
|
||||
else
|
||||
{
|
||||
Vector2 value7 = new Vector2(5f, 10f);
|
||||
Vector2 value8 = Vector2.UnitX * -12f;
|
||||
Vector2 dustRotateVector = new Vector2(5f, 10f);
|
||||
Vector2 dustRotate = Vector2.UnitX * -12f;
|
||||
float scale = 1f;
|
||||
|
||||
for (int num41 = 0; num41 < 2; num41++)
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
value8 = -Vector2.UnitY.RotatedBy(Projectile.ai[0] * 0.1308997f + num41 * MathHelper.Pi) * value7;
|
||||
int num42 = Dust.NewDust(Projectile.Center, 0, 0, dustArray[2], 0f, 0f, 160, default, 1f);
|
||||
Main.dust[num42].scale = scale;
|
||||
Main.dust[num42].noGravity = true;
|
||||
Main.dust[num42].position = Projectile.Center + value8;
|
||||
dustRotate = -Vector2.UnitY.RotatedBy(Projectile.ai[0] * 0.1308997f + j * MathHelper.Pi) * dustRotateVector;
|
||||
int lightBlueDust = Dust.NewDust(Projectile.Center, 0, 0, dustArray[2], 0f, 0f, 160, default, 1f);
|
||||
Main.dust[lightBlueDust].scale = scale;
|
||||
Main.dust[lightBlueDust].noGravity = true;
|
||||
Main.dust[lightBlueDust].position = Projectile.Center + dustRotate;
|
||||
}
|
||||
|
||||
for (int num41 = 0; num41 < 2; num41++)
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
value8 = -Vector2.UnitY.RotatedBy(Projectile.ai[0] * 0.1308997f + num41 * MathHelper.Pi) * value7 * 1.5f;
|
||||
int num42 = Dust.NewDust(Projectile.Center, 0, 0, dustArray[1], 0f, 0f, 160, default, 1f);
|
||||
Main.dust[num42].scale = scale;
|
||||
Main.dust[num42].noGravity = true;
|
||||
Main.dust[num42].position = Projectile.Center + value8;
|
||||
dustRotate = -Vector2.UnitY.RotatedBy(Projectile.ai[0] * 0.1308997f + j * MathHelper.Pi) * dustRotateVector * 1.5f;
|
||||
int lightBlueDust = Dust.NewDust(Projectile.Center, 0, 0, dustArray[1], 0f, 0f, 160, default, 1f);
|
||||
Main.dust[lightBlueDust].scale = scale;
|
||||
Main.dust[lightBlueDust].noGravity = true;
|
||||
Main.dust[lightBlueDust].position = Projectile.Center + dustRotate;
|
||||
}
|
||||
|
||||
for (int num41 = 0; num41 < 2; num41++)
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
value8 = -Vector2.UnitY.RotatedBy(Projectile.ai[0] * 0.1308997f + num41 * MathHelper.Pi) * value7 * 2f;
|
||||
int num42 = Dust.NewDust(Projectile.Center, 0, 0, dustArray[0], 0f, 0f, 160, default, 1f);
|
||||
Main.dust[num42].scale = scale;
|
||||
Main.dust[num42].noGravity = true;
|
||||
Main.dust[num42].position = Projectile.Center + value8;
|
||||
dustRotate = -Vector2.UnitY.RotatedBy(Projectile.ai[0] * 0.1308997f + j * MathHelper.Pi) * dustRotateVector * 2f;
|
||||
int lightBlueDust = Dust.NewDust(Projectile.Center, 0, 0, dustArray[0], 0f, 0f, 160, default, 1f);
|
||||
Main.dust[lightBlueDust].scale = scale;
|
||||
Main.dust[lightBlueDust].noGravity = true;
|
||||
Main.dust[lightBlueDust].position = Projectile.Center + dustRotate;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,15 +96,12 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
{
|
||||
if (arcs < 10)
|
||||
{
|
||||
Vector2 vector35 = new Vector2(Projectile.position.X + Projectile.width * 0.5f, Projectile.position.Y + Projectile.height * 0.5f);
|
||||
float num474 = 600f;
|
||||
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (!Main.npc[i].CanBeChasedBy(Projectile, false) || !Collision.CanHit(Projectile.Center, 1, 1, Main.npc[i].Center, 1, 1))
|
||||
continue;
|
||||
|
||||
if (Projectile.Center.ManhattanDistance(Main.npc[i].Center) < num474)
|
||||
if (Projectile.Center.ManhattanDistance(Main.npc[i].Center) < 600f)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.SafeDirectionTo(Main.npc[i].Center) * 2f, Projectile.type, (int)(Projectile.damage * 0.6), Projectile.knockBack * 0.6f, Projectile.owner, 0f, -1f);
|
||||
|
||||
@@ -146,81 +143,81 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
|
||||
float dustSpeed = notArcingProjectile ? 12f : 6f;
|
||||
|
||||
for (int num672 = 0; num672 < dustAmt; num672++)
|
||||
for (int i = 0; i < dustAmt; i++)
|
||||
{
|
||||
int dustType = dustArray[4];
|
||||
float num674 = dustSpeed;
|
||||
if (num672 > fourth)
|
||||
float deathDustSpeed = dustSpeed;
|
||||
if (i > fourth)
|
||||
{
|
||||
num674 = dustSpeed * 0.6875f;
|
||||
deathDustSpeed = dustSpeed * 0.6875f;
|
||||
dustType = dustArray[5];
|
||||
}
|
||||
if (num672 > half)
|
||||
if (i > half)
|
||||
{
|
||||
num674 = dustSpeed * 0.5f;
|
||||
deathDustSpeed = dustSpeed * 0.5f;
|
||||
dustType = dustArray[4];
|
||||
}
|
||||
if (num672 > threeFourths)
|
||||
if (i > threeFourths)
|
||||
{
|
||||
num674 = dustSpeed * 0.3125f;
|
||||
deathDustSpeed = dustSpeed * 0.3125f;
|
||||
dustType = dustArray[5];
|
||||
}
|
||||
float scale = (dustType == dustArray[4] ? 3f : 1.5f);
|
||||
|
||||
int num675 = Dust.NewDust(Projectile.Center, 6, 6, dustType, 0f, 0f, 100, default, scale);
|
||||
float num676 = Main.dust[num675].velocity.X;
|
||||
float num677 = Main.dust[num675].velocity.Y;
|
||||
int deathDarkBlue = Dust.NewDust(Projectile.Center, 6, 6, dustType, 0f, 0f, 100, default, scale);
|
||||
float deathDustX = Main.dust[deathDarkBlue].velocity.X;
|
||||
float deathDustY = Main.dust[deathDarkBlue].velocity.Y;
|
||||
|
||||
if (num676 == 0f && num677 == 0f)
|
||||
num676 = 1f;
|
||||
if (deathDustX == 0f && deathDustY == 0f)
|
||||
deathDustX = 1f;
|
||||
|
||||
float num678 = (float)Math.Sqrt(num676 * num676 + num677 * num677);
|
||||
num678 = num674 / num678;
|
||||
if (num672 > threeFourths)
|
||||
float deathDustVel = (float)Math.Sqrt(deathDustX * deathDustX + deathDustY * deathDustY);
|
||||
deathDustVel = deathDustSpeed / deathDustVel;
|
||||
if (i > threeFourths)
|
||||
{
|
||||
num676 = num676 * num678 * 0.7f;
|
||||
num677 *= num678;
|
||||
deathDustX = deathDustX * deathDustVel * 0.7f;
|
||||
deathDustY *= deathDustVel;
|
||||
}
|
||||
else if (num672 > half)
|
||||
else if (i > half)
|
||||
{
|
||||
num676 *= num678;
|
||||
num677 = num677 * num678 * 0.7f;
|
||||
deathDustX *= deathDustVel;
|
||||
deathDustY = deathDustY * deathDustVel * 0.7f;
|
||||
}
|
||||
else if (num672 > fourth)
|
||||
else if (i > fourth)
|
||||
{
|
||||
num676 = num676 * num678 * 0.7f;
|
||||
num677 *= num678;
|
||||
deathDustX = deathDustX * deathDustVel * 0.7f;
|
||||
deathDustY *= deathDustVel;
|
||||
}
|
||||
else
|
||||
{
|
||||
num676 *= num678;
|
||||
num677 = num677 * num678 * 0.7f;
|
||||
deathDustX *= deathDustVel;
|
||||
deathDustY = deathDustY * deathDustVel * 0.7f;
|
||||
}
|
||||
|
||||
Dust dust8 = Main.dust[num675];
|
||||
Dust dust8 = Main.dust[deathDarkBlue];
|
||||
dust8.velocity *= 0.5f;
|
||||
dust8.velocity.X = dust8.velocity.X + num676;
|
||||
dust8.velocity.Y = dust8.velocity.Y + num677;
|
||||
dust8.velocity.X = dust8.velocity.X + deathDustX;
|
||||
dust8.velocity.Y = dust8.velocity.Y + deathDustY;
|
||||
dust8.noGravity = true;
|
||||
|
||||
if (num672 > threeFourths)
|
||||
if (i > threeFourths)
|
||||
{
|
||||
int num650 = Dust.NewDust(Projectile.Center, 6, 6, dustArray[5], 0f, 0f, 100, default, 1.3f);
|
||||
float num651 = Main.dust[num650].velocity.X;
|
||||
float num652 = Main.dust[num650].velocity.Y;
|
||||
int tealDust = Dust.NewDust(Projectile.Center, 6, 6, dustArray[5], 0f, 0f, 100, default, 1.3f);
|
||||
float tealDustX = Main.dust[tealDust].velocity.X;
|
||||
float tealDustY = Main.dust[tealDust].velocity.Y;
|
||||
|
||||
if (num651 == 0f && num652 == 0f)
|
||||
num651 = 1f;
|
||||
if (tealDustX == 0f && tealDustY == 0f)
|
||||
tealDustX = 1f;
|
||||
|
||||
float num653 = (float)Math.Sqrt(num651 * num651 + num652 * num652);
|
||||
num653 = 16f / num653;
|
||||
num651 = num651 * num653 * 1.25f;
|
||||
num652 = num652 * num653 * 0.75f;
|
||||
float tealDustVel = (float)Math.Sqrt(tealDustX * tealDustX + tealDustY * tealDustY);
|
||||
tealDustVel = 16f / tealDustVel;
|
||||
tealDustX = tealDustX * tealDustVel * 1.25f;
|
||||
tealDustY = tealDustY * tealDustVel * 0.75f;
|
||||
|
||||
Dust dust9 = Main.dust[num650];
|
||||
Dust dust9 = Main.dust[tealDust];
|
||||
dust9.velocity *= 0.5f;
|
||||
dust9.velocity.X = dust9.velocity.X + num651;
|
||||
dust9.velocity.Y = dust9.velocity.Y + num652;
|
||||
dust9.velocity.X = dust9.velocity.X + tealDustX;
|
||||
dust9.velocity.Y = dust9.velocity.Y + tealDustY;
|
||||
dust9.noGravity = true;
|
||||
}
|
||||
}
|
||||
@@ -230,7 +227,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
{
|
||||
float angleRandom = 0.05f;
|
||||
|
||||
for (int num53 = 0; num53 < 40; num53++)
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
@@ -239,27 +236,27 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
int randomDustType = Main.rand.Next(2) == 0 ? dustArray[4] : dustArray[5];
|
||||
float scale = randomDustType == dustArray[4] ? 1.5f : 1f;
|
||||
|
||||
int num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 2.5f * scale);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[num54].noGravity = true;
|
||||
int electricDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 2.5f * scale);
|
||||
Main.dust[electricDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
Main.dust[electricDust].noGravity = true;
|
||||
|
||||
Dust dust = Main.dust[num54];
|
||||
Dust dust = Main.dust[electricDust];
|
||||
dust.velocity *= 3f;
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[electricDust];
|
||||
|
||||
num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 1.5f * scale);
|
||||
Main.dust[num54].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
electricDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 1.5f * scale);
|
||||
Main.dust[electricDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
|
||||
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[electricDust];
|
||||
dust.velocity *= 2f;
|
||||
|
||||
Main.dust[num54].noGravity = true;
|
||||
Main.dust[num54].fadeIn = 1f;
|
||||
Main.dust[num54].color = Color.Cyan * 0.5f;
|
||||
Main.dust[electricDust].noGravity = true;
|
||||
Main.dust[electricDust].fadeIn = 1f;
|
||||
Main.dust[electricDust].color = Color.Cyan * 0.5f;
|
||||
|
||||
dust = Main.dust[num54];
|
||||
dust = Main.dust[electricDust];
|
||||
}
|
||||
for (int num55 = 0; num55 < 20; num55++)
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
|
||||
Vector2 dustVel = new Vector2(dustSpeed, 0f).RotatedBy(Projectile.velocity.ToRotation());
|
||||
@@ -268,13 +265,13 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
int randomDustType = Main.rand.Next(2) == 0 ? dustArray[4] : dustArray[5];
|
||||
float scale = randomDustType == dustArray[4] ? 1.5f : 1f;
|
||||
|
||||
int num56 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 3f * scale);
|
||||
Main.dust[num56].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[num56].noGravity = true;
|
||||
int electricDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 3f * scale);
|
||||
Main.dust[electricDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f;
|
||||
Main.dust[electricDust2].noGravity = true;
|
||||
|
||||
Dust dust = Main.dust[num56];
|
||||
Dust dust = Main.dust[electricDust2];
|
||||
dust.velocity *= 0.5f;
|
||||
dust = Main.dust[num56];
|
||||
dust = Main.dust[electricDust2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
{
|
||||
Color dustColor = Color.Crimson;
|
||||
dustColor.A = 150;
|
||||
int num67 = Dust.NewDust(Projectile.position - Projectile.velocity * 3f, Projectile.width, Projectile.height, 260, 0f, 0f, 50, dustColor, 1.2f);
|
||||
Main.dust[num67].velocity *= 0.3f;
|
||||
Main.dust[num67].velocity += Projectile.velocity * 0.3f;
|
||||
Main.dust[num67].noGravity = true;
|
||||
int redSpiky = Dust.NewDust(Projectile.position - Projectile.velocity * 3f, Projectile.width, Projectile.height, 260, 0f, 0f, 50, dustColor, 1.2f);
|
||||
Main.dust[redSpiky].velocity *= 0.3f;
|
||||
Main.dust[redSpiky].velocity += Projectile.velocity * 0.3f;
|
||||
Main.dust[redSpiky].noGravity = true;
|
||||
}
|
||||
|
||||
Projectile.Opacity += 0.2f;
|
||||
|
||||
@@ -57,23 +57,23 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
Projectile.height = 60;
|
||||
Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
|
||||
for (int num621 = 0; num621 < 15; num621++)
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 8, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int earthyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 8, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[earthyDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[earthyDust].scale = 0.5f;
|
||||
Main.dust[earthyDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 30; num623++)
|
||||
for (int j = 0; j < 30; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 1, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 8, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int earthyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 1, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[earthyDust2].noGravity = true;
|
||||
Main.dust[earthyDust2].velocity *= 5f;
|
||||
earthyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 8, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[earthyDust2].velocity *= 2f;
|
||||
}
|
||||
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
|
||||
@@ -35,23 +35,23 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
Projectile.height = 50;
|
||||
Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
|
||||
for (int num621 = 0; num621 < 10; num621++)
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 8, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int earthyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 8, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[earthyDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[earthyDust].scale = 0.5f;
|
||||
Main.dust[earthyDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 20; num623++)
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 1, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 8, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int earthyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 1, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[earthyDust2].noGravity = true;
|
||||
Main.dust[earthyDust2].velocity *= 5f;
|
||||
earthyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 8, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[earthyDust2].velocity *= 2f;
|
||||
}
|
||||
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
|
||||
@@ -34,46 +34,46 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
Projectile.height = 20;
|
||||
Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
|
||||
for (int num621 = 0; num621 < 10; num621++)
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 244, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int flameDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 244, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[flameDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[flameDust].scale = 0.5f;
|
||||
Main.dust[flameDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 20; num623++)
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 246, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 246, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int sparkDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 246, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[sparkDust].noGravity = true;
|
||||
Main.dust[sparkDust].velocity *= 5f;
|
||||
sparkDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 246, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[sparkDust].velocity *= 2f;
|
||||
}
|
||||
count += 1f;
|
||||
}
|
||||
Projectile.localAI[0] += 1f;
|
||||
if (Projectile.localAI[0] > 4f)
|
||||
{
|
||||
for (int num468 = 0; num468 < 5; num468++)
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
int num469 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 246, 0f, 0f, 100, default, 0.75f);
|
||||
Main.dust[num469].velocity *= 0f;
|
||||
int sparky = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 246, 0f, 0f, 100, default, 0.75f);
|
||||
Main.dust[sparky].velocity *= 0f;
|
||||
}
|
||||
}
|
||||
int num103 = (int)Player.FindClosest(Projectile.Center, 1, 1);
|
||||
int playerTarget = (int)Player.FindClosest(Projectile.Center, 1, 1);
|
||||
Projectile.ai[1] += 1f;
|
||||
if (Projectile.ai[1] < 200f && Projectile.ai[1] > 40f)
|
||||
{
|
||||
float scaleFactor2 = Projectile.velocity.Length();
|
||||
Vector2 vector11 = Main.player[num103].Center - Projectile.Center;
|
||||
vector11.Normalize();
|
||||
vector11 *= scaleFactor2;
|
||||
Projectile.velocity = (Projectile.velocity * 24f + vector11) / 25f;
|
||||
float scaleFactor = Projectile.velocity.Length();
|
||||
Vector2 playerDistance = Main.player[playerTarget].Center - Projectile.Center;
|
||||
playerDistance.Normalize();
|
||||
playerDistance *= scaleFactor;
|
||||
Projectile.velocity = (Projectile.velocity * 24f + playerDistance) / 25f;
|
||||
Projectile.velocity.Normalize();
|
||||
Projectile.velocity *= scaleFactor2;
|
||||
Projectile.velocity *= scaleFactor;
|
||||
}
|
||||
if (Projectile.ai[0] < 0f)
|
||||
{
|
||||
|
||||
@@ -26,26 +26,26 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
{
|
||||
if (Projectile.ai[1] == 0f)
|
||||
{
|
||||
for (int num621 = 0; num621 < 20; num621++)
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 33, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int waterDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 33, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[waterDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[waterDust].scale = 0.5f;
|
||||
Main.dust[waterDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
Projectile.ai[1] = 1f;
|
||||
SoundEngine.PlaySound(SoundID.Item21, Projectile.position);
|
||||
}
|
||||
Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0.35f / 255f);
|
||||
for (int num457 = 0; num457 < 10; num457++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
int num458 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 33, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[num458].noGravity = true;
|
||||
Main.dust[num458].velocity *= 0.5f;
|
||||
Main.dust[num458].velocity += Projectile.velocity * 0.1f;
|
||||
int watery = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 33, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[watery].noGravity = true;
|
||||
Main.dust[watery].velocity *= 0.5f;
|
||||
Main.dust[watery].velocity += Projectile.velocity * 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,23 +54,23 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
SoundEngine.PlaySound(SoundID.Item21, Projectile.position);
|
||||
for (int dust = 0; dust <= 40; dust++)
|
||||
{
|
||||
float num463 = (float)Main.rand.Next(-10, 11);
|
||||
float num464 = (float)Main.rand.Next(-10, 11);
|
||||
float num465 = (float)Main.rand.Next(3, 9);
|
||||
float num466 = (float)Math.Sqrt((double)(num463 * num463 + num464 * num464));
|
||||
num466 = num465 / num466;
|
||||
num463 *= num466;
|
||||
num464 *= num466;
|
||||
int num467 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 33, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[num467].noGravity = true;
|
||||
Main.dust[num467].position.X = Projectile.Center.X;
|
||||
Main.dust[num467].position.Y = Projectile.Center.Y;
|
||||
Dust expr_149DF_cp_0 = Main.dust[num467];
|
||||
float rando1 = (float)Main.rand.Next(-10, 11);
|
||||
float rando2 = (float)Main.rand.Next(-10, 11);
|
||||
float rando3 = (float)Main.rand.Next(3, 9);
|
||||
float randoAdjuster = (float)Math.Sqrt((double)(rando1 * rando1 + rando2 * rando2));
|
||||
randoAdjuster = rando3 / randoAdjuster;
|
||||
rando1 *= randoAdjuster;
|
||||
rando2 *= randoAdjuster;
|
||||
int killWaterDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 33, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[killWaterDust].noGravity = true;
|
||||
Main.dust[killWaterDust].position.X = Projectile.Center.X;
|
||||
Main.dust[killWaterDust].position.Y = Projectile.Center.Y;
|
||||
Dust expr_149DF_cp_0 = Main.dust[killWaterDust];
|
||||
expr_149DF_cp_0.position.X += (float)Main.rand.Next(-10, 11);
|
||||
Dust expr_14A09_cp_0 = Main.dust[num467];
|
||||
Dust expr_14A09_cp_0 = Main.dust[killWaterDust];
|
||||
expr_14A09_cp_0.position.Y += (float)Main.rand.Next(-10, 11);
|
||||
Main.dust[num467].velocity.X = num463;
|
||||
Main.dust[num467].velocity.Y = num464;
|
||||
Main.dust[killWaterDust].velocity.X = rando1;
|
||||
Main.dust[killWaterDust].velocity.Y = rando2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,13 +56,13 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
SoundEngine.PlaySound(SoundID.NPCDeath28, Projectile.position);
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int num320 = Main.rand.Next(5, 9);
|
||||
for (int num321 = 0; num321 < num320; num321++)
|
||||
int randProjAmt = Main.rand.Next(5, 9);
|
||||
for (int i = 0; i < randProjAmt; i++)
|
||||
{
|
||||
Vector2 vector15 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
|
||||
vector15.Normalize();
|
||||
vector15 *= Main.rand.Next(50, 401) * 0.01f;
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, vector15.X, vector15.Y, ModContent.ProjectileType<InkPoisonCloud>(), (int)Math.Round(Projectile.damage * 0.165), 1f, Projectile.owner, Main.rand.Next(-45, 1));
|
||||
Vector2 randProjRotation = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
|
||||
randProjRotation.Normalize();
|
||||
randProjRotation *= Main.rand.Next(50, 401) * 0.01f;
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, randProjRotation.X, randProjRotation.Y, ModContent.ProjectileType<InkPoisonCloud>(), (int)Math.Round(Projectile.damage * 0.165), 1f, Projectile.owner, Main.rand.Next(-45, 1));
|
||||
}
|
||||
}
|
||||
Projectile.position.X = Projectile.position.X + (float)(Projectile.width / 2);
|
||||
@@ -71,23 +71,23 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
Projectile.height = 60;
|
||||
Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
|
||||
for (int num621 = 0; num621 < 10; num621++)
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 54, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
int inkDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 54, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[inkDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[inkDust].scale = 0.5f;
|
||||
Main.dust[inkDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 15; num623++)
|
||||
for (int j = 0; j < 15; j++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 109, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 109, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
int inkDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 109, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[inkDust2].noGravity = true;
|
||||
Main.dust[inkDust2].velocity *= 5f;
|
||||
inkDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 109, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[inkDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,15 +67,15 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
Projectile.localAI[0] = 0f;
|
||||
for (int l = 0; l < 12; l++)
|
||||
{
|
||||
Vector2 vector3 = Vector2.UnitX * (float)-(float)Projectile.width / 2f;
|
||||
vector3 += -Vector2.UnitY.RotatedBy((double)((float)l * 3.14159274f / 6f), default) * new Vector2(8f, 16f);
|
||||
vector3 = vector3.RotatedBy((double)(Projectile.rotation - 1.57079637f), default);
|
||||
int num9 = Dust.NewDust(Projectile.Center, 0, 0, 92, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[num9].scale = 1.1f;
|
||||
Main.dust[num9].noGravity = true;
|
||||
Main.dust[num9].position = Projectile.Center + vector3;
|
||||
Main.dust[num9].velocity = Projectile.velocity * 0.1f;
|
||||
Main.dust[num9].velocity = Vector2.Normalize(Projectile.Center - Projectile.velocity * 3f - Main.dust[num9].position) * 1.25f;
|
||||
Vector2 dustRotation = Vector2.UnitX * (float)-(float)Projectile.width / 2f;
|
||||
dustRotation += -Vector2.UnitY.RotatedBy((double)((float)l * 3.14159274f / 6f), default) * new Vector2(8f, 16f);
|
||||
dustRotation = dustRotation.RotatedBy((double)(Projectile.rotation - 1.57079637f), default);
|
||||
int pearlDust = Dust.NewDust(Projectile.Center, 0, 0, 92, 0f, 0f, 160, default, 1f);
|
||||
Main.dust[pearlDust].scale = 1.1f;
|
||||
Main.dust[pearlDust].noGravity = true;
|
||||
Main.dust[pearlDust].position = Projectile.Center + dustRotation;
|
||||
Main.dust[pearlDust].velocity = Projectile.velocity * 0.1f;
|
||||
Main.dust[pearlDust].velocity = Vector2.Normalize(Projectile.Center - Projectile.velocity * 3f - Main.dust[pearlDust].position) * 1.25f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,61 +34,61 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
SoundEngine.PlaySound(SoundID.Item20, Projectile.position);
|
||||
Projectile.localAI[0] += 1f;
|
||||
}
|
||||
bool flag15 = false;
|
||||
bool flag16 = false;
|
||||
bool xflag = false;
|
||||
bool yflag = false;
|
||||
if (Projectile.velocity.X < 0f && Projectile.position.X < Projectile.ai[0])
|
||||
{
|
||||
flag15 = true;
|
||||
xflag = true;
|
||||
}
|
||||
if (Projectile.velocity.X > 0f && Projectile.position.X > Projectile.ai[0])
|
||||
{
|
||||
flag15 = true;
|
||||
xflag = true;
|
||||
}
|
||||
if (Projectile.velocity.Y < 0f && Projectile.position.Y < Projectile.ai[1])
|
||||
{
|
||||
flag16 = true;
|
||||
yflag = true;
|
||||
}
|
||||
if (Projectile.velocity.Y > 0f && Projectile.position.Y > Projectile.ai[1])
|
||||
{
|
||||
flag16 = true;
|
||||
yflag = true;
|
||||
}
|
||||
if (flag15 && flag16)
|
||||
if (xflag && yflag)
|
||||
{
|
||||
Projectile.Kill();
|
||||
}
|
||||
float num461 = 25f;
|
||||
float projTimer = 25f;
|
||||
if (Projectile.ai[0] > 180f)
|
||||
{
|
||||
num461 -= (Projectile.ai[0] - 180f) / 2f;
|
||||
projTimer -= (Projectile.ai[0] - 180f) / 2f;
|
||||
}
|
||||
if (num461 <= 0f)
|
||||
if (projTimer <= 0f)
|
||||
{
|
||||
num461 = 0f;
|
||||
projTimer = 0f;
|
||||
Projectile.Kill();
|
||||
}
|
||||
num461 *= 0.7f;
|
||||
projTimer *= 0.7f;
|
||||
Projectile.ai[0] += 4f;
|
||||
int num462 = 0;
|
||||
while ((float)num462 < num461)
|
||||
int timerCounter = 0;
|
||||
while ((float)timerCounter < projTimer)
|
||||
{
|
||||
float num463 = (float)Main.rand.Next(-30, 35);
|
||||
float num464 = (float)Main.rand.Next(-30, 35);
|
||||
float num465 = (float)Main.rand.Next(13, 18);
|
||||
float num466 = (float)Math.Sqrt((double)(num463 * num463 + num464 * num464));
|
||||
num466 = num465 / num466;
|
||||
num463 *= num466;
|
||||
num464 *= num466;
|
||||
int num467 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f);
|
||||
Main.dust[num467].noGravity = true;
|
||||
Main.dust[num467].position.X = Projectile.Center.X;
|
||||
Main.dust[num467].position.Y = Projectile.Center.Y;
|
||||
Dust expr_149DF_cp_0 = Main.dust[num467];
|
||||
float rando1 = (float)Main.rand.Next(-30, 35);
|
||||
float rando2 = (float)Main.rand.Next(-30, 35);
|
||||
float rando3 = (float)Main.rand.Next(13, 18);
|
||||
float randoAdjuster = (float)Math.Sqrt((double)(rando1 * rando1 + rando2 * rando2));
|
||||
randoAdjuster = rando3 / randoAdjuster;
|
||||
rando1 *= randoAdjuster;
|
||||
rando2 *= randoAdjuster;
|
||||
int explodeBrimStyle = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f);
|
||||
Main.dust[explodeBrimStyle].noGravity = true;
|
||||
Main.dust[explodeBrimStyle].position.X = Projectile.Center.X;
|
||||
Main.dust[explodeBrimStyle].position.Y = Projectile.Center.Y;
|
||||
Dust expr_149DF_cp_0 = Main.dust[explodeBrimStyle];
|
||||
expr_149DF_cp_0.position.X += (float)Main.rand.Next(-10, 11);
|
||||
Dust expr_14A09_cp_0 = Main.dust[num467];
|
||||
Dust expr_14A09_cp_0 = Main.dust[explodeBrimStyle];
|
||||
expr_14A09_cp_0.position.Y += (float)Main.rand.Next(-10, 11);
|
||||
Main.dust[num467].velocity.X = num463;
|
||||
Main.dust[num467].velocity.Y = num464;
|
||||
num462++;
|
||||
Main.dust[explodeBrimStyle].velocity.X = rando1;
|
||||
Main.dust[explodeBrimStyle].velocity.Y = rando2;
|
||||
timerCounter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,34 +34,34 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
if (Projectile.localAI[1] < 30f)
|
||||
{
|
||||
int totalDust = Projectile.ai[0] != 0f ? 2 : 1;
|
||||
for (int num1134 = 0; num1134 < totalDust; num1134++)
|
||||
for (int i = 0; i < totalDust; i++)
|
||||
{
|
||||
float value79 = -0.5f;
|
||||
float value80 = 0.9f;
|
||||
float amount4 = Main.rand.NextFloat();
|
||||
Vector2 value81 = new Vector2(MathHelper.Lerp(0.1f, 1f, Main.rand.NextFloat()), MathHelper.Lerp(value79, value80, amount4));
|
||||
value81.X *= MathHelper.Lerp(2.2f, 0.6f, amount4);
|
||||
value81.X *= -1f;
|
||||
Vector2 value82 = new Vector2(2f, 10f);
|
||||
Vector2 position4 = Projectile.Center + new Vector2(60f, Projectile.ai[0] != 0f ? 800f : 200f) * value81 * 0.5f + value82;
|
||||
Dust dust34 = Main.dust[Dust.NewDust(position4, 0, 0, 16, 0f, 0f, 0, default, 0.5f)];
|
||||
dust34.position = position4;
|
||||
dust34.customData = Projectile.Center + value82;
|
||||
dust34.fadeIn = 1f;
|
||||
dust34.scale = 0.3f;
|
||||
if (value81.X > -1.2f)
|
||||
float lerpvalue = -0.5f;
|
||||
float lerpvalue2 = 0.9f;
|
||||
float randomLerp = Main.rand.NextFloat();
|
||||
Vector2 dustMovement = new Vector2(MathHelper.Lerp(0.1f, 1f, Main.rand.NextFloat()), MathHelper.Lerp(lerpvalue, lerpvalue2, randomLerp));
|
||||
dustMovement.X *= MathHelper.Lerp(2.2f, 0.6f, randomLerp);
|
||||
dustMovement.X *= -1f;
|
||||
Vector2 dustMovement2 = new Vector2(2f, 10f);
|
||||
Vector2 position4 = Projectile.Center + new Vector2(60f, Projectile.ai[0] != 0f ? 800f : 200f) * dustMovement * 0.5f + dustMovement2;
|
||||
Dust stormy = Main.dust[Dust.NewDust(position4, 0, 0, 16, 0f, 0f, 0, default, 0.5f)];
|
||||
stormy.position = position4;
|
||||
stormy.customData = Projectile.Center + dustMovement2;
|
||||
stormy.fadeIn = 1f;
|
||||
stormy.scale = 0.3f;
|
||||
if (dustMovement.X > -1.2f)
|
||||
{
|
||||
dust34.velocity.X = 1f + Main.rand.NextFloat();
|
||||
stormy.velocity.X = 1f + Main.rand.NextFloat();
|
||||
}
|
||||
dust34.velocity.Y = Main.rand.NextFloat() * -0.5f - 1f;
|
||||
stormy.velocity.Y = Main.rand.NextFloat() * -0.5f - 1f;
|
||||
}
|
||||
}
|
||||
if (Projectile.localAI[0] == 0f)
|
||||
{
|
||||
Projectile.localAI[0] = 0.8f;
|
||||
Projectile.direction = 1;
|
||||
Point point9 = Projectile.Center.ToTileCoordinates();
|
||||
Projectile.Center = new Vector2((float)(point9.X * 16 + 8), (float)(point9.Y * 16 + 8));
|
||||
Point projCenter = Projectile.Center.ToTileCoordinates();
|
||||
Projectile.Center = new Vector2((float)(projCenter.X * 16 + 8), (float)(projCenter.Y * 16 + 8));
|
||||
}
|
||||
Projectile.rotation = Projectile.localAI[1] / 40f * 6.28318548f * (float)Projectile.direction;
|
||||
if (Projectile.localAI[1] < 33f)
|
||||
@@ -90,30 +90,30 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
{
|
||||
Lighting.AddLight(Projectile.Center, newColor3.ToVector3() * 0.5f);
|
||||
}
|
||||
for (int num1135 = 0; num1135 < 2; num1135++)
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
if (Main.rand.NextBool(10))
|
||||
{
|
||||
Vector2 value83 = Vector2.UnitY.RotatedBy((double)((float)num1135 * 3.14159274f), default).RotatedBy((double)Projectile.rotation, default);
|
||||
Dust dust35 = Main.dust[Dust.NewDust(Projectile.Center, 0, 0, 16, 0f, 0f, 225, newColor3, 1f)];
|
||||
dust35.noGravity = true;
|
||||
dust35.noLight = true;
|
||||
dust35.scale = Projectile.Opacity * Projectile.localAI[0];
|
||||
dust35.position = Projectile.Center;
|
||||
dust35.velocity = value83 * 2.5f;
|
||||
Vector2 dustVel = Vector2.UnitY.RotatedBy((double)((float)j * 3.14159274f), default).RotatedBy((double)Projectile.rotation, default);
|
||||
Dust stormDust = Main.dust[Dust.NewDust(Projectile.Center, 0, 0, 16, 0f, 0f, 225, newColor3, 1f)];
|
||||
stormDust.noGravity = true;
|
||||
stormDust.noLight = true;
|
||||
stormDust.scale = Projectile.Opacity * Projectile.localAI[0];
|
||||
stormDust.position = Projectile.Center;
|
||||
stormDust.velocity = dustVel * 2.5f;
|
||||
}
|
||||
}
|
||||
for (int num1136 = 0; num1136 < 2; num1136++)
|
||||
for (int k = 0; k < 2; k++)
|
||||
{
|
||||
if (Main.rand.NextBool(10))
|
||||
{
|
||||
Vector2 value84 = Vector2.UnitY.RotatedBy((double)((float)num1136 * 3.14159274f), default);
|
||||
Dust dust36 = Main.dust[Dust.NewDust(Projectile.Center, 0, 0, 16, 0f, 0f, 225, newColor3, 1.5f)];
|
||||
dust36.noGravity = true;
|
||||
dust36.noLight = true;
|
||||
dust36.scale = Projectile.Opacity * Projectile.localAI[0];
|
||||
dust36.position = Projectile.Center;
|
||||
dust36.velocity = value84 * 2.5f;
|
||||
Vector2 dustVel2 = Vector2.UnitY.RotatedBy((double)((float)k * 3.14159274f), default);
|
||||
Dust stormDust2 = Main.dust[Dust.NewDust(Projectile.Center, 0, 0, 16, 0f, 0f, 225, newColor3, 1.5f)];
|
||||
stormDust2.noGravity = true;
|
||||
stormDust2.noLight = true;
|
||||
stormDust2.scale = Projectile.Opacity * Projectile.localAI[0];
|
||||
stormDust2.position = Projectile.Center;
|
||||
stormDust2.velocity = dustVel2 * 2.5f;
|
||||
}
|
||||
}
|
||||
if (Projectile.localAI[1] < 33f || Projectile.localAI[1] > 87f)
|
||||
@@ -135,16 +135,16 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Color color25 = Lighting.GetColor((int)((double)Projectile.position.X + (double)Projectile.width * 0.5) / 16, (int)(((double)Projectile.position.Y + (double)Projectile.height * 0.5) / 16.0));
|
||||
Vector2 vector38 = Projectile.position + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition;
|
||||
Color originalColor = Lighting.GetColor((int)((double)Projectile.position.X + (double)Projectile.width * 0.5) / 16, (int)(((double)Projectile.position.Y + (double)Projectile.height * 0.5) / 16.0));
|
||||
Vector2 drawPos = Projectile.position + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition;
|
||||
Texture2D texture2D27 = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Rectangle rectangle11 = texture2D27.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame);
|
||||
Color alpha5 = Projectile.GetAlpha(color25);
|
||||
Vector2 origin7 = rectangle11.Size() / 2f;
|
||||
Color color47 = Main.hslToRgb(0.25f, 1f, 1f).MultiplyRGBA(new Color(255, 255, 255, 0));
|
||||
Main.spriteBatch.Draw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), color47, 0f, origin7, new Vector2(1f, 5f) * Projectile.scale * 2f, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), alpha5, Projectile.rotation, origin7, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), alpha5, 0f, origin7, new Vector2(1f, 8f) * Projectile.scale, SpriteEffects.None, 0);
|
||||
Rectangle rectangl = texture2D27.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame);
|
||||
Color alphaColor = Projectile.GetAlpha(originalColor);
|
||||
Vector2 halfRect = rectangl.Size() / 2f;
|
||||
Color whiteColor = Main.hslToRgb(0.25f, 1f, 1f).MultiplyRGBA(new Color(255, 255, 255, 0));
|
||||
Main.spriteBatch.Draw(texture2D27, drawPos, new Microsoft.Xna.Framework.Rectangle?(rectangl), whiteColor, 0f, halfRect, new Vector2(1f, 5f) * Projectile.scale * 2f, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(texture2D27, drawPos, new Microsoft.Xna.Framework.Rectangle?(rectangl), alphaColor, Projectile.rotation, halfRect, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(texture2D27, drawPos, new Microsoft.Xna.Framework.Rectangle?(rectangl), alphaColor, 0f, halfRect, new Vector2(1f, 8f) * Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,12 +86,12 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture2D13 = ModContent.Request<Texture2D>(Texture).Value;
|
||||
int num214 = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
int framing = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
lightColor.R = (byte)(255 * Projectile.Opacity);
|
||||
lightColor.G = (byte)(255 * Projectile.Opacity);
|
||||
lightColor.B = (byte)(255 * Projectile.Opacity);
|
||||
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -113,15 +113,15 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2);
|
||||
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
|
||||
|
||||
for (int num246 = 0; num246 < 25; num246++)
|
||||
for (int i = 0; i < 25; i++)
|
||||
{
|
||||
int num247 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 31, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num247].position = (Main.dust[num247].position + Projectile.position) / 2f;
|
||||
Main.dust[num247].velocity = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
|
||||
Main.dust[num247].velocity.Normalize();
|
||||
Dust dust = Main.dust[num247];
|
||||
int toxicDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 31, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[toxicDust].position = (Main.dust[toxicDust].position + Projectile.position) / 2f;
|
||||
Main.dust[toxicDust].velocity = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
|
||||
Main.dust[toxicDust].velocity.Normalize();
|
||||
Dust dust = Main.dust[toxicDust];
|
||||
dust.velocity *= (float)Main.rand.Next(1, 30) * 0.1f;
|
||||
Main.dust[num247].alpha = 255 - (int)(Projectile.Opacity * 255f);
|
||||
Main.dust[toxicDust].alpha = 255 - (int)(Projectile.Opacity * 255f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,76 +28,74 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
float num1125 = Projectile.ai[1] == 1f ? 900f : 600f;
|
||||
float projTimer = Projectile.ai[1] == 1f ? 900f : 600f;
|
||||
if (Projectile.soundDelay == 0)
|
||||
{
|
||||
Projectile.soundDelay = -1;
|
||||
SoundEngine.PlaySound(SoundID.Item122, Projectile.position);
|
||||
}
|
||||
Projectile.ai[0] += 1f;
|
||||
if (Projectile.ai[0] >= num1125)
|
||||
if (Projectile.ai[0] >= projTimer)
|
||||
{
|
||||
Projectile.Kill();
|
||||
}
|
||||
float num1127 = Projectile.ai[1] == 1f ? 90f : 15f;
|
||||
float num1128 = Projectile.ai[1] == 1f ? 90f : 15f;
|
||||
Point point8 = Projectile.Center.ToTileCoordinates();
|
||||
int num1129;
|
||||
int num1130;
|
||||
Collision.ExpandVertically(point8.X, point8.Y, out num1129, out num1130, (int)num1127, (int)num1128);
|
||||
num1129++;
|
||||
num1130--;
|
||||
Vector2 value72 = new Vector2((float)point8.X, (float)num1129) * 16f + new Vector2(8f);
|
||||
Vector2 value73 = new Vector2((float)point8.X, (float)num1130) * 16f + new Vector2(8f);
|
||||
Vector2 vector146 = Vector2.Lerp(value72, value73, 0.5f);
|
||||
Vector2 value74 = new Vector2(0f, value73.Y - value72.Y);
|
||||
value74.X = value74.Y * 0.2f;
|
||||
Projectile.width = (int)(value74.X * (Projectile.ai[1] == 1f ? 0.167f : 0.65f));
|
||||
Projectile.height = (int)value74.Y;
|
||||
Projectile.Center = vector146;
|
||||
float expandSizeX = Projectile.ai[1] == 1f ? 90f : 15f;
|
||||
float expandSizeY = Projectile.ai[1] == 1f ? 90f : 15f;
|
||||
Point projCenterTile = Projectile.Center.ToTileCoordinates();
|
||||
int sizeMod;
|
||||
int sizeMod2;
|
||||
Collision.ExpandVertically(projCenterTile.X, projCenterTile.Y, out sizeMod, out sizeMod2, (int)expandSizeX, (int)expandSizeY);
|
||||
sizeMod++;
|
||||
sizeMod2--;
|
||||
Vector2 sizeModVector = new Vector2((float)projCenterTile.X, (float)sizeMod) * 16f + new Vector2(8f);
|
||||
Vector2 sizeModVector2 = new Vector2((float)projCenterTile.X, (float)sizeMod2) * 16f + new Vector2(8f);
|
||||
Vector2 centering = Vector2.Lerp(sizeModVector, sizeModVector2, 0.5f);
|
||||
Vector2 sizeModPos = new Vector2(0f, sizeModVector2.Y - sizeModVector.Y);
|
||||
sizeModPos.X = sizeModPos.Y * 0.2f;
|
||||
Projectile.width = (int)(sizeModPos.X * (Projectile.ai[1] == 1f ? 0.167f : 0.65f));
|
||||
Projectile.height = (int)sizeModPos.Y;
|
||||
Projectile.Center = centering;
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
bool flag74 = false;
|
||||
Vector2 center16 = Main.player[Projectile.owner].Center;
|
||||
bool breakFlag = false;
|
||||
Vector2 playerCenter = Main.player[Projectile.owner].Center;
|
||||
Vector2 top = Main.player[Projectile.owner].Top;
|
||||
for (float num1131 = 0f; num1131 < 1f; num1131 += 0.05f)
|
||||
for (float i = 0f; i < 1f; i += 0.05f)
|
||||
{
|
||||
Vector2 position2 = Vector2.Lerp(value72, value73, num1131);
|
||||
if (Collision.CanHitLine(position2, 0, 0, center16, 0, 0) || Collision.CanHitLine(position2, 0, 0, top, 0, 0))
|
||||
Vector2 position2 = Vector2.Lerp(sizeModVector, sizeModVector2, i);
|
||||
if (Collision.CanHitLine(position2, 0, 0, playerCenter, 0, 0) || Collision.CanHitLine(position2, 0, 0, top, 0, 0))
|
||||
{
|
||||
flag74 = true;
|
||||
breakFlag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!flag74 && Projectile.ai[0] < num1125 - 120f)
|
||||
if (!breakFlag && Projectile.ai[0] < projTimer - 120f)
|
||||
{
|
||||
float num1132 = Projectile.ai[0] % 60f;
|
||||
Projectile.ai[0] = num1125 - 120f + num1132;
|
||||
float aiDecrement = Projectile.ai[0] % 60f;
|
||||
Projectile.ai[0] = projTimer - 120f + aiDecrement;
|
||||
Projectile.netUpdate = true;
|
||||
}
|
||||
}
|
||||
if (Projectile.ai[0] < num1125 - 120f)
|
||||
if (Projectile.ai[0] < projTimer - 120f)
|
||||
{
|
||||
for (int num1133 = 0; num1133 < 1; num1133++)
|
||||
for (int j = 0; j < 1; j++)
|
||||
{
|
||||
float value75 = -0.5f;
|
||||
float value76 = 0.9f;
|
||||
float amount3 = Main.rand.NextFloat();
|
||||
Vector2 value77 = new Vector2(MathHelper.Lerp(0.1f, 1f, Main.rand.NextFloat()), MathHelper.Lerp(value75, value76, amount3));
|
||||
value77.X *= MathHelper.Lerp(2.2f, 0.6f, amount3);
|
||||
value77.X *= -1f;
|
||||
Vector2 value78 = new Vector2(6f, 10f);
|
||||
Vector2 position3 = vector146 + value74 * value77 * 0.5f + value78;
|
||||
Dust dust33 = Main.dust[Dust.NewDust(position3, 0, 0, 16, 0f, 0f, 0, default, 1.5f)];
|
||||
dust33.position = position3;
|
||||
dust33.customData = vector146 + value78;
|
||||
dust33.fadeIn = 1f;
|
||||
dust33.scale = 0.3f;
|
||||
if (value77.X > -1.2f)
|
||||
float lerpRandomizer = Main.rand.NextFloat();
|
||||
Vector2 dustVelocity = new Vector2(MathHelper.Lerp(0.1f, 1f, Main.rand.NextFloat()), MathHelper.Lerp(-0.5f, 0.9f, lerpRandomizer));
|
||||
dustVelocity.X *= MathHelper.Lerp(2.2f, 0.6f, lerpRandomizer);
|
||||
dustVelocity.X *= -1f;
|
||||
Vector2 dustCustomData = new Vector2(6f, 10f);
|
||||
Vector2 dustPosition = centering + sizeModPos * dustVelocity * 0.5f + dustCustomData;
|
||||
Dust cloudDust = Main.dust[Dust.NewDust(dustPosition, 0, 0, 16, 0f, 0f, 0, default, 1.5f)];
|
||||
cloudDust.position = dustPosition;
|
||||
cloudDust.customData = centering + dustCustomData;
|
||||
cloudDust.fadeIn = 1f;
|
||||
cloudDust.scale = 0.3f;
|
||||
if (dustVelocity.X > -1.2f)
|
||||
{
|
||||
dust33.velocity.X = 1f + Main.rand.NextFloat();
|
||||
cloudDust.velocity.X = 1f + Main.rand.NextFloat();
|
||||
}
|
||||
dust33.velocity.Y = Main.rand.NextFloat() * -0.5f - 1f;
|
||||
cloudDust.velocity.Y = Main.rand.NextFloat() * -0.5f - 1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -106,57 +104,57 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
float num226 = Projectile.ai[1] == 1f ? 900f : 600f;
|
||||
float num227 = Projectile.ai[1] == 1f ? 90f : 15f;
|
||||
float num228 = Projectile.ai[1] == 1f ? 90f : 15f;
|
||||
float num229 = Projectile.ai[0];
|
||||
float scale5 = MathHelper.Clamp(num229 / 30f, 0f, 1f);
|
||||
if (num229 > num226 - 60f)
|
||||
float aiTrackCheck = Projectile.ai[1] == 1f ? 900f : 600f;
|
||||
float expandSizeX2 = Projectile.ai[1] == 1f ? 90f : 15f;
|
||||
float expandSizeY2 = Projectile.ai[1] == 1f ? 90f : 15f;
|
||||
float aiTracker = Projectile.ai[0];
|
||||
float trackerClamp = MathHelper.Clamp(aiTracker / 30f, 0f, 1f);
|
||||
if (aiTracker > aiTrackCheck - 60f)
|
||||
{
|
||||
scale5 = MathHelper.Lerp(1f, 0f, (num229 - (num226 - 60f)) / 60f);
|
||||
trackerClamp = MathHelper.Lerp(1f, 0f, (aiTracker - (aiTrackCheck - 60f)) / 60f);
|
||||
}
|
||||
Point point5 = Projectile.Center.ToTileCoordinates();
|
||||
int num230;
|
||||
int num231;
|
||||
Collision.ExpandVertically(point5.X, point5.Y, out num230, out num231, (int)num227, (int)num228);
|
||||
num230++;
|
||||
num231--;
|
||||
float num232 = 0.2f;
|
||||
Vector2 value32 = new Vector2((float)point5.X, (float)num230) * 16f + new Vector2(8f);
|
||||
Vector2 value33 = new Vector2((float)point5.X, (float)num231) * 16f + new Vector2(8f);
|
||||
Vector2.Lerp(value32, value33, 0.5f);
|
||||
Vector2 vector33 = new Vector2(0f, value33.Y - value32.Y);
|
||||
vector33.X = vector33.Y * num232;
|
||||
new Vector2(value32.X - vector33.X / 2f, value32.Y);
|
||||
Point centerPoint = Projectile.Center.ToTileCoordinates();
|
||||
int sizeModding;
|
||||
int sizeModding2;
|
||||
Collision.ExpandVertically(centerPoint.X, centerPoint.Y, out sizeModding, out sizeModding2, (int)expandSizeX2, (int)expandSizeY2);
|
||||
sizeModding++;
|
||||
sizeModding2--;
|
||||
float vectorMult = 0.2f;
|
||||
Vector2 sizeModdingVector = new Vector2((float)centerPoint.X, (float)sizeModding) * 16f + new Vector2(8f);
|
||||
Vector2 sizeModdingVector2 = new Vector2((float)centerPoint.X, (float)sizeModding2) * 16f + new Vector2(8f);
|
||||
Vector2.Lerp(sizeModdingVector, sizeModdingVector2, 0.5f);
|
||||
Vector2 sizeModdingPos = new Vector2(0f, sizeModdingVector2.Y - sizeModdingVector.Y);
|
||||
sizeModdingPos.X = sizeModdingPos.Y * vectorMult;
|
||||
new Vector2(sizeModdingVector.X - sizeModdingPos.X / 2f, sizeModdingVector.Y);
|
||||
Texture2D texture2D23 = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Rectangle rectangle9 = texture2D23.Frame(1, 1, 0, 0);
|
||||
Vector2 origin3 = rectangle9.Size() / 2f;
|
||||
float num233 = -0.06283186f * num229;
|
||||
Vector2 spinningpoint2 = Vector2.UnitY.RotatedBy((double)(num229 * 0.1f), default);
|
||||
float num234 = 0f;
|
||||
float num235 = 5.1f;
|
||||
Color value34 = new Color(225, 225, 225);
|
||||
for (float num236 = (float)(int)value33.Y; num236 > (float)(int)value32.Y; num236 -= num235)
|
||||
Rectangle drawRectangle = texture2D23.Frame(1, 1, 0, 0);
|
||||
Vector2 smallRect = drawRectangle.Size() / 2f;
|
||||
float aiTrackMult = -0.06283186f * aiTracker;
|
||||
Vector2 spinningpoint2 = Vector2.UnitY.RotatedBy((double)(aiTracker * 0.1f), default);
|
||||
float incrementStorage = 0f;
|
||||
float increment = 5.1f;
|
||||
Color cloudColor = new Color(225, 225, 225);
|
||||
for (float k = (float)(int)sizeModdingVector2.Y; k > (float)(int)sizeModdingVector.Y; k -= increment)
|
||||
{
|
||||
num234 += num235;
|
||||
float num237 = num234 / vector33.Y;
|
||||
float num238 = num234 * 6.28318548f / -20f;
|
||||
float num239 = num237 - 0.15f;
|
||||
Vector2 vector34 = spinningpoint2.RotatedBy((double)num238, default);
|
||||
Vector2 value35 = new Vector2(0f, num237 + 1f);
|
||||
value35.X = value35.Y * num232;
|
||||
Color color39 = Color.Lerp(Color.Transparent, value34, num237 * 2f);
|
||||
if (num237 > 0.5f)
|
||||
incrementStorage += increment;
|
||||
float colorChanger = incrementStorage / sizeModdingPos.Y;
|
||||
float incStorageMult = incrementStorage * 6.28318548f / -20f;
|
||||
float lowerColorChanger = colorChanger - 0.15f;
|
||||
Vector2 spinArea = spinningpoint2.RotatedBy((double)incStorageMult, default);
|
||||
Vector2 colorChangeVector = new Vector2(0f, colorChanger + 1f);
|
||||
colorChangeVector.X = colorChangeVector.Y * vectorMult;
|
||||
Color newCloudColor = Color.Lerp(Color.Transparent, cloudColor, colorChanger * 2f);
|
||||
if (colorChanger > 0.5f)
|
||||
{
|
||||
color39 = Color.Lerp(Color.Transparent, value34, 2f - num237 * 2f);
|
||||
newCloudColor = Color.Lerp(Color.Transparent, cloudColor, 2f - colorChanger * 2f);
|
||||
}
|
||||
color39.A = (byte)((float)color39.A * 0.5f);
|
||||
color39 *= scale5;
|
||||
vector34 *= value35 * 100f;
|
||||
vector34.Y = 0f;
|
||||
vector34.X = 0f;
|
||||
vector34 += new Vector2(value33.X, num236) - Main.screenPosition;
|
||||
Main.spriteBatch.Draw(texture2D23, vector34, new Microsoft.Xna.Framework.Rectangle?(rectangle9), color39, num233 + num238, origin3, 1f + num239, SpriteEffects.None, 0);
|
||||
newCloudColor.A = (byte)((float)newCloudColor.A * 0.5f);
|
||||
newCloudColor *= trackerClamp;
|
||||
spinArea *= colorChangeVector * 100f;
|
||||
spinArea.Y = 0f;
|
||||
spinArea.X = 0f;
|
||||
spinArea += new Vector2(sizeModdingVector2.X, k) - Main.screenPosition;
|
||||
Main.spriteBatch.Draw(texture2D23, spinArea, new Microsoft.Xna.Framework.Rectangle?(drawRectangle), newCloudColor, aiTrackMult + incStorageMult, smallRect, 1f + lowerColorChanger, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -29,11 +29,11 @@ namespace CalamityMod.Projectiles.Environment
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
int num1 = Math.Sign(Projectile.velocity.Y);
|
||||
int num2 = num1 == -1 ? 0 : 1;
|
||||
int isActive = Math.Sign(Projectile.velocity.Y);
|
||||
int dustCustomData = isActive == -1 ? 0 : 1;
|
||||
if (Projectile.ai[0] == 0f)
|
||||
{
|
||||
if (!Collision.SolidCollision(Projectile.position + new Vector2(0f, num1 == -1 ? (float) (Projectile.height - 48) : 0f), Projectile.width, 48) && !Collision.WetCollision(Projectile.position + new Vector2(0f, num1 == -1 ? (float) (Projectile.height - 20) : 0f), Projectile.width, 20))
|
||||
if (!Collision.SolidCollision(Projectile.position + new Vector2(0f, isActive == -1 ? (float) (Projectile.height - 48) : 0f), Projectile.width, 48) && !Collision.WetCollision(Projectile.position + new Vector2(0f, isActive == -1 ? (float) (Projectile.height - 20) : 0f), Projectile.width, 20))
|
||||
{
|
||||
Projectile.velocity = new Vector2(0f, (float) Math.Sign(Projectile.velocity.Y) * (1f / 1000f));
|
||||
Projectile.ai[0] = 1f;
|
||||
@@ -45,13 +45,13 @@ namespace CalamityMod.Projectiles.Environment
|
||||
if (Projectile.ai[1] >= 60f)
|
||||
Projectile.Kill();
|
||||
|
||||
for (int index1 = 0; index1 < 3; ++index1)
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
int index2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, new Color(), 1f);
|
||||
Main.dust[index2].scale = 0.1f + Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[index2].fadeIn = 1.5f + Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[index2].noGravity = true;
|
||||
Main.dust[index2].position = Projectile.Center + new Vector2(0f, (float) (-Projectile.height / 2)).RotatedBy((double)Projectile.rotation, new Vector2()) * 1.1f;
|
||||
int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, new Color(), 1f);
|
||||
Main.dust[brimDust].scale = 0.1f + Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[brimDust].fadeIn = 1.5f + Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[brimDust].noGravity = true;
|
||||
Main.dust[brimDust].position = Projectile.Center + new Vector2(0f, (float) (-Projectile.height / 2)).RotatedBy((double)Projectile.rotation, new Vector2()) * 1.1f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,21 +60,21 @@ namespace CalamityMod.Projectiles.Environment
|
||||
|
||||
Projectile.velocity = new Vector2(0f, (float) Math.Sign(Projectile.velocity.Y) * (1f / 1000f));
|
||||
|
||||
if (num1 != 0)
|
||||
if (isActive != 0)
|
||||
{
|
||||
int num3 = 16;
|
||||
int num4 = 320;
|
||||
while (num3 < num4 && !Collision.SolidCollision(Projectile.position + new Vector2(0f, num1 == -1 ? (float)(Projectile.height - num3 - 16) : 0f), Projectile.width, num3 + 16))
|
||||
num3 += 16;
|
||||
int heightIncrease = 16;
|
||||
int maxHeight = 320;
|
||||
while (heightIncrease < maxHeight && !Collision.SolidCollision(Projectile.position + new Vector2(0f, isActive == -1 ? (float)(Projectile.height - heightIncrease - 16) : 0f), Projectile.width, heightIncrease + 16))
|
||||
heightIncrease += 16;
|
||||
|
||||
if (num1 == -1)
|
||||
if (isActive == -1)
|
||||
{
|
||||
Projectile.position.Y += (float)Projectile.height;
|
||||
Projectile.height = num3;
|
||||
Projectile.position.Y -= (float)num3;
|
||||
Projectile.height = heightIncrease;
|
||||
Projectile.position.Y -= (float)heightIncrease;
|
||||
}
|
||||
else
|
||||
Projectile.height = num3;
|
||||
Projectile.height = heightIncrease;
|
||||
}
|
||||
|
||||
Projectile.ai[1] += 1f;
|
||||
@@ -84,52 +84,52 @@ namespace CalamityMod.Projectiles.Environment
|
||||
if (Projectile.localAI[0] == 0f)
|
||||
{
|
||||
Projectile.localAI[0] = 1f;
|
||||
for (int index1 = 0; index1 < 60; ++index1)
|
||||
for (int i = 0; i < 60; ++i)
|
||||
{
|
||||
int index2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, -2.5f * (float) -num1, 0, new Color(), 1f);
|
||||
Dust dust = Main.dust[index2];
|
||||
int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, -2.5f * (float) -isActive, 0, new Color(), 1f);
|
||||
Dust dust = Main.dust[brimDust];
|
||||
dust.alpha = 200;
|
||||
dust.velocity *= new Vector2(0.3f, 2f);
|
||||
dust.velocity.Y += (float)(2 * num1);
|
||||
dust.velocity.Y += (float)(2 * isActive);
|
||||
dust.scale += Main.rand.NextFloat();
|
||||
dust.position = new Vector2(Projectile.Center.X, Projectile.Center.Y + (float) Projectile.height * 0.5f * (float) -num1);
|
||||
dust.customData = (object) num2;
|
||||
if (num1 == -1 && Main.rand.Next(4) != 0)
|
||||
dust.position = new Vector2(Projectile.Center.X, Projectile.Center.Y + (float) Projectile.height * 0.5f * (float) -isActive);
|
||||
dust.customData = (object) dustCustomData;
|
||||
if (isActive == -1 && Main.rand.Next(4) != 0)
|
||||
{
|
||||
dust.velocity.Y -= 0.2f;
|
||||
}
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item34, Projectile.position);
|
||||
}
|
||||
if (num1 == 1)
|
||||
if (isActive == 1)
|
||||
{
|
||||
for (int index1 = 0; index1 < 9; ++index1)
|
||||
for (int i = 0; i < 9; ++i)
|
||||
{
|
||||
int index2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, -2.5f * (float) -num1, 0, new Color(), 1f);
|
||||
Dust dust = Main.dust[index2];
|
||||
int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, -2.5f * (float) -isActive, 0, new Color(), 1f);
|
||||
Dust dust = Main.dust[brimDust];
|
||||
dust.alpha = 200;
|
||||
dust.velocity *= new Vector2(0.3f, 2f);
|
||||
dust.velocity.Y += (float)(2 * num1);
|
||||
dust.velocity.Y += (float)(2 * isActive);
|
||||
dust.scale += Main.rand.NextFloat();
|
||||
dust.position = new Vector2(Projectile.Center.X, Projectile.Center.Y + (float) Projectile.height * 0.5f * (float) -num1);
|
||||
dust.customData = (object)num2;
|
||||
if (num1 == -1 && Main.rand.Next(4) != 0)
|
||||
dust.position = new Vector2(Projectile.Center.X, Projectile.Center.Y + (float) Projectile.height * 0.5f * (float) -isActive);
|
||||
dust.customData = (object)dustCustomData;
|
||||
if (isActive == -1 && Main.rand.Next(4) != 0)
|
||||
{
|
||||
Main.dust[index2].velocity.Y -= 0.2f;
|
||||
Main.dust[brimDust].velocity.Y -= 0.2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
int Height = (int)(Projectile.ai[1] / 60f * (float)Projectile.height) * 3;
|
||||
if (Height > Projectile.height)
|
||||
Height = Projectile.height;
|
||||
Vector2 Position = Projectile.position + (num1 == -1 ? new Vector2(0f, (float) (Projectile.height - Height)) : Vector2.Zero);
|
||||
Vector2 vector2 = Projectile.position + (num1 == -1 ? new Vector2(0f, (float) Projectile.height) : Vector2.Zero);
|
||||
for (int index1 = 0; index1 < 6; ++index1)
|
||||
Vector2 Position = Projectile.position + (isActive == -1 ? new Vector2(0f, (float) (Projectile.height - Height)) : Vector2.Zero);
|
||||
Vector2 vector2 = Projectile.position + (isActive == -1 ? new Vector2(0f, (float) Projectile.height) : Vector2.Zero);
|
||||
for (int i = 0; i < 6; ++i)
|
||||
{
|
||||
if (Main.rand.Next(3) < 2)
|
||||
{
|
||||
int index2 = Dust.NewDust(Position, Projectile.width, Height, dustType, 0f, 0f, 90, new Color(), 2.5f);
|
||||
Dust dust = Main.dust[index2];
|
||||
int brimDust = Dust.NewDust(Position, Projectile.width, Height, dustType, 0f, 0f, 90, new Color(), 2.5f);
|
||||
Dust dust = Main.dust[brimDust];
|
||||
dust.noGravity = true;
|
||||
dust.fadeIn = 1f;
|
||||
if (dust.velocity.Y > 0f)
|
||||
@@ -148,25 +148,25 @@ namespace CalamityMod.Projectiles.Environment
|
||||
dust.scale *= 0.3f;
|
||||
}
|
||||
else
|
||||
Main.dust[index2].velocity = Projectile.DirectionFrom(Main.dust[index2].position) * Main.dust[index2].velocity.Length() * 0.25f;
|
||||
Main.dust[index2].velocity.Y *= (float)-num1;
|
||||
Main.dust[index2].customData = (object)num2;
|
||||
Main.dust[brimDust].velocity = Projectile.DirectionFrom(Main.dust[brimDust].position) * Main.dust[brimDust].velocity.Length() * 0.25f;
|
||||
Main.dust[brimDust].velocity.Y *= (float)-isActive;
|
||||
Main.dust[brimDust].customData = (object)dustCustomData;
|
||||
}
|
||||
}
|
||||
for (int index1 = 0; index1 < 6; ++index1)
|
||||
for (int i = 0; i < 6; ++i)
|
||||
{
|
||||
if (Main.rand.NextFloat() >= 0.5f)
|
||||
{
|
||||
int index2 = Dust.NewDust(Position, Projectile.width, Height, dustType, 0f, -2.5f * (float) -num1, 0, new Color(), 1f);
|
||||
Dust dust = Main.dust[index2];
|
||||
int brimDust = Dust.NewDust(Position, Projectile.width, Height, dustType, 0f, -2.5f * (float) -isActive, 0, new Color(), 1f);
|
||||
Dust dust = Main.dust[brimDust];
|
||||
dust.alpha = 200;
|
||||
dust.velocity *= new Vector2(0.6f, 1.5f);
|
||||
dust.scale += Main.rand.NextFloat();
|
||||
if (num1 == -1 && Main.rand.Next(4) != 0)
|
||||
if (isActive == -1 && Main.rand.Next(4) != 0)
|
||||
{
|
||||
dust.velocity.Y -= 0.2f;
|
||||
}
|
||||
dust.customData = (object)num2;
|
||||
dust.customData = (object)dustCustomData;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,20 +46,20 @@ namespace CalamityMod.Projectiles.Environment
|
||||
}
|
||||
if (Projectile.scale > 0.25f)
|
||||
{
|
||||
for (int num246 = 0; num246 < 2; num246++)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
float num248 = 0f;
|
||||
if (num246 == 1)
|
||||
float dustYOffset = 0f;
|
||||
if (i == 1)
|
||||
{
|
||||
num248 = Projectile.velocity.Y * 0.5f;
|
||||
dustYOffset = Projectile.velocity.Y * 0.5f;
|
||||
}
|
||||
int num249 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y + 3f + num248) - Projectile.velocity * 0.5f, Projectile.width - 8, Projectile.height - 8, 6, 0f, 0f, 100, default, Projectile.scale);
|
||||
Main.dust[num249].scale *= 2f + (float)Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[num249].velocity *= 0.2f;
|
||||
Main.dust[num249].noGravity = true;
|
||||
num249 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y + 3f + num248) - Projectile.velocity * 0.5f, Projectile.width - 8, Projectile.height - 8, 31, 0f, 0f, 100, default, Projectile.scale * 0.5f);
|
||||
Main.dust[num249].fadeIn = 1f + (float)Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[num249].velocity *= 0.05f;
|
||||
int lavaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y + 3f + dustYOffset) - Projectile.velocity * 0.5f, Projectile.width - 8, Projectile.height - 8, 6, 0f, 0f, 100, default, Projectile.scale);
|
||||
Main.dust[lavaDust].scale *= 2f + (float)Main.rand.Next(10) * 0.1f;
|
||||
Main.dust[lavaDust].velocity *= 0.2f;
|
||||
Main.dust[lavaDust].noGravity = true;
|
||||
lavaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y + 3f + dustYOffset) - Projectile.velocity * 0.5f, Projectile.width - 8, Projectile.height - 8, 31, 0f, 0f, 100, default, Projectile.scale * 0.5f);
|
||||
Main.dust[lavaDust].fadeIn = 1f + (float)Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[lavaDust].velocity *= 0.05f;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -86,9 +86,9 @@ namespace CalamityMod.Projectiles.Environment
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture2D13 = ModContent.Request<Texture2D>(Texture).Value;
|
||||
int num214 = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
int framing = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Loaded 100 of 794 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user