Position vector optimizations

This commit is contained in:
Altixal committed 2024-04-04 04:22:36 +07:00
1 parent cb9666a465
commit 642325130f
317 files changed
+696 -696

No files matched your search

+3 -3
View File
@@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Boss
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
int randomDustType = Main.rand.NextBool() ? 107 : 110;
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);
int plasmaDust = Dust.NewDust(Projectile.position, 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;
@@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Boss
dust.velocity *= 3f;
dust = Main.dust[plasmaDust];
plasmaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f);
plasmaDust = Dust.NewDust(Projectile.position, 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[plasmaDust];
@@ -114,7 +114,7 @@ namespace CalamityMod.Projectiles.Boss
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
int randomDustType = Main.rand.NextBool() ? 107 : 110;
int plasmaDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f);
int plasmaDust2 = Dust.NewDust(Projectile.position, 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;
+3 -3
View File
@@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Boss
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
int randomDustType = Main.rand.NextBool() ? 107 : 110;
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);
int plasmaDust = Dust.NewDust(Projectile.position, 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;
@@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Boss
dust.velocity *= 3f;
dust = Main.dust[plasmaDust];
plasmaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f);
plasmaDust = Dust.NewDust(Projectile.position, 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[plasmaDust];
@@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Boss
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
int randomDustType = Main.rand.NextBool() ? 107 : 110;
int plasmaDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f);
int plasmaDust2 = Dust.NewDust(Projectile.position, 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;
+3 -3
View File
@@ -89,14 +89,14 @@ namespace CalamityMod.Projectiles.Boss
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
int randomDustType = Main.rand.NextBool() ? 107 : 110;
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);
int plasmaDust = Dust.NewDust(Projectile.position, 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[plasmaDust];
dust.velocity *= 3f;
plasmaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f);
plasmaDust = Dust.NewDust(Projectile.position, 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[plasmaDust];
@@ -114,7 +114,7 @@ namespace CalamityMod.Projectiles.Boss
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
int randomDustType = Main.rand.NextBool() ? 107 : 110;
int plasmaDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f);
int plasmaDust2 = Dust.NewDust(Projectile.position, 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;
+3 -3
View File
@@ -97,14 +97,14 @@ namespace CalamityMod.Projectiles.Boss
int randomDustType = Main.rand.Next(2) == 0 ? 206 : 229;
float scale = randomDustType == 206 ? 1.5f : 1f;
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);
int teslaDust = Dust.NewDust(Projectile.position, 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[teslaDust];
dust.velocity *= 3f;
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);
teslaDust = Dust.NewDust(Projectile.position, 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[teslaDust];
@@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles.Boss
int randomDustType = Main.rand.Next(2) == 0 ? 206 : 229;
float scale = randomDustType == 206 ? 1.5f : 1f;
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);
int teslaDust2 = Dust.NewDust(Projectile.position, 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;
+4 -4
View File
@@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Boss
Projectile.ai[0] += 1f;
if (Projectile.ai[0] > 15f)
{
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);
int astralDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 0.8f);
Main.dust[astralDust].noGravity = true;
Main.dust[astralDust].velocity *= 0f;
}
@@ -162,14 +162,14 @@ namespace CalamityMod.Projectiles.Boss
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
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);
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 50, default, 1f);
}
for (int j = 0; j < 20; j++)
{
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);
int deathAstralDust = Dust.NewDust(Projectile.position, 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, DustID.ShadowbeamStaff, 0f, 0f, 50, default, 1f);
deathAstralDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 50, default, 1f);
Main.dust[deathAstralDust].velocity *= 2f;
Main.dust[deathAstralDust].noGravity = true;
}
+1 -1
View File
@@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Boss
Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2;
int bloody = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 0.5f);
int bloody = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 0.5f);
Main.dust[bloody].noGravity = true;
Main.dust[bloody].velocity *= 0f;
+1 -1
View File
@@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Boss
Projectile.localAI[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);
int brimDust = Dust.NewDust(Projectile.position, 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;
+3 -3
View File
@@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Boss
{
for (int i = 0; i < 3; i++)
{
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);
int cosmiliteDust = Dust.NewDust(Projectile.position, 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())
@@ -116,10 +116,10 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 5; j++)
{
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);
int cosmiliteDust2 = Dust.NewDust(Projectile.position, 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);
cosmiliteDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1f);
Main.dust[cosmiliteDust2].noGravity = true;
Main.dust[cosmiliteDust2].velocity *= 2f;
}
+3 -3
View File
@@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Boss
{
for (int i = 0; i < 3; i++)
{
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);
int cosmiliteDust = Dust.NewDust(Projectile.position, 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())
@@ -114,10 +114,10 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 5; j++)
{
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);
int cosmiliteDust2 = Dust.NewDust(Projectile.position, 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);
cosmiliteDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 1f);
Main.dust[cosmiliteDust2].noGravity = true;
Main.dust[cosmiliteDust2].velocity *= 2f;
}
+3 -3
View File
@@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Boss
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
for (int i = 0; i < 5; i++)
{
int purpleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.2f);
int purpleDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.2f);
Main.dust[purpleDust].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -115,10 +115,10 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 10; j++)
{
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);
int astralDust = Dust.NewDust(Projectile.position, 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);
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 1f);
}
// Spawn diagonal lasers
+3 -3
View File
@@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Boss
for (int i = 0; i < 15; i++)
{
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);
int ectoDust = Dust.NewDust(Projectile.position, 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())
@@ -71,10 +71,10 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 30; j++)
{
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);
int ectoDust2 = Dust.NewDust(Projectile.position, 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);
ectoDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 1f);
Main.dust[ectoDust2].noGravity = true;
Main.dust[ectoDust2].velocity *= 2f;
}
+3 -3
View File
@@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Boss
Projectile.position.Y = Projectile.position.Y - Projectile.height / 2;
for (int i = 0; i < 5; i++)
{
int godSlay = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
int godSlay = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
Main.dust[godSlay].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -95,10 +95,10 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 10; j++)
{
int godSlay2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 3f);
int godSlay2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 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, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
godSlay2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
Main.dust[godSlay2].velocity *= 2f;
}
for (int k = 0; k < 200; k++)
+1 -1
View File
@@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Boss
{
for (int i = 0; i < 5; i++)
{
int mistDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, default, 2f);
int mistDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, default, 2f);
Main.dust[mistDust].velocity *= 3f;
if (Main.rand.NextBool())
{
+1 -1
View File
@@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Boss
{
Projectile.alpha = 0;
}
int sandyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1f);
int sandyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1f);
Main.dust[sandyDust].noGravity = true;
Main.dust[sandyDust].velocity *= 0f;
}
+1 -1
View File
@@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Boss
public override void AI()
{
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);
Vector2 projDirection = Projectile.Center;
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));
+1 -1
View File
@@ -165,7 +165,7 @@ namespace CalamityMod.Projectiles.Boss
if (Main.netMode != NetmodeID.MultiplayerClient && Main.zenithWorld)
{
Vector2 valueBoom = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f);
Vector2 valueBoom = Projectile.Center;
float spreadBoom = 15f * 0.0174f;
double startAngleBoom = Math.Atan2(Projectile.velocity.X, Projectile.velocity.Y) - spreadBoom / 2;
double deltaAngleBoom = spreadBoom / 8f;
+4 -4
View File
@@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Boss
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
for (int i = 0; i < 10; i++)
{
int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
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())
@@ -136,15 +136,15 @@ namespace CalamityMod.Projectiles.Boss
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
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);
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 2f);
Main.dust[dust].noGravity = true;
}
for (int k = 0; k < 40; k++)
{
int profaned = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 4f);
int profaned = Dust.NewDust(Projectile.position, 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);
profaned = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 2f);
Main.dust[profaned].velocity *= 2f;
Main.dust[profaned].noGravity = true;
}
+6 -6
View File
@@ -59,15 +59,15 @@ namespace CalamityMod.Projectiles.Boss
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
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);
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, velocityY, 50, default, 1.5f);
Main.dust[dust].noGravity = true;
}
for (int j = 0; j < 20; j++)
{
int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, velocityY, 0, default, 2.5f);
int holyDust = Dust.NewDust(Projectile.position, 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);
holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, velocityY, 50, default, 1.5f);
Main.dust[holyDust].velocity *= 1.5f;
Main.dust[holyDust].noGravity = true;
}
@@ -121,15 +121,15 @@ namespace CalamityMod.Projectiles.Boss
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
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);
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1.5f);
Main.dust[dust].noGravity = true;
}
for (int j = 0; j < 20; j++)
{
int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 2.5f);
int holyDust = Dust.NewDust(Projectile.position, 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);
holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1.5f);
Main.dust[holyDust].velocity *= 2f;
Main.dust[holyDust].noGravity = true;
}
+3 -3
View File
@@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Boss
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
for (int i = 0; i < 5; i++)
{
int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
Main.dust[holyDust].noGravity = true;
if (Main.rand.NextBool())
{
@@ -134,9 +134,9 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 10; j++)
{
int holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f);
int holyDust2 = Dust.NewDust(Projectile.position, 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);
holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
Main.dust[holyDust2].noGravity = true;
}
}
+3 -3
View File
@@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Boss
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
for (int i = 0; i < 5; i++)
{
int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
Main.dust[holyDust].noGravity = true;
if (Main.rand.NextBool())
{
@@ -115,9 +115,9 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 10; j++)
{
int holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f);
int holyDust2 = Dust.NewDust(Projectile.position, 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);
holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
Main.dust[holyDust2].noGravity = true;
}
}
+3 -3
View File
@@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Boss
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
for (int i = 0; i < 5; i++)
{
int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
Main.dust[holyDust].noGravity = true;
if (Main.rand.NextBool())
{
@@ -119,9 +119,9 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 10; j++)
{
int holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f);
int holyDust2 = Dust.NewDust(Projectile.position, 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);
holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
Main.dust[holyDust2].noGravity = true;
}
}
+3 -3
View File
@@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Boss
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
for (int i = 0; i < 5; i++)
{
int holyYellow = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f);
int holyYellow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f);
Main.dust[holyYellow].velocity *= 3f;
Main.dust[holyYellow].noGravity = true;
if (Main.rand.NextBool())
@@ -114,10 +114,10 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 8; j++)
{
int holyYellow2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PlatinumCoin, 0f, 0f, 100, default, 3f);
int holyYellow2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PlatinumCoin, 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, DustID.GoldCoin, 0f, 0f, 100, default, 2f);
holyYellow2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f);
Main.dust[holyYellow2].velocity *= 2f;
Main.dust[holyYellow2].noGravity = true;
}
+2 -2
View File
@@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Boss
for (int i = 0; i < 2; i++)
{
int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Frost, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f);
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Frost, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0.3f;
}
@@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Boss
//SoundEngine.PlaySound(SoundID.Item27, Projectile.Center);
for (int i = 0; i < 5; i++)
{
int iceDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Frost, 0f, 0f, 0, default, 1f);
int iceDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Frost, 0f, 0f, 0, default, 1f);
if (!Main.rand.NextBool(3))
{
Dust dust = Main.dust[iceDust];
+3 -3
View File
@@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Boss
{
for (int i = 0; i < 8; i++)
{
int iceDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 2f);
int iceDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 2f);
Main.dust[iceDust].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -47,10 +47,10 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 14; j++)
{
int iceDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 3f);
int iceDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 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, DustID.IceRod, 0f, 0f, 100, default, 2f);
iceDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 2f);
Main.dust[iceDust2].velocity *= 2f;
}
+3 -3
View File
@@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Boss
for (int i = 0; i < 2; i++)
{
int icyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Frost, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f);
int icyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Frost, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f);
Main.dust[icyDust].noGravity = true;
Dust dust = Main.dust[icyDust];
dust.velocity *= 0.3f;
@@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Boss
for (int i = 0; i < 2; i++)
{
int icyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Frost, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f);
int icyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Frost, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f);
Main.dust[icyDust].noGravity = true;
Dust dust = Main.dust[icyDust];
dust.velocity *= 0.3f;
@@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Boss
//SoundEngine.PlaySound(SoundID.Item27 with { Volume = SoundID.Item27.Volume * 0.25f }, Projectile.Center);
for (int j = 0; j < 3; j++)
{
int snowDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Snow, 0f, 0f, 0, default, 1f);
int snowDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Snow, 0f, 0f, 0, default, 1f);
Main.dust[snowDust].noGravity = true;
Main.dust[snowDust].noLight = true;
Main.dust[snowDust].scale = 0.7f;
+3 -3
View File
@@ -102,14 +102,14 @@ namespace CalamityMod.Projectiles.Boss
Vector2 dustVelocity = dustRotation * Projectile.velocity.Length();
for (int i = 0; i < 10; i++)
{
int ichorDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Ichor, 0f, 0f, 200, default, 1.6f);
int ichorDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Ichor, 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 += dustVelocity * Main.rand.NextFloat();
ichorDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Ichor, 0f, 0f, 100, default, 0.8f);
ichorDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Ichor, 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;
@@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 5; j++)
{
int ichorDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Ichor, 0f, 0f, 0, default, 2f);
int ichorDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Ichor, 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;
+1 -1
View File
@@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Boss
Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2;
int ichorDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Ichor, 0f, 0f, 100, default, 0.5f);
int ichorDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Ichor, 0f, 0f, 100, default, 0.5f);
Main.dust[ichorDust].noGravity = true;
Main.dust[ichorDust].velocity *= 0f;
+2 -2
View File
@@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Boss
Projectile.rotation += 0.3f * (float)Projectile.direction;
for (int index = 0; index < 2; ++index)
{
int ruby = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemRuby, Projectile.velocity.X, Projectile.velocity.Y, 90, new Color(), 1.2f);
int ruby = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemRuby, Projectile.velocity.X, Projectile.velocity.Y, 90, new Color(), 1.2f);
Dust dust = Main.dust[ruby];
dust.noGravity = true;
dust.velocity *= 0.3f;
@@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Boss
SoundEngine.PlaySound(SoundID.Dig, Projectile.Center);
for (int index1 = 0; index1 < 15; ++index1)
{
int ruby = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemRuby, Projectile.oldVelocity.X, Projectile.oldVelocity.Y, 50, new Color(), 1.2f);
int ruby = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemRuby, Projectile.oldVelocity.X, Projectile.oldVelocity.Y, 50, new Color(), 1.2f);
Dust dust = Main.dust[ruby];
dust.noGravity = true;
dust.scale *= 1.25f;
+3 -3
View File
@@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Boss
SoundEngine.PlaySound(SoundID.Item14, Projectile.Center);
for (int i = 0; i < 10; i++)
{
int meteorDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f);
int meteorDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f);
Main.dust[meteorDust].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -83,10 +83,10 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 15; j++)
{
int meteorDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 3f);
int meteorDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 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, DustID.CopperCoin, 0f, 0f, 100, default, 2f);
meteorDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f);
Main.dust[meteorDust2].velocity *= 2f;
}
}
+3 -3
View File
@@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Boss
int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate);
for (int i = 0; i < 3; i++)
{
int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
Main.dust[holyDust].noGravity = true;
if (Main.rand.NextBool())
{
@@ -115,9 +115,9 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 5; j++)
{
int holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f);
int holyDust2 = Dust.NewDust(Projectile.position, 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);
holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f);
Main.dust[holyDust2].noGravity = true;
}
}
+4 -4
View File
@@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Boss
}
else
{
int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 0.8f);
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 0.8f);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0f;
}
@@ -118,7 +118,7 @@ namespace CalamityMod.Projectiles.Boss
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
for (int i = 0; i < 4; i++)
{
int shroomDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f);
int shroomDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f);
Main.dust[shroomDust].velocity *= 1.5f;
if (Main.rand.NextBool())
{
@@ -128,10 +128,10 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 12; j++)
{
int shroomDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 2f);
int shroomDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 2f);
Main.dust[shroomDust2].noGravity = true;
Main.dust[shroomDust2].velocity *= 2f;
Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f);
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f);
}
}
}
+4 -4
View File
@@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Boss
}
else
{
int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 0.8f);
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 0.8f);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0f;
}
@@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Boss
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
for (int i = 0; i < 4; i++)
{
int shroomDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f);
int shroomDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f);
Main.dust[shroomDust].velocity *= 1.5f;
if (Main.rand.NextBool())
{
@@ -131,10 +131,10 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 12; j++)
{
int shroomDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 2f);
int shroomDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 2f);
Main.dust[shroomDust2].noGravity = true;
Main.dust[shroomDust2].velocity *= 2f;
Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f);
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueFairy, 0f, 0f, 100, default, 1.5f);
}
if (Main.zenithWorld && NPC.CountNPCS(NPCID.Crab) < 20 && Main.netMode != NetmodeID.MultiplayerClient)
+2 -2
View File
@@ -75,10 +75,10 @@ namespace CalamityMod.Projectiles.Boss
for (int d = 0; d < 6; d++)
{
int acid = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default(Color), 3f);
int acid = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default(Color), 3f);
Main.dust[acid].noGravity = true;
Main.dust[acid].velocity *= 5f;
acid = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default(Color), 2f);
acid = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default(Color), 2f);
Main.dust[acid].velocity *= 2f;
Main.dust[acid].noGravity = true;
}
+3 -3
View File
@@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Boss
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
for (int i = 0; i < 3; i++)
{
int killGhostDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.2f);
int killGhostDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.2f);
Main.dust[killGhostDust].velocity *= 3f;
Main.dust[killGhostDust].noGravity = true;
if (Main.rand.NextBool())
@@ -104,10 +104,10 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 5; j++)
{
int killGhostDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.7f);
int killGhostDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 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, DustID.DungeonSpirit, 0f, 0f, 100, default, 1f);
killGhostDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1f);
Main.dust[killGhostDust2].velocity *= 2f;
}
}
+3 -3
View File
@@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Boss
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
for (int i = 0; i < 3; i++)
{
int killGhostDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.2f);
int killGhostDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.2f);
Main.dust[killGhostDust].velocity *= 3f;
Main.dust[killGhostDust].noGravity = true;
if (Main.rand.NextBool())
@@ -104,10 +104,10 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 5; j++)
{
int killGhostDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.7f);
int killGhostDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 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, DustID.RedTorch, 0f, 0f, 100, default, 1f);
killGhostDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1f);
Main.dust[killGhostDust2].velocity *= 2f;
}
}
+1 -1
View File
@@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Boss
{
for (int i = 0; i < 40; i++)
{
int redDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1f);
int redDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1f);
Main.dust[redDust].velocity *= 3f;
Main.dust[redDust].velocity += Projectile.velocity * 0.75f;
Main.dust[redDust].scale *= 1.2f;
+1 -1
View File
@@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Boss
{
for (int i = 0; i < 40; i++)
{
int redDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1f);
int redDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1f);
Main.dust[redDust].velocity *= 3f;
Main.dust[redDust].velocity += Projectile.velocity * 0.75f;
Main.dust[redDust].scale *= 1.2f;
+3 -3
View File
@@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Boss
Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2);
for (int i = 0; i < 15; i++)
{
int phantomDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.2f);
int phantomDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.2f);
Main.dust[phantomDust].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -91,10 +91,10 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 30; j++)
{
int phantomDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 1.7f);
int phantomDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.DungeonSpirit, 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, DustID.RedTorch, 0f, 0f, 100, default, 1f);
phantomDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1f);
Main.dust[phantomDust2].velocity *= 2f;
}
}
+3 -3
View File
@@ -108,14 +108,14 @@ namespace CalamityMod.Projectiles.Boss
SoundEngine.PlaySound(SoundID.Item109, Projectile.Center);
for (int j = 0; j < 6; j++)
{
Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f);
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f);
}
for (int k = 0; k < 10; k++)
{
int redDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 2.5f);
int redDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 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, DustID.RedTorch, 0f, 0f, 100, default, 1.5f);
redDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f);
Main.dust[redDust].velocity *= 2f;
Main.dust[redDust].noGravity = true;
}
+2 -2
View File
@@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Boss
if (Projectile.Opacity > 1f)
Projectile.Opacity = 1f;
int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 0.8f);
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 0.8f);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0f;
}
@@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Boss
randoAdjuster = rando3 / randoAdjuster;
rando1 *= randoAdjuster;
rando2 *= randoAdjuster;
int sandyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedBrown, 0f, 0f, 100, default, 1.2f);
int sandyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedBrown, 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;
+4 -4
View File
@@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Boss
SoundEngine.PlaySound(SoundID.Item73, Projectile.Center);
}
int shadowDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f);
int shadowDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f);
Main.dust[shadowDust].noGravity = true;
Main.dust[shadowDust].velocity *= 0f;
@@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Boss
SoundEngine.PlaySound(SoundID.Item74, Projectile.Center);
for (int i = 0; i < 5; i++)
{
int killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f);
int killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f);
Main.dust[killDust].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -107,10 +107,10 @@ namespace CalamityMod.Projectiles.Boss
}
for (int j = 0; j < 10; j++)
{
int killDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f);
int killDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 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, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f);
killDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f);
Main.dust[killDust2].velocity *= 2f;
}
}
+3 -3
View File
@@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Boss
if (Projectile.velocity.Length() < 12f)
Projectile.velocity *= 1.01f;
int vileDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y),
int vileDust = Dust.NewDust(Projectile.position,
Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 100, default, 1.5f);
Main.dust[vileDust].noGravity = true;
@@ -51,11 +51,11 @@ namespace CalamityMod.Projectiles.Boss
SoundEngine.PlaySound(SoundID.Item10, Projectile.Center);
for (int i = 0; i < 6; i++)
{
int killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, -Projectile.velocity.X * 0.2f, -Projectile.velocity.Y * 0.2f, 100, default, 2.5f);
int killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, -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;
killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, -Projectile.velocity.X * 0.2f, -Projectile.velocity.Y * 0.2f, 100, default, 1.2f);
killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid, -Projectile.velocity.X * 0.2f, -Projectile.velocity.Y * 0.2f, 100, default, 1.2f);
dust = Main.dust[killDust];
dust.velocity *= 2f;
}
+1 -1
View File
@@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Boss
{
for (int i = 0; i < 10; i++)
{
int waterDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 2f);
int waterDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 2f);
Main.dust[waterDust].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
dustVel = dustVel.RotatedBy(-angleRandom);
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
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);
int burstDust = Dust.NewDust(Projectile.position, 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;
@@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
dust2.velocity *= 3f;
dust2 = Main.dust[burstDust];
burstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 100, default, 0.66f);
burstDust = Dust.NewDust(Projectile.position, 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[burstDust];
@@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
dustVel = dustVel.RotatedBy(-angleRandom);
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
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);
int moreBurstDust = Dust.NewDust(Projectile.position, 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;
@@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
dustVel = dustVel.RotatedBy(-angleRandom);
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
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);
int burstDust = Dust.NewDust(Projectile.position, 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;
@@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
dust2.velocity *= 3f;
dust2 = Main.dust[burstDust];
burstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 100, default, 1.9f);
burstDust = Dust.NewDust(Projectile.position, 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[burstDust];
@@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
dustVel = dustVel.RotatedBy(-angleRandom);
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
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);
int burstDust2 = Dust.NewDust(Projectile.position, 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;
@@ -164,7 +164,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
int randomDustType = Main.rand.NextBool(2)? dust1 : dust2;
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);
int plasmaBurstDust = Dust.NewDust(Projectile.position, 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;
@@ -172,7 +172,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
dust.velocity *= 3f;
dust = Main.dust[plasmaBurstDust];
plasmaBurstDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f);
plasmaBurstDust = Dust.NewDust(Projectile.position, 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[plasmaBurstDust];
@@ -192,7 +192,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
int randomDustType = Main.rand.NextBool(2)? dust1 : dust2;
int plasmaBurstDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f);
int plasmaBurstDust2 = Dust.NewDust(Projectile.position, 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;
@@ -213,7 +213,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
dustVel = dustVel.RotatedBy(-angleRandom);
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
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);
int pulseDust = Dust.NewDust(Projectile.position, 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;
@@ -221,7 +221,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
dust.velocity *= 3f;
dust = Main.dust[pulseDust];
pulseDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust1, dustVel.X, dustVel.Y, 100, default, 1f);
pulseDust = Dust.NewDust(Projectile.position, 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[pulseDust];
@@ -240,7 +240,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
dustVel = dustVel.RotatedBy(-angleRandom);
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
int pulseDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dust2, dustVel.X, dustVel.Y, 0, default, 3f);
int pulseDust2 = Dust.NewDust(Projectile.position, 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;
@@ -236,7 +236,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
int randomDustType = Main.rand.NextBool(2)? dustArray[4] : dustArray[5];
float scale = randomDustType == dustArray[4] ? 1.5f : 1f;
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);
int electricDust = Dust.NewDust(Projectile.position, 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;
@@ -244,7 +244,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
dust.velocity *= 3f;
dust = Main.dust[electricDust];
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);
electricDust = Dust.NewDust(Projectile.position, 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[electricDust];
@@ -265,7 +265,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
int randomDustType = Main.rand.NextBool(2)? dustArray[4] : dustArray[5];
float scale = randomDustType == dustArray[4] ? 1.5f : 1f;
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);
int electricDust2 = Dust.NewDust(Projectile.position, 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;
+4 -4
View File
@@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Enemy
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
for (int i = 0; i < 10; i++)
{
int flameDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f);
int flameDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f);
Main.dust[flameDust].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -46,10 +46,10 @@ namespace CalamityMod.Projectiles.Enemy
}
for (int j = 0; j < 20; j++)
{
int sparkDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 3f);
int sparkDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 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, DustID.GoldCoin, 0f, 0f, 100, default, 2f);
sparkDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f);
Main.dust[sparkDust].velocity *= 2f;
}
count += 1f;
@@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Enemy
{
for (int k = 0; k < 5; k++)
{
int sparky = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 0.75f);
int sparky = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 0.75f);
Main.dust[sparky].velocity *= 0f;
}
}
+3 -3
View File
@@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Enemy
{
for (int i = 0; i < 20; i++)
{
int waterDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 2f);
int waterDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 2f);
Main.dust[waterDust].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Enemy
Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0.35f / 255f);
for (int j = 0; j < 10; j++)
{
int watery = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 1.2f);
int watery = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 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;
@@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Enemy
randoAdjuster = rando3 / randoAdjuster;
rando1 *= randoAdjuster;
rando2 *= randoAdjuster;
int killWaterDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, default, 1.2f);
int killWaterDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 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;
+3 -3
View File
@@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Enemy
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
for (int i = 0; i < 10; i++)
{
int inkDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Wraith, 0f, 0f, 100, default, 2f);
int inkDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Wraith, 0f, 0f, 100, default, 2f);
Main.dust[inkDust].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -83,10 +83,10 @@ namespace CalamityMod.Projectiles.Enemy
}
for (int j = 0; j < 15; j++)
{
int inkDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Asphalt, 0f, 0f, 100, default, 3f);
int inkDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Asphalt, 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, DustID.Asphalt, 0f, 0f, 100, default, 2f);
inkDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Asphalt, 0f, 0f, 100, default, 2f);
Main.dust[inkDust2].velocity *= 2f;
}
}
+1 -1
View File
@@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Enemy
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);
int explodeBrimStyle = Dust.NewDust(Projectile.position, 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;
+1 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Healing
Projectile.velocity *= 0.95f;
Projectile.HealingProjectile(3, (int)Projectile.ai[0], 6f, 15f, false);
int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 1f);
int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 1f);
Dust dust = Main.dust[dusty];
dust.noGravity = true;
dust.position.X -= Projectile.velocity.X * 0.2f;
+1 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Healing
Projectile.velocity.Y *= 0.98f;
Projectile.HealingProjectile(15, Projectile.owner, 12f, 15f, false);
int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 200, 0), 1.5f);
int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 200, 0), 1.5f);
Dust dust = Main.dust[dusty];
dust.noGravity = true;
dust.position.X -= Projectile.velocity.X * 0.2f;
+3 -3
View File
@@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Healing
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
for (int i = 0; i < 10; i++)
{
int godSlay = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
int godSlay = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
Main.dust[godSlay].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -64,10 +64,10 @@ namespace CalamityMod.Projectiles.Healing
}
for (int j = 0; j < 15; j++)
{
int godSlay2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 3f);
int godSlay2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 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, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
godSlay2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
Main.dust[godSlay2].velocity *= 2f;
}
}
+1 -1
View File
@@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Healing
public override void AI()
{
Projectile.HealingProjectile((int)Projectile.ai[1], (int)Projectile.ai[0], 8f, 15f);
int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255));
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255));
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0f;
Main.dust[dust].position.X -= Projectile.velocity.X * 0.2f;
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Healing
public override void AI()
{
Projectile.HealingProjectile((int)Projectile.ai[1], (int)Projectile.ai[0], 6.5f, 15f);
int dusty = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
Dust dust = Main.dust[dusty];
dust.noGravity = true;
dust.position.X -= Projectile.velocity.X * 0.2f;
+1 -1
View File
@@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Healing
public override void AI()
{
Projectile.HealingProjectile((int)Projectile.ai[1], (int)Projectile.ai[0], 18f, 10f);
int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100);
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0f;
Main.dust[dust].position.X -= Projectile.velocity.X * 0.2f;
+1 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Healing
for (int i = 0; i < 3; i++)
{
int magicHeal = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.MagicMirror, 0f, 0f, 100, default, 1.3f);
int magicHeal = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.MagicMirror, 0f, 0f, 100, default, 1.3f);
Main.dust[magicHeal].noGravity = true;
Main.dust[magicHeal].velocity *= 0f;
}
+3 -3
View File
@@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Magic
SoundEngine.PlaySound(SoundID.Item14, Projectile.Center);
for (int i = 0; i < 30; i++)
{
int abyssal = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.2f);
int abyssal = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.2f);
Main.dust[abyssal].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -54,10 +54,10 @@ namespace CalamityMod.Projectiles.Magic
}
for (int j = 0; j < 60; j++)
{
int abyssal2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.7f);
int abyssal2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.7f);
Main.dust[abyssal2].noGravity = true;
Main.dust[abyssal2].velocity *= 5f;
abyssal2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f);
abyssal2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f);
Main.dust[abyssal2].velocity *= 2f;
}
}
+4 -4
View File
@@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Magic
greenDust.fadeIn = 0.5f;
greenDust.noGravity = true;
int moreGreen = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 0, default, 1f);
int moreGreen = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 0, default, 1f);
Main.dust[moreGreen].velocity *= 0.5f;
Main.dust[moreGreen].scale *= 1.3f;
Main.dust[moreGreen].fadeIn = 1f;
@@ -69,14 +69,14 @@ namespace CalamityMod.Projectiles.Magic
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
for (int i = 0; i < 4; i++)
{
Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Smoke, 0f, 0f, 100, default, 1.5f);
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Smoke, 0f, 0f, 100, default, 1.5f);
}
for (int j = 0; j < 16; j++)
{
int killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, default, 2.5f);
int killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, 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, DustID.TerraBlade, 0f, 0f, 100, default, 1.5f);
killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, default, 1.5f);
Main.dust[killDust].velocity *= 2f;
Main.dust[killDust].noGravity = true;
}
+4 -4
View File
@@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Magic
flaming.fadeIn = 0.5f;
flaming.noGravity = true;
int fiery = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 0, new Color(255, Main.DiscoG, 0), 1f);
int fiery = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 0, new Color(255, Main.DiscoG, 0), 1f);
Main.dust[fiery].velocity *= 0.5f;
Main.dust[fiery].scale *= 1.3f;
Main.dust[fiery].fadeIn = 1f;
@@ -70,14 +70,14 @@ namespace CalamityMod.Projectiles.Magic
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
for (int i = 0; i < 8; i++)
{
Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 0), 1.5f);
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 0), 1.5f);
}
for (int j = 0; j < 32; j++)
{
int killFire = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 0), 2.5f);
int killFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 0), 2.5f);
Main.dust[killFire].noGravity = true;
Main.dust[killFire].velocity *= 3f;
killFire = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 0), 1.5f);
killFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, new Color(255, Main.DiscoG, 0), 1.5f);
Main.dust[killFire].velocity *= 2f;
Main.dust[killFire].noGravity = true;
}
+5 -5
View File
@@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Magic
if (Main.player[Projectile.owner].channel)
{
float projDelay = 20f;
Vector2 vector10 = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f);
Vector2 vector10 = Projectile.Center;
float projXDirection = (float)Main.mouseX + Main.screenPosition.X - vector10.X;
float projYDirection = (float)Main.mouseY + Main.screenPosition.Y - vector10.Y;
if (Main.player[Projectile.owner].gravDir == -1f)
@@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Magic
else
{
Projectile.netUpdate = true;
Vector2 projDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f);
Vector2 projDirection = Projectile.Center;
float projXDir = (float)Main.mouseX + Main.screenPosition.X - projDirection.X;
float projYDir = (float)Main.mouseY + Main.screenPosition.Y - projDirection.Y;
if (Main.player[Projectile.owner].gravDir == -1f)
@@ -149,18 +149,18 @@ namespace CalamityMod.Projectiles.Magic
bool isInTile = WorldGen.SolidTile(Framing.GetTileSafely((int)Projectile.position.X / 16, (int)Projectile.position.Y / 16));
for (int m = 0; m < 4; m++)
{
Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f);
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f);
}
for (int n = 0; n < 4; n++)
{
int beastial = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 0, default, 2.5f);
int beastial = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 0, default, 2.5f);
Main.dust[beastial].noGravity = true;
Main.dust[beastial].velocity *= 3f;
if (isInTile)
{
Main.dust[beastial].noLight = true;
}
beastial = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f);
beastial = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1.5f);
Main.dust[beastial].velocity *= 2f;
Main.dust[beastial].noGravity = true;
if (isInTile)
+1 -1
View File
@@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Magic
}
float projVelModifier = 0.1f;
Vector2 projDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f);
Vector2 projDirection = Projectile.Center;
float xDest = projX - projDirection.X;
float yDest = projY - projDirection.Y;
float destinationDist = (float)Math.Sqrt((double)(xDest * xDest + yDest * yDest));
+1 -1
View File
@@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Magic
}
Projectile.ai[0] += 1f;
int dustType = DustID.Blood;
int blood = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f);
int blood = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f);
Dust dust = Main.dust[blood];
if (Main.rand.NextBool(3))
{
+1 -1
View File
@@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Magic
Projectile.localAI[0] += 1f;
if (Projectile.localAI[0] > 4f)
{
int brimstone = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
int brimstone = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
Main.dust[brimstone].noGravity = true;
Main.dust[brimstone].velocity *= 0f;
}
+1 -1
View File
@@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Magic
{
Projectile.rotation += 0.7f * Projectile.direction;
int brimstone = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1f);
int brimstone = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1f);
Main.dust[brimstone].noGravity = true;
if (Projectile.timeLeft < 150)
+1 -1
View File
@@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Magic
int scaleLoopCheck = 0;
while ((float)scaleLoopCheck < Projectile.scale * 10f)
{
int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.5f);
int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.5f);
Main.dust[brimDust].position = (Main.dust[brimDust].position + Projectile.Center) / 2f;
Main.dust[brimDust].noGravity = true;
Main.dust[brimDust].velocity *= 0.1f;
+3 -3
View File
@@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Magic
Projectile.localNPCHitCooldown = 10;
for (int i = 0; i < 15; i++)
{
int brightDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100, default, 1.2f);
int brightDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100, default, 1.2f);
Main.dust[brightDust].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -75,10 +75,10 @@ namespace CalamityMod.Projectiles.Magic
}
for (int j = 0; j < 30; j++)
{
int brightDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100, default, 1.7f);
int brightDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100, default, 1.7f);
Main.dust[brightDust2].noGravity = true;
Main.dust[brightDust2].velocity *= 5f;
brightDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100, default, 1f);
brightDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurificationPowder, 0f, 0f, 100, default, 1f);
Main.dust[brightDust2].velocity *= 2f;
}
if (Main.netMode != NetmodeID.Server)
+1 -1
View File
@@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Magic
int scaleLoopCheck = 0;
while ((float)scaleLoopCheck < Projectile.scale * 10f)
{
int purpleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurpleTorch, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.1f);
int purpleDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurpleTorch, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.1f);
Main.dust[purpleDust].position = (Main.dust[purpleDust].position + Projectile.Center) / 2f;
Main.dust[purpleDust].noGravity = true;
Main.dust[purpleDust].velocity *= 0.1f;
+3 -3
View File
@@ -92,14 +92,14 @@ namespace CalamityMod.Projectiles.Magic
SoundEngine.PlaySound(SoundID.Item74, Projectile.Center);
for (int i = 0; i < 6; i++)
{
Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0, 0);
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0, 0);
}
for (int j = 0; j < 10; j++)
{
int divinity = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0, 0);
int divinity = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0, 0);
Main.dust[divinity].noGravity = true;
Main.dust[divinity].velocity *= 3f;
divinity = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0, 0);
divinity = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0, 0);
Main.dust[divinity].velocity *= 2f;
Main.dust[divinity].noGravity = true;
}
+1 -1
View File
@@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Magic
int scaleLoopCheck = 0;
while ((float)scaleLoopCheck < Projectile.scale * 10f)
{
int eldritchRed = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.1f);
int eldritchRed = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.1f);
Main.dust[eldritchRed].position = (Main.dust[eldritchRed].position + Projectile.Center) / 2f;
Main.dust[eldritchRed].noGravity = true;
Main.dust[eldritchRed].velocity *= 0.1f;
+1 -1
View File
@@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Magic
int scaleLoopCheck = 0;
while ((float)scaleLoopCheck < Projectile.scale * 10f)
{
int rainbow = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RainbowTorch, Projectile.velocity.X, Projectile.velocity.Y, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.1f);
int rainbow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, Projectile.velocity.X, Projectile.velocity.Y, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.1f);
Main.dust[rainbow].position = (Main.dust[rainbow].position + Projectile.Center) / 2f;
Main.dust[rainbow].noGravity = true;
Main.dust[rainbow].velocity *= 0.1f;
+3 -3
View File
@@ -143,13 +143,13 @@ namespace CalamityMod.Projectiles.Magic
int inc;
for (int i = 0; i < 3; i = inc + 1)
{
int redFate = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f);
int redFate = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f);
Main.dust[redFate].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f;
inc = i;
}
for (int j = 0; j < 10; j = inc + 1)
{
int redFate2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 2.5f);
int redFate2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 2.5f);
Main.dust[redFate2].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f;
Main.dust[redFate2].noGravity = true;
Dust dust = Main.dust[redFate2];
@@ -158,7 +158,7 @@ namespace CalamityMod.Projectiles.Magic
}
for (int k = 0; k < 5; k = inc + 1)
{
int redFate3 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 1.5f);
int redFate3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 1.5f);
Main.dust[redFate3].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 2f;
Main.dust[redFate3].noGravity = true;
Dust dust = Main.dust[redFate3];
+6 -6
View File
@@ -206,7 +206,7 @@ namespace CalamityMod.Projectiles.Magic
{
float HomingVelocity = 24f;
int HomingN = 8;
Vector2 projDistance = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f);
Vector2 projDistance = Projectile.Center;
float dx = projCenter.X - projDistance.X;
float dy = projCenter.Y - projDistance.Y;
float dist = (float)Math.Sqrt((double)(dx * dx + dy * dy));
@@ -253,17 +253,17 @@ namespace CalamityMod.Projectiles.Magic
for (int i = 0; i < 4; i++)
{
int killRed = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f);
int killRed = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f);
Main.dust[killRed].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
}
for (int j = 0; j < 30; j++)
{
int killRed2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 200, default, 3.7f);
int killRed2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 200, default, 3.7f);
Dust dust = Main.dust[killRed2];
dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
dust.noGravity = true;
dust.velocity *= 3f;
killRed2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f);
killRed2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 100, default, 1.5f);
dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
dust.velocity *= 2f;
dust.noGravity = true;
@@ -272,7 +272,7 @@ namespace CalamityMod.Projectiles.Magic
}
for (int k = 0; k < 10; k++)
{
int killRed3 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 2.7f);
int killRed3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 2.7f);
Dust dust = Main.dust[killRed3];
dust.position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 2f;
dust.noGravity = true;
@@ -280,7 +280,7 @@ namespace CalamityMod.Projectiles.Magic
}
for (int l = 0; l < 10; l++)
{
int killRed4 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 1.5f);
int killRed4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, 0f, 0f, 0, default, 1.5f);
Dust dust = Main.dust[killRed4];
dust.position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 2f;
dust.noGravity = true;
+3 -3
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Magic
int dustType = (int)Projectile.ai[0];
for (int i = 0; i < 3; i = inc + 1)
{
int ghostlyRed = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, Projectile.velocity.X, Projectile.velocity.Y, dustType, default, 1.2f);
int ghostlyRed = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, Projectile.velocity.X, Projectile.velocity.Y, dustType, default, 1.2f);
Main.dust[ghostlyRed].position = (Main.dust[ghostlyRed].position + Projectile.Center) / 2f;
Main.dust[ghostlyRed].noGravity = true;
Dust dust = Main.dust[ghostlyRed];
@@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Magic
}
for (int j = 0; j < 2; j = inc + 1)
{
int ghostlyRed = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.RedTorch, Projectile.velocity.X, Projectile.velocity.Y, dustType, default, 0.4f);
int ghostlyRed = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RedTorch, Projectile.velocity.X, Projectile.velocity.Y, dustType, default, 0.4f);
if (j == 0)
{
Main.dust[ghostlyRed].position = (Main.dust[ghostlyRed].position + Projectile.Center * 5f) / 6f;
@@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Magic
int inc;
for (int i = 0; i < 20; i = inc + 1)
{
int killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)Projectile.ai[0], Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 0, default, 0.5f);
int killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)Projectile.ai[0], Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 0, default, 0.5f);
Dust dust;
Main.dust[killDust].scale = 1.2f + (float)Main.rand.Next(-10, 11) * 0.01f;
Main.dust[killDust].noGravity = true;
+3 -3
View File
@@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Magic
int inc;
for (int i = 0; i < 2; i = inc + 1)
{
int explodeDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 1.1f);
int explodeDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 1.1f);
Main.dust[explodeDust].position = (Main.dust[explodeDust].position + Projectile.Center) / 2f;
Main.dust[explodeDust].noGravity = true;
Dust dust = Main.dust[explodeDust];
@@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Magic
for (int j = 0; j < 1; j = inc + 1)
{
int explodeDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f);
int explodeDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X, Projectile.velocity.Y, 50, default, 0.6f);
Main.dust[explodeDust].position = (Main.dust[explodeDust].position + Projectile.Center * 5f) / 6f;
Dust dust = Main.dust[explodeDust];
dust.velocity *= 0.1f;
@@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Magic
int inc;
for (int i = 0; i < 10; i = inc + 1)
{
int killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)Projectile.ai[0], Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 0, default, 0.5f);
int killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)Projectile.ai[0], Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 0, default, 0.5f);
Dust dust;
Main.dust[killDust].scale = 1f + Main.rand.Next(-10, 11) * 0.01f;
Main.dust[killDust].noGravity = true;
+1 -1
View File
@@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Magic
{
Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.ToRadians(90);
if (Main.rand.NextBool())
Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Vortex, 0f, 0f, 100, default, 0.6f);
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Vortex, 0f, 0f, 100, default, 0.6f);
if (Projectile.timeLeft < 60)
CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, 600f, 12f, 20f);
@@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Magic
randoAdjuster = rando3 / randoAdjuster;
rando1 *= randoAdjuster;
rando2 *= randoAdjuster;
int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f);
int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.5f);
Dust dust = Main.dust[brimDust];
dust.noGravity = true;
dust.position.X = Projectile.Center.X;
+1 -1
View File
@@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Magic
Projectile.ai[0] += 1f;
if (Main.rand.NextBool(3))
{
int flareDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Flare, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f);
int flareDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f);
Dust dust = Main.dust[flareDust];
if (Main.rand.NextBool(3))
{
+3 -3
View File
@@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Magic
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
for (int i = 0; i < 20; i++)
{
int holyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f);
int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f);
Main.dust[holyDust].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -67,10 +67,10 @@ namespace CalamityMod.Projectiles.Magic
}
for (int j = 0; j < 35; j++)
{
int holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PlatinumCoin, 0f, 0f, 100, default, 3f);
int holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PlatinumCoin, 0f, 0f, 100, default, 3f);
Main.dust[holyDust2].noGravity = true;
Main.dust[holyDust2].velocity *= 5f;
holyDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f);
holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f);
Main.dust[holyDust2].velocity *= 2f;
}
}
+1 -1
View File
@@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Magic
{
for (int i = 0; i < 3; i++)
{
int icyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 0.75f);
int icyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 0.75f);
Main.dust[icyDust].noGravity = true;
Main.dust[icyDust].velocity *= 0f;
}
+3 -3
View File
@@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Magic
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<LightBallExplosion>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
for (int i = 0; i < 10; i++)
{
int lightDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1.2f);
int lightDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1.2f);
Main.dust[lightDust].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -54,10 +54,10 @@ namespace CalamityMod.Projectiles.Magic
}
for (int j = 0; j < 20; j++)
{
int lightDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1.7f);
int lightDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1.7f);
Main.dust[lightDust2].noGravity = true;
Main.dust[lightDust2].velocity *= 5f;
lightDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1f);
lightDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1f);
Main.dust[lightDust2].velocity *= 2f;
}
}
@@ -75,19 +75,19 @@ namespace CalamityMod.Projectiles.Magic
int inc;
for (int i = 0; i < 40; i = inc + 1)
{
int alchDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 200, default, 2.5f);
int alchDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 200, default, 2.5f);
Main.dust[alchDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f;
Main.dust[alchDust].noGravity = true;
Dust dust = Main.dust[alchDust];
dust.velocity *= 4f;
dust = Main.dust[alchDust];
dust.velocity += dustVelocity * Main.rand.NextFloat();
alchDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 100, default, 1.8f);
alchDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 100, default, 1.8f);
Main.dust[alchDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f;
dust = Main.dust[alchDust];
dust.velocity *= 3f;
Main.dust[alchDust].noGravity = true;
alchDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Vortex, 0f, 0f, 100, default, 1.8f);
alchDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Vortex, 0f, 0f, 100, default, 1.8f);
Main.dust[alchDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f;
dust = Main.dust[alchDust];
dust.velocity *= 2f;
@@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Magic
}
for (int j = 0; j < 20; j = inc + 1)
{
int alchDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 0, default, 2.5f);
int alchDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 0, default, 2.5f);
Main.dust[alchDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 3f;
Main.dust[alchDust2].noGravity = true;
Dust dust = Main.dust[alchDust2];
@@ -66,14 +66,14 @@ namespace CalamityMod.Projectiles.Magic
int inc;
for (int i = 0; i < 60; i = inc + 1)
{
int fiery = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 200, default, 3f);
int fiery = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 200, default, 3f);
Main.dust[fiery].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f;
Main.dust[fiery].noGravity = true;
Dust dust = Main.dust[fiery];
dust.velocity *= 8f;
dust = Main.dust[fiery];
dust.velocity += dustVelocity * Main.rand.NextFloat();
fiery = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 100, default, dustAI);
fiery = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 100, default, dustAI);
Main.dust[fiery].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f;
dust = Main.dust[fiery];
dust.velocity *= 6f;
@@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Magic
Main.dust[fiery].color = Color.Crimson * 0.5f;
dust = Main.dust[fiery];
dust.velocity += dustVelocity * Main.rand.NextFloat();
fiery = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 100, default, dustAI);
fiery = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 100, default, dustAI);
Main.dust[fiery].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f;
dust = Main.dust[fiery];
dust.velocity *= 4f;
@@ -91,7 +91,7 @@ namespace CalamityMod.Projectiles.Magic
Main.dust[fiery].color = Color.Crimson * 0.5f;
dust = Main.dust[fiery];
dust.velocity += dustVelocity * Main.rand.NextFloat();
fiery = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 100, default, dustAI);
fiery = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 100, default, dustAI);
Main.dust[fiery].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f;
dust = Main.dust[fiery];
dust.velocity *= 2f;
@@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Magic
}
for (int j = 0; j < 30; j = inc + 1)
{
int fiery2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 0, default, 3.8f);
int fiery2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.InfernoFork, 0f, 0f, 0, default, 3.8f);
Main.dust[fiery2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 3f;
Main.dust[fiery2].noGravity = true;
Dust dust = Main.dust[fiery2];
@@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Magic
}
}
int extraDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f);
int extraDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 1f);
Main.dust[extraDust].noGravity = true;
if (Projectile.timeLeft < 150)
+1 -1
View File
@@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Magic
int Damage = Projectile.damage;
int type;
Projectile.netUpdate = true;
Vector2 projAimDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f);
Vector2 projAimDirection = Projectile.Center;
float ampXDirection = (float)Main.mouseX + Main.screenPosition.X - projAimDirection.X;
float ampYDirection = (float)Main.mouseY + Main.screenPosition.Y - projAimDirection.Y;
if (player.gravDir == -1f)
+1 -1
View File
@@ -98,7 +98,7 @@ namespace CalamityMod.Projectiles.Magic
for (int i = 0; i < 15; i++)
{
int killDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)Projectile.ai[0], Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 0, default(Color), 0.75f);
int killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)Projectile.ai[0], Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 0, default(Color), 0.75f);
Dust dust;
if (Main.rand.NextBool(3))
{
+5 -5
View File
@@ -291,18 +291,18 @@ namespace CalamityMod.Projectiles.Magic
for (int i = 0; i < 6; i++)
{
int blackDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Granite, 0f, 0f, 100, default(Color), 1.75f);
int blackDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Granite, 0f, 0f, 100, default(Color), 1.75f);
Main.dust[blackDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
}
for (int j = 0; j < 45; j++)
{
int purpleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 200, default(Color), 5.05f);
int purpleDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 200, default(Color), 5.05f);
Main.dust[purpleDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
Main.dust[purpleDust].noGravity = true;
Dust dust = Main.dust[purpleDust];
dust.velocity *= 4f;
purpleDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.GemRuby, 0f, 0f, 100, default(Color), 1.75f);
purpleDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GemRuby, 0f, 0f, 100, default(Color), 1.75f);
Main.dust[purpleDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * (float)Main.rand.NextDouble() * Projectile.width / 2f;
dust = Main.dust[purpleDust];
dust.velocity *= 2.5f;
@@ -313,7 +313,7 @@ namespace CalamityMod.Projectiles.Magic
for (int k = 0; k < 15; k++)
{
int purpleDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 0, default(Color), 3.55f);
int purpleDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 0, default(Color), 3.55f);
Main.dust[purpleDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(Math.PI).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 2f;
Main.dust[purpleDust2].noGravity = true;
Dust dust = Main.dust[purpleDust2];
@@ -322,7 +322,7 @@ namespace CalamityMod.Projectiles.Magic
for (int l = 0; l < 15; l++)
{
int blackDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Granite, 0f, 0f, 0, default(Color), 1.75f);
int blackDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Granite, 0f, 0f, 0, default(Color), 1.75f);
Main.dust[blackDust2].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(Math.PI).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 2f;
Main.dust[blackDust2].noGravity = true;
Dust dust = Main.dust[blackDust2];
+2 -2
View File
@@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Magic
for (int i = 0; i < 3; i++)
{
int spectre = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 2f);
int spectre = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 2f);
Main.dust[spectre].noGravity = true;
Main.dust[spectre].velocity *= 0.5f;
Main.dust[spectre].velocity += Projectile.velocity * 0.1f;
@@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Magic
SoundEngine.PlaySound(SoundID.Item43, Projectile.Center);
for (int j = 0; j <= 10; j++)
{
Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 1f);
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 1f);
}
if (Projectile.owner == Main.myPlayer)
{
+1 -1
View File
@@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Magic
for (int i = 0; i < 2; i++)
{
int spectre = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 1f);
int spectre = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 1f);
Main.dust[spectre].noGravity = true;
}
+4 -4
View File
@@ -37,12 +37,12 @@ namespace CalamityMod.Projectiles.Magic
}
if (Projectile.alpha == 0)
{
int plagued = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PoisonStaff, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1f);
int plagued = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PoisonStaff, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1f);
Main.dust[plagued].noGravity = true;
Main.dust[plagued].velocity *= 0.6f;
Main.dust[plagued].velocity -= Projectile.velocity * 0.4f;
int venomed = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.VenomStaff, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1f);
int venomed = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.VenomStaff, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1f);
Main.dust[venomed].noGravity = true;
Main.dust[venomed].velocity *= 0.2f;
Main.dust[venomed].velocity -= Projectile.velocity * 0.4f;
@@ -63,12 +63,12 @@ namespace CalamityMod.Projectiles.Magic
SoundEngine.PlaySound(SoundID.Dig, Projectile.Center);
for (int i = 0; i < 7; i++)
{
int killPlague = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.PoisonStaff, 0f, 0f, 100, default, 1f);
int killPlague = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PoisonStaff, 0f, 0f, 100, default, 1f);
Main.dust[killPlague].noGravity = true;
Main.dust[killPlague].velocity *= 1.2f;
Main.dust[killPlague].velocity -= Projectile.oldVelocity * 0.3f;
int killVenom = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.VenomStaff, 0f, 0f, 100, default, 1f);
int killVenom = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.VenomStaff, 0f, 0f, 100, default, 1f);
Dust dust = Main.dust[killVenom];
dust.noGravity = true;
dust.velocity *= 1.2f;
+1 -1
View File
@@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Magic
{
randomDust = 187;
}
int EXPLODE = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 2f);
int EXPLODE = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 2f);
Main.dust[EXPLODE].noGravity = true;
Main.dust[EXPLODE].position.X = Projectile.Center.X;
Main.dust[EXPLODE].position.Y = Projectile.Center.Y;
+3 -3
View File
@@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Magic
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
for (int i = 0; i < 3; i++)
{
int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.2f);
int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.2f);
Main.dust[brimDust].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -85,10 +85,10 @@ namespace CalamityMod.Projectiles.Magic
}
for (int j = 0; j < 6; j++)
{
int brimDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.7f);
int brimDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1.7f);
Main.dust[brimDust2].noGravity = true;
Main.dust[brimDust2].velocity *= 5f;
brimDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1f);
brimDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1f);
Main.dust[brimDust2].velocity *= 2f;
}
}
+1 -1
View File
@@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Magic
{
for (int k = 0; k < 8; k++)
{
int seaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueCrystalShard, 0f, 0f, 100, default, 1.25f);
int seaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueCrystalShard, 0f, 0f, 100, default, 1.25f);
Dust dust = Main.dust[seaDust];
dust.velocity *= 0.3f;
Main.dust[seaDust].position.X = Projectile.position.X + (float)(Projectile.width / 2) + 4f + (float)Main.rand.Next(-4, 5);
+4 -4
View File
@@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Magic
{
Projectile.alpha = 0;
}
int seaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueCrystalShard, 0f, 0f, 100, default, 1.25f);
int seaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueCrystalShard, 0f, 0f, 100, default, 1.25f);
Dust dust = Main.dust[seaDust];
dust.velocity *= 0.3f;
Main.dust[seaDust].position.X = Projectile.position.X + (float)(Projectile.width / 2) + 4f + (float)Main.rand.Next(-4, 5);
@@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Magic
if (Main.player[Projectile.owner].channel)
{
float chaseMouseDist = 18f;
Vector2 projDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f);
Vector2 projDirection = Projectile.Center;
float mouseX = (float)Main.mouseX + Main.screenPosition.X - projDirection.X;
float mouseY = (float)Main.mouseY + Main.screenPosition.Y - projDirection.Y;
if (Main.player[Projectile.owner].gravDir == -1f)
@@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Magic
else if (Projectile.ai[0] <= 0f)
{
Projectile.netUpdate = true;
Vector2 faceDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f);
Vector2 faceDirection = Projectile.Center;
float miceX = (float)Main.mouseX + Main.screenPosition.X - faceDirection.X;
float miceY = (float)Main.mouseY + Main.screenPosition.Y - faceDirection.Y;
if (Main.player[Projectile.owner].gravDir == -1f)
@@ -162,7 +162,7 @@ namespace CalamityMod.Projectiles.Magic
SoundEngine.PlaySound(SoundID.Item10, Projectile.Center);
for (int k = 0; k < 8; k++)
{
int seaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueCrystalShard, 0f, 0f, 100, default, 1.25f);
int seaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueCrystalShard, 0f, 0f, 100, default, 1.25f);
Dust dust = Main.dust[seaDust];
dust.velocity *= 0.3f;
Main.dust[seaDust].position.X = Projectile.position.X + (float)(Projectile.width / 2) + 4f + (float)Main.rand.Next(-4, 5);
+1 -1
View File
@@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Magic
{
for (int k = 0; k < 8; k++)
{
int seaDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.BlueCrystalShard, 0f, 0f, 100, default, 1.25f);
int seaDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BlueCrystalShard, 0f, 0f, 100, default, 1.25f);
Dust dust = Main.dust[seaDust];
dust.velocity *= 0.3f;
Main.dust[seaDust].position.X = Projectile.position.X + (float)(Projectile.width / 2) + 4f + (float)Main.rand.Next(-4, 5);
+1 -1
View File
@@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Magic
if (Main.rand.NextBool(6))
{
int dust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 0.4f);
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.IceRod, 0f, 0f, 100, default, 0.4f);
Main.dust[dust].velocity *= 0.3f;
Main.dust[dust].noGravity = true;
}
+3 -3
View File
@@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Magic
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
for (int i = 0; i < 15; i++)
{
int blueDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1.2f);
int blueDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1.2f);
Main.dust[blueDust].velocity *= 3f;
if (Main.rand.NextBool())
{
@@ -61,10 +61,10 @@ namespace CalamityMod.Projectiles.Magic
}
for (int j = 0; j < 30; j++)
{
int blueDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1.7f);
int blueDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1.7f);
Main.dust[blueDust2].noGravity = true;
Main.dust[blueDust2].velocity *= 5f;
blueDust2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1f);
blueDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.UnusedWhiteBluePurple, 0f, 0f, 100, default, 1f);
Main.dust[blueDust2].velocity *= 2f;
}
}
@@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Magic
int dustType = 32;
for (int i = 0; i < 2; i++)
{
int earthyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f);
int earthyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f);
Dust dust = Main.dust[earthyDust];
if (Main.rand.NextBool(3))
{
@@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Magic
}
for (int i = 0; i < 2; i++)
{
int earthyDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f);
int earthyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f);
Dust dust = Main.dust[earthyDust];
if (Main.rand.NextBool(3))
{
Loaded 100 of 317 files, more files were not shown because too many files have changed in this diff. Show more