Position vector optimizations 2
This commit is contained in:
1 parent
642325130f
commit
d159bcc2da
66 files changed
+251
-251
No files matched your search
@@ -120,7 +120,7 @@ namespace CalamityMod.NPCs.Abyss
|
||||
{
|
||||
NPC.TargetClosest(true);
|
||||
float lungeSpeed = CalamityWorld.death ? 12f : CalamityWorld.revenge ? 10f : 8f;
|
||||
Vector2 npcPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
Vector2 npcPosition = NPC.Center;
|
||||
float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2) - npcPosition.X;
|
||||
float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2) - npcPosition.Y;
|
||||
float targetDistance = (float)Math.Sqrt(targetX * targetX + targetY * targetY);
|
||||
|
||||
@@ -220,7 +220,7 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
float currentSpeed = speed;
|
||||
float currentTurnSpeed = turnSpeed;
|
||||
Vector2 segmentPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
Vector2 segmentPosition = NPC.Center;
|
||||
|
||||
if (patrolSpot == Vector2.Zero)
|
||||
patrolSpot = Main.player[NPC.target].Center;
|
||||
|
||||
@@ -468,7 +468,7 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int r = 0; r < 50; r++)
|
||||
{
|
||||
int aureusDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
int aureusDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[aureusDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -478,10 +478,10 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
}
|
||||
for (int s = 0; s < 100; s++)
|
||||
{
|
||||
int aureusDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 3f);
|
||||
int aureusDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 3f);
|
||||
Main.dust[aureusDust2].noGravity = true;
|
||||
Main.dust[aureusDust2].velocity *= 5f;
|
||||
aureusDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 2f);
|
||||
aureusDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 2f);
|
||||
Main.dust[aureusDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 1f);
|
||||
int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 1f);
|
||||
Main.dust[dust].velocity *= 1.66f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -184,10 +184,10 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
|
||||
int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 2f;
|
||||
dust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 1f);
|
||||
dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 1f);
|
||||
Main.dust[dust].velocity *= 1.33f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
@@ -357,7 +357,7 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
|
||||
for (int r = 0; r < 30; r++)
|
||||
{
|
||||
int astralDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 1f);
|
||||
int astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 1f);
|
||||
Main.dust[astralDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -369,10 +369,10 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
|
||||
for (int s = 0; s < 60; s++)
|
||||
{
|
||||
int astralDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
|
||||
int astralDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[astralDust2].noGravity = true;
|
||||
Main.dust[astralDust2].velocity *= 5f;
|
||||
astralDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 1f);
|
||||
astralDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 1f);
|
||||
Main.dust[astralDust2].velocity *= 2f;
|
||||
Main.dust[astralDust2].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int purpleDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
int purpleDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[purpleDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -183,10 +183,10 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
}
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
int astralDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 3f);
|
||||
int astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 3f);
|
||||
Main.dust[astralDust].noGravity = true;
|
||||
Main.dust[astralDust].velocity *= 5f;
|
||||
astralDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 2f);
|
||||
astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 2f);
|
||||
Main.dust[astralDust].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int purpleDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
int purpleDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[purpleDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -219,10 +219,10 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
}
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
int astralDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 3f);
|
||||
int astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 3f);
|
||||
Main.dust[astralDust].noGravity = true;
|
||||
Main.dust[astralDust].velocity *= 5f;
|
||||
astralDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 2f);
|
||||
astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 2f);
|
||||
Main.dust[astralDust].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int purpleDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
int purpleDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[purpleDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -156,10 +156,10 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
}
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
int astralDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 3f);
|
||||
int astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 3f);
|
||||
Main.dust[astralDust].noGravity = true;
|
||||
Main.dust[astralDust].velocity *= 5f;
|
||||
astralDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 2f);
|
||||
astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 2f);
|
||||
Main.dust[astralDust].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
int brimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[brimDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -276,10 +276,10 @@ namespace CalamityMod.NPCs.BrimstoneElemental
|
||||
}
|
||||
for (int j = 0; j < 60; j++)
|
||||
{
|
||||
int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
int brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[brimDust2].noGravity = true;
|
||||
Main.dust[brimDust2].velocity *= 5f;
|
||||
brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[brimDust2].velocity *= 2f;
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
|
||||
@@ -272,7 +272,7 @@ namespace CalamityMod.NPCs.CalClone
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
int brimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[brimDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -282,10 +282,10 @@ namespace CalamityMod.NPCs.CalClone
|
||||
}
|
||||
for (int j = 0; j < 70; j++)
|
||||
{
|
||||
int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
int brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[brimDust2].noGravity = true;
|
||||
Main.dust[brimDust2].velocity *= 5f;
|
||||
brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[brimDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ namespace CalamityMod.NPCs.CalClone
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
int brimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[brimDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -208,10 +208,10 @@ namespace CalamityMod.NPCs.CalClone
|
||||
}
|
||||
for (int j = 0; j < 70; j++)
|
||||
{
|
||||
int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
int brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[brimDust2].noGravity = true;
|
||||
Main.dust[brimDust2].velocity *= 5f;
|
||||
brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[brimDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ namespace CalamityMod.NPCs.CalClone
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
int brimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[brimDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -208,10 +208,10 @@ namespace CalamityMod.NPCs.CalClone
|
||||
}
|
||||
for (int j = 0; j < 70; j++)
|
||||
{
|
||||
int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
int brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[brimDust2].noGravity = true;
|
||||
Main.dust[brimDust2].velocity *= 5f;
|
||||
brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[brimDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int purpleDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
int purpleDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[purpleDust].velocity *= 3f;
|
||||
Main.dust[purpleDust].noGravity = true;
|
||||
if (Main.rand.NextBool())
|
||||
@@ -302,10 +302,10 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
}
|
||||
for (int j = 0; j < 70; j++)
|
||||
{
|
||||
int purpleDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
int purpleDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[purpleDust2].noGravity = true;
|
||||
Main.dust[purpleDust2].velocity *= 5f;
|
||||
purpleDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
purpleDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[purpleDust2].noGravity = true;
|
||||
Main.dust[purpleDust2].velocity *= 2f;
|
||||
}
|
||||
|
||||
@@ -906,7 +906,7 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int j = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.BlueFairy, 0f, 0f, 100, default, 2f);
|
||||
int j = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.BlueFairy, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[j].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -916,10 +916,10 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
}
|
||||
for (int k = 0; k < 70; k++)
|
||||
{
|
||||
int stompDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.BlueFairy, 0f, 0f, 100, default, 3f);
|
||||
int stompDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.BlueFairy, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[stompDust].noGravity = true;
|
||||
Main.dust[stompDust].velocity *= 5f;
|
||||
stompDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.BlueFairy, 0f, 0f, 100, default, 2f);
|
||||
stompDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.BlueFairy, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[stompDust].velocity *= 2f;
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
|
||||
@@ -336,7 +336,7 @@ namespace CalamityMod.NPCs.Crags
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
int brimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[brimDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -346,10 +346,10 @@ namespace CalamityMod.NPCs.Crags
|
||||
}
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
int brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[brimDust2].noGravity = true;
|
||||
Main.dust[brimDust2].velocity *= 5f;
|
||||
brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[brimDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1315,7 +1315,7 @@ Block:
|
||||
{
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int icyDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f);
|
||||
int icyDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[icyDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -1325,10 +1325,10 @@ Block:
|
||||
}
|
||||
for (int j = 0; j < 70; j++)
|
||||
{
|
||||
int icyDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 3f);
|
||||
int icyDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[icyDust2].noGravity = true;
|
||||
Main.dust[icyDust2].velocity *= 5f;
|
||||
icyDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f);
|
||||
icyDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[icyDust2].velocity *= 2f;
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server && !Main.zenithWorld)
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
{
|
||||
for (int i = 0; i < 25; i++)
|
||||
{
|
||||
int icyDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f);
|
||||
int icyDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[icyDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -184,10 +184,10 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
|
||||
for (int j = 0; j < 50; j++)
|
||||
{
|
||||
int icyDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 3f);
|
||||
int icyDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[icyDust2].noGravity = true;
|
||||
Main.dust[icyDust2].velocity *= 5f;
|
||||
icyDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f);
|
||||
icyDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[icyDust2].velocity *= 2f;
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
NPC.Opacity = Main.npc[(int)NPC.ai[2]].Opacity;
|
||||
|
||||
Vector2 segmentPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
Vector2 segmentPosition = NPC.Center;
|
||||
float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2);
|
||||
float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2);
|
||||
targetX = (int)(targetX / 16f) * 16;
|
||||
@@ -133,7 +133,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
{
|
||||
try
|
||||
{
|
||||
segmentPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
segmentPosition = NPC.Center;
|
||||
targetX = Main.npc[(int)NPC.ai[1]].position.X + (Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X;
|
||||
targetY = Main.npc[(int)NPC.ai[1]].position.Y + (Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y;
|
||||
}
|
||||
@@ -220,7 +220,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -230,10 +230,10 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[cosmiliteDust2].noGravity = true;
|
||||
Main.dust[cosmiliteDust2].velocity *= 5f;
|
||||
cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
return;
|
||||
}
|
||||
|
||||
Vector2 segmentDirection = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
Vector2 segmentDirection = NPC.Center;
|
||||
float dogHeadX = Main.npc[CalamityGlobalNPC.DoGHead].position.X + (Main.npc[CalamityGlobalNPC.DoGHead].width / 2);
|
||||
float dogHeadY = Main.npc[CalamityGlobalNPC.DoGHead].position.Y + (Main.npc[CalamityGlobalNPC.DoGHead].height / 2);
|
||||
float segmentVelocity = BossRushEvent.BossRushActive ? 30f : CalamityWorld.revenge ? 25f : 23f;
|
||||
@@ -424,7 +424,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -434,10 +434,10 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
for (int j = 0; j < 30; j++)
|
||||
{
|
||||
int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[cosmiliteDust2].noGravity = true;
|
||||
Main.dust[cosmiliteDust2].velocity *= 5f;
|
||||
cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
NPC.Opacity = Main.npc[(int)NPC.ai[2]].Opacity;
|
||||
|
||||
Vector2 segmentPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
Vector2 segmentPosition = NPC.Center;
|
||||
float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2);
|
||||
float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2);
|
||||
targetX = (int)(targetX / 16f) * 16;
|
||||
@@ -130,7 +130,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
{
|
||||
try
|
||||
{
|
||||
segmentPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
segmentPosition = NPC.Center;
|
||||
targetX = Main.npc[(int)NPC.ai[1]].position.X + (Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X;
|
||||
targetY = Main.npc[(int)NPC.ai[1]].position.Y + (Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y;
|
||||
}
|
||||
@@ -212,7 +212,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -222,10 +222,10 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[cosmiliteDust2].noGravity = true;
|
||||
Main.dust[cosmiliteDust2].velocity *= 5f;
|
||||
cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -522,7 +522,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -532,10 +532,10 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[cosmiliteDust2].noGravity = true;
|
||||
Main.dust[cosmiliteDust2].velocity *= 5f;
|
||||
cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -802,7 +802,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
{
|
||||
for (int l = 0; l < 8; l++)
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Ichor, 0f, 0f, 100, default, 1f);
|
||||
int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Ichor, 0f, 0f, 100, default, 1f);
|
||||
float dustVelocityYAdd = Math.Abs(Main.dust[dust].velocity.Y) * 0.5f;
|
||||
if (Main.dust[dust].velocity.Y < 0f)
|
||||
Main.dust[dust].velocity.Y = 2f + dustVelocityYAdd;
|
||||
@@ -1891,7 +1891,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
float speedCopy = speed;
|
||||
float turnSpeedCopy = turnSpeed;
|
||||
Vector2 npcCenter = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
Vector2 npcCenter = NPC.Center;
|
||||
float targetX = player.position.X + (player.width / 2);
|
||||
float targetY = player.position.Y + (player.height / 2);
|
||||
int flyYLevel = -1;
|
||||
@@ -2874,7 +2874,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -2884,10 +2884,10 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
for (int j = 0; j < 30; j++)
|
||||
{
|
||||
int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[cosmiliteDust2].noGravity = true;
|
||||
Main.dust[cosmiliteDust2].velocity *= 5f;
|
||||
cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,7 +289,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
NPC.Opacity = Main.npc[(int)NPC.ai[2]].Opacity;
|
||||
}
|
||||
|
||||
Vector2 segmentDirection = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
Vector2 segmentDirection = NPC.Center;
|
||||
float playerXDist = player.position.X + (player.width / 2);
|
||||
float playerYDist = player.position.Y + (player.height / 2);
|
||||
playerXDist = (int)(playerXDist / 16f) * 16;
|
||||
@@ -303,7 +303,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
{
|
||||
try
|
||||
{
|
||||
segmentDirection = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
segmentDirection = NPC.Center;
|
||||
playerXDist = Main.npc[(int)NPC.ai[1]].position.X + (Main.npc[(int)NPC.ai[1]].width / 2) - segmentDirection.X;
|
||||
playerYDist = Main.npc[(int)NPC.ai[1]].position.Y + (Main.npc[(int)NPC.ai[1]].height / 2) - segmentDirection.Y;
|
||||
}
|
||||
@@ -442,7 +442,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -452,10 +452,10 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[cosmiliteDust2].noGravity = true;
|
||||
Main.dust[cosmiliteDust2].velocity *= 5f;
|
||||
cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1733,7 +1733,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
|
||||
if (NPC.soundDelay == 0)
|
||||
{
|
||||
@@ -1745,14 +1745,14 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
{
|
||||
for (int num193 = 0; num193 < 2; num193++)
|
||||
{
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
}
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
Main.dust[plasmaDust].velocity *= 3f;
|
||||
plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Main.dust[plasmaDust].velocity *= 2f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -1637,7 +1637,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
|
||||
if (NPC.soundDelay == 0)
|
||||
{
|
||||
@@ -1649,14 +1649,14 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
}
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
Main.dust[plasmaDust].velocity *= 3f;
|
||||
plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Main.dust[plasmaDust].velocity *= 2f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -661,7 +661,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
|
||||
if (NPC.soundDelay == 1)
|
||||
{
|
||||
@@ -673,14 +673,14 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
}
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
Main.dust[plasmaDust].velocity *= 3f;
|
||||
plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Main.dust[plasmaDust].velocity *= 2f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -711,7 +711,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
|
||||
if (NPC.soundDelay == 0)
|
||||
{
|
||||
@@ -723,14 +723,14 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
}
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
Main.dust[plasmaDust].velocity *= 3f;
|
||||
plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Main.dust[plasmaDust].velocity *= 2f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -660,7 +660,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
|
||||
if (NPC.soundDelay == 0)
|
||||
{
|
||||
@@ -672,14 +672,14 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
}
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
Main.dust[plasmaDust].velocity *= 3f;
|
||||
plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Main.dust[plasmaDust].velocity *= 2f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -654,7 +654,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
|
||||
if (NPC.soundDelay == 0)
|
||||
{
|
||||
@@ -666,14 +666,14 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
}
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
Main.dust[plasmaDust].velocity *= 3f;
|
||||
plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Main.dust[plasmaDust].velocity *= 2f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -1564,7 +1564,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
for (int k = 0; k < 3; k++)
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
|
||||
if (NPC.soundDelay == 0)
|
||||
{
|
||||
@@ -1576,14 +1576,14 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
}
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
Main.dust[plasmaDust].velocity *= 3f;
|
||||
plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Main.dust[plasmaDust].velocity *= 2f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -673,19 +673,19 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
|
||||
int baseDust = vulnerable ? 3 : 1;
|
||||
for (int k = 0; k < baseDust; k++)
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
Main.dust[plasmaDust].velocity *= 3f;
|
||||
plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Main.dust[plasmaDust].velocity *= 2f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -677,20 +677,20 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
|
||||
int baseDust = vulnerable ? 3 : 1;
|
||||
for (int k = 0; k < baseDust; k++)
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
}
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
Main.dust[plasmaDust].velocity *= 3f;
|
||||
plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Main.dust[plasmaDust].velocity *= 2f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -1297,20 +1297,20 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
}
|
||||
|
||||
for (int k = 0; k < 3; k++)
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
}
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
Main.dust[plasmaDust].velocity *= 3f;
|
||||
plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Main.dust[plasmaDust].velocity *= 2f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -675,20 +675,20 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
|
||||
int baseDust = vulnerable ? 3 : 1;
|
||||
for (int k = 0; k < baseDust; k++)
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1f);
|
||||
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
}
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
int plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 0, new Color(0, 255, 255), 2.5f);
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
Main.dust[plasmaDust].velocity *= 3f;
|
||||
plasmaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
plasmaDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 255, 255), 1.5f);
|
||||
Main.dust[plasmaDust].velocity *= 2f;
|
||||
Main.dust[plasmaDust].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ namespace CalamityMod.NPCs.GreatSandShark
|
||||
NPC.localAI[0] = -1f;
|
||||
for (int i = 0; i < 25; i++)
|
||||
{
|
||||
int burrowDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Sand, 0f, 0f, 100, default, 2f);
|
||||
int burrowDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Sand, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[burrowDust].velocity.Y *= 6f;
|
||||
Main.dust[burrowDust].velocity.X *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
@@ -439,10 +439,10 @@ namespace CalamityMod.NPCs.GreatSandShark
|
||||
}
|
||||
for (int j = 0; j < 50; j++)
|
||||
{
|
||||
int burrowDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.UnusedBrown, 0f, 0f, 100, default, 3f);
|
||||
int burrowDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.UnusedBrown, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[burrowDust2].noGravity = true;
|
||||
Main.dust[burrowDust2].velocity.Y *= 10f;
|
||||
burrowDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Sandstorm, 0f, 0f, 100, default, 2f);
|
||||
burrowDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Sandstorm, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[burrowDust2].velocity.X *= 2f;
|
||||
}
|
||||
|
||||
@@ -653,7 +653,7 @@ IL_6899:
|
||||
{
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
int burrowDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
int burrowDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[burrowDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -663,10 +663,10 @@ IL_6899:
|
||||
}
|
||||
for (int j = 0; j < 100; j++)
|
||||
{
|
||||
int burrowDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f);
|
||||
int burrowDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[burrowDust2].noGravity = true;
|
||||
Main.dust[burrowDust2].velocity *= 5f;
|
||||
burrowDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
burrowDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[burrowDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1135,7 +1135,7 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int killDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Demonite, 0f, 0f, 100, default, 2f);
|
||||
int killDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Demonite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[killDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -1145,10 +1145,10 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
}
|
||||
for (int j = 0; j < 70; j++)
|
||||
{
|
||||
int killDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Demonite, 0f, 0f, 100, default, 3f);
|
||||
int killDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Demonite, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[killDust2].noGravity = true;
|
||||
Main.dust[killDust2].velocity *= 5f;
|
||||
killDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Demonite, 0f, 0f, 100, default, 2f);
|
||||
killDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Demonite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[killDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -440,7 +440,7 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
NPC.rotation = NPC.velocity.X * 0.02f;
|
||||
NPC.spriteDirection = NPC.direction;
|
||||
|
||||
Vector2 anahitaPos = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
Vector2 anahitaPos = NPC.Center;
|
||||
float playerXDist = player.position.X + (player.width / 2) - anahitaPos.X;
|
||||
float playerYDist = player.position.Y + (player.height / 2) - 200f * NPC.scale - anahitaPos.Y;
|
||||
float playerDistance = (float)Math.Sqrt(playerXDist * playerXDist + playerYDist * playerYDist);
|
||||
@@ -504,7 +504,7 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
|
||||
NPC.rotation = NPC.velocity.X * 0.02f;
|
||||
Vector2 bubbleSpawnPos = new Vector2(NPC.position.X + (NPC.width / 2) + (15 * NPC.direction * NPC.scale), NPC.position.Y + 30 * NPC.scale);
|
||||
Vector2 restingPos = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
Vector2 restingPos = NPC.Center;
|
||||
float restingPlayerXDist = player.position.X + (player.width / 2) - restingPos.X;
|
||||
float restingPlayerYDist = player.position.Y + (player.height / 2) - restingPos.Y;
|
||||
float restingPlayerDistance = (float)Math.Sqrt(restingPlayerXDist * restingPlayerXDist + restingPlayerYDist * restingPlayerYDist);
|
||||
|
||||
@@ -783,7 +783,7 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int bloody = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
int bloody = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[bloody].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -793,10 +793,10 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
}
|
||||
for (int j = 0; j < 70; j++)
|
||||
{
|
||||
int bloody2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f);
|
||||
int bloody2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[bloody2].noGravity = true;
|
||||
Main.dust[bloody2].velocity *= 5f;
|
||||
bloody2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
bloody2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[bloody2].velocity *= 2f;
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int earthDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Smoke, 0f, 0f, 100, default, 2f);
|
||||
int earthDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Smoke, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[earthDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -143,10 +143,10 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
}
|
||||
for (int j = 0; j < 70; j++)
|
||||
{
|
||||
int earthDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 3f);
|
||||
int earthDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[earthDust2].noGravity = true;
|
||||
Main.dust[earthDust2].velocity *= 5f;
|
||||
earthDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 2f);
|
||||
earthDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[earthDust2].velocity *= 2f;
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
int damage = Main.masterMode ? 18 : Main.expertMode ? 22 : 30;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Vector2 projPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
Vector2 projPosition = NPC.Center;
|
||||
float targetXDist = Main.player[NPC.target].position.X + Main.player[NPC.target].width * 0.5f - projPosition.X;
|
||||
float absoluteTargetX = Math.Abs(targetXDist) * 0.1f;
|
||||
float targetYDist = Main.player[NPC.target].position.Y + Main.player[NPC.target].height * 0.5f - projPosition.Y - absoluteTargetX;
|
||||
|
||||
@@ -249,7 +249,7 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
int bloody = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
int bloody = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[bloody].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -261,10 +261,10 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
|
||||
for (int j = 0; j < 30; j++)
|
||||
{
|
||||
int toxicDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 3f);
|
||||
int toxicDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[toxicDust].noGravity = true;
|
||||
Main.dust[toxicDust].velocity *= 5f;
|
||||
toxicDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 2f);
|
||||
toxicDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[toxicDust].velocity *= 2f;
|
||||
Main.dust[toxicDust].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
int toxicDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 2f);
|
||||
int toxicDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.SulphurousSeaAcid, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[toxicDust].velocity.Y *= 6f;
|
||||
Main.dust[toxicDust].velocity.X *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
@@ -315,10 +315,10 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
|
||||
for (int j = 0; j < 30; j++)
|
||||
{
|
||||
int bloody = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f);
|
||||
int bloody = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[bloody].noGravity = true;
|
||||
Main.dust[bloody].velocity.Y *= 10f;
|
||||
bloody = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
bloody = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[bloody].velocity.X *= 2f;
|
||||
}
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
int ichorDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Ichor, 0f, 0f, 100, default, 1f);
|
||||
int ichorDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Ichor, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[ichorDust].velocity *= 2f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -291,10 +291,10 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
for (int j = 0; j < 32; j++)
|
||||
{
|
||||
int bloodDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 1.5f);
|
||||
int bloodDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 1.5f);
|
||||
Main.dust[bloodDust].noGravity = true;
|
||||
Main.dust[bloodDust].velocity *= 3f;
|
||||
bloodDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 1f);
|
||||
bloodDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[bloodDust].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
@@ -333,7 +333,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
for (int i = 0; i < 32; i++)
|
||||
{
|
||||
int ichorDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Ichor, 0f, 0f, 100, default, 1f);
|
||||
int ichorDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Ichor, 0f, 0f, 100, default, 1f);
|
||||
float dustVelocityYAdd = Math.Abs(Main.dust[ichorDust].velocity.Y) * 0.5f;
|
||||
if (Main.dust[ichorDust].velocity.Y < 0f)
|
||||
Main.dust[ichorDust].velocity.Y = 2f + dustVelocityYAdd;
|
||||
@@ -400,7 +400,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
int ichorDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Ichor, 0f, 0f, 100, default, 1f);
|
||||
int ichorDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Ichor, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[ichorDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -411,10 +411,10 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
for (int j = 0; j < 16; j++)
|
||||
{
|
||||
int bloodDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 1.5f);
|
||||
int bloodDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 1.5f);
|
||||
Main.dust[bloodDust].noGravity = true;
|
||||
Main.dust[bloodDust].velocity *= 5f;
|
||||
bloodDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 1f);
|
||||
bloodDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[bloodDust].velocity *= 2f;
|
||||
}
|
||||
|
||||
@@ -641,7 +641,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int ichorDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
int ichorDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[ichorDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -651,10 +651,10 @@ namespace CalamityMod.NPCs.Perforator
|
||||
}
|
||||
for (int j = 0; j < 70; j++)
|
||||
{
|
||||
int bloodDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f);
|
||||
int bloodDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[bloodDust].noGravity = true;
|
||||
Main.dust[bloodDust].velocity *= 5f;
|
||||
bloodDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
bloodDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[bloodDust].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -392,7 +392,7 @@ namespace CalamityMod.NPCs.PlagueEnemies
|
||||
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int plagueDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f);
|
||||
int plagueDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[plagueDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -403,10 +403,10 @@ namespace CalamityMod.NPCs.PlagueEnemies
|
||||
|
||||
for (int j = 0; j < 70; j++)
|
||||
{
|
||||
int plagueDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 3f);
|
||||
int plagueDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[plagueDust2].noGravity = true;
|
||||
Main.dust[plagueDust2].velocity *= 5f;
|
||||
plagueDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f);
|
||||
plagueDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[plagueDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,12 +82,12 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
}
|
||||
else if (Main.rand.NextBool(4))
|
||||
{
|
||||
int smokyFire2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Smoke, 0f, 0f, 100, default, 0.5f);
|
||||
int smokyFire2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Smoke, 0f, 0f, 100, default, 0.5f);
|
||||
Main.dust[smokyFire2].scale = 0.1f + (float)Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[smokyFire2].fadeIn = 1.5f + (float)Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[smokyFire2].noGravity = true;
|
||||
Main.dust[smokyFire2].position = NPC.Center + new Vector2(0f, (float)(-(float)NPC.height / 2)).RotatedBy((double)NPC.rotation, default) * 1.1f;
|
||||
smokyFire2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 1f);
|
||||
smokyFire2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[smokyFire2].scale = 1f + (float)Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[smokyFire2].noGravity = true;
|
||||
Main.dust[smokyFire2].position = NPC.Center + new Vector2(0f, (float)(-(float)NPC.height / 2 - 6)).RotatedBy((double)NPC.rotation, default) * 1.1f;
|
||||
@@ -231,7 +231,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
int greenPlague = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f);
|
||||
int greenPlague = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[greenPlague].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -242,10 +242,10 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
}
|
||||
for (int j = 0; j < 30; j++)
|
||||
{
|
||||
int greenPlague2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 3f);
|
||||
int greenPlague2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[greenPlague2].noGravity = true;
|
||||
Main.dust[greenPlague2].velocity *= 5f;
|
||||
greenPlague2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f);
|
||||
greenPlague2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[greenPlague2].velocity *= 2f;
|
||||
Main.dust[greenPlague2].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
int greenPlague = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f);
|
||||
int greenPlague = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[greenPlague].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -174,10 +174,10 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
}
|
||||
for (int j = 0; j < 30; j++)
|
||||
{
|
||||
int greenPlague2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 3f);
|
||||
int greenPlague2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[greenPlague2].noGravity = true;
|
||||
Main.dust[greenPlague2].velocity *= 5f;
|
||||
greenPlague2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f);
|
||||
greenPlague2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.GemEmerald, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[greenPlague2].velocity *= 2f;
|
||||
Main.dust[greenPlague2].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -1220,7 +1220,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int plagueDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f);
|
||||
int plagueDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[plagueDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -1231,10 +1231,10 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
|
||||
for (int j = 0; j < 70; j++)
|
||||
{
|
||||
int plagueDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 3f);
|
||||
int plagueDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[plagueDust2].noGravity = true;
|
||||
Main.dust[plagueDust2].velocity *= 5f;
|
||||
plagueDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f);
|
||||
plagueDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[plagueDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f);
|
||||
int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int ghostDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f);
|
||||
int ghostDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[ghostDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -199,10 +199,10 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
}
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
int ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 3f);
|
||||
int ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[ghostDust2].noGravity = true;
|
||||
Main.dust[ghostDust2].velocity *= 5f;
|
||||
ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 2f);
|
||||
ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[ghostDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
SoundEngine.PlaySound(SoundID.Item125, NPC.Center);
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f);
|
||||
int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 5f;
|
||||
}
|
||||
@@ -556,7 +556,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int ghostDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f);
|
||||
int ghostDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[ghostDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -566,10 +566,10 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
}
|
||||
for (int j = 0; j < 60; j++)
|
||||
{
|
||||
int ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 3f);
|
||||
int ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[ghostDust2].noGravity = true;
|
||||
Main.dust[ghostDust2].velocity *= 5f;
|
||||
ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 2f);
|
||||
ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.DungeonSpirit, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[ghostDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -621,7 +621,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
SoundEngine.PlaySound(SoundID.Item125, NPC.Center);
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f);
|
||||
int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 5f;
|
||||
}
|
||||
@@ -788,7 +788,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int ghostDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f);
|
||||
int ghostDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[ghostDust].velocity *= 3f;
|
||||
Main.dust[ghostDust].noGravity = true;
|
||||
if (Main.rand.NextBool())
|
||||
@@ -799,10 +799,10 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
}
|
||||
for (int j = 0; j < 30; j++)
|
||||
{
|
||||
int ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f);
|
||||
int ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[ghostDust2].noGravity = true;
|
||||
Main.dust[ghostDust2].velocity *= 5f;
|
||||
ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f);
|
||||
ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[ghostDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
@@ -941,7 +941,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int ghostDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f);
|
||||
int ghostDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[ghostDust].velocity *= 3f;
|
||||
Main.dust[ghostDust].noGravity = true;
|
||||
if (Main.rand.NextBool())
|
||||
@@ -952,10 +952,10 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
}
|
||||
for (int j = 0; j < 30; j++)
|
||||
{
|
||||
int ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f);
|
||||
int ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[ghostDust2].noGravity = true;
|
||||
Main.dust[ghostDust2].velocity *= 5f;
|
||||
ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f);
|
||||
ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[ghostDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
@@ -1319,7 +1319,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int ghostDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f);
|
||||
int ghostDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Necroplasm, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[ghostDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -1329,10 +1329,10 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
}
|
||||
for (int j = 0; j < 60; j++)
|
||||
{
|
||||
int ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f);
|
||||
int ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[ghostDust2].noGravity = true;
|
||||
Main.dust[ghostDust2].velocity *= 5f;
|
||||
ghostDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f);
|
||||
ghostDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[ghostDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
Movement(phase2, expertMode, revenge, death, speedBoost, despawnBoost, lifeRatio, tileEnrageMult, player);
|
||||
|
||||
// Fire projectiles
|
||||
Vector2 hookPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
Vector2 hookPosition = NPC.Center;
|
||||
float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2) - hookPosition.X;
|
||||
float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2) - hookPosition.Y;
|
||||
float targetDistance = (float)Math.Sqrt(targetX * targetX + targetY * targetY);
|
||||
|
||||
@@ -182,7 +182,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
int iceFlame = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.IceTorch, 0f, 0f, 100, default, 2f);
|
||||
int iceFlame = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.IceTorch, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[iceFlame].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -192,10 +192,10 @@ namespace CalamityMod.NPCs.Ravager
|
||||
}
|
||||
for (int j = 0; j < 30; j++)
|
||||
{
|
||||
int rockDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f);
|
||||
int rockDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[rockDust].noGravity = true;
|
||||
Main.dust[rockDust].velocity *= 5f;
|
||||
rockDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
rockDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[rockDust].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
@@ -203,7 +203,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int iceFlame = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
int iceFlame = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[iceFlame].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -213,10 +213,10 @@ namespace CalamityMod.NPCs.Ravager
|
||||
}
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
int rockDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f);
|
||||
int rockDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[rockDust].noGravity = true;
|
||||
Main.dust[rockDust].velocity *= 5f;
|
||||
rockDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
rockDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[rockDust].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int rockDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
int rockDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[rockDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -87,10 +87,10 @@ namespace CalamityMod.NPCs.Ravager
|
||||
}
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
int rockDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f);
|
||||
int rockDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[rockDust2].noGravity = true;
|
||||
Main.dust[rockDust2].velocity *= 5f;
|
||||
rockDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
rockDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[rockDust2].velocity *= 2f;
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
int rockDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
int rockDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[rockDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -173,10 +173,10 @@ namespace CalamityMod.NPCs.Ravager
|
||||
}
|
||||
for (int j = 0; j < 30; j++)
|
||||
{
|
||||
int rockDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f);
|
||||
int rockDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[rockDust2].noGravity = true;
|
||||
Main.dust[rockDust2].velocity *= 5f;
|
||||
rockDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
rockDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[rockDust2].velocity *= 2f;
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int rockDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
int rockDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[rockDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -210,10 +210,10 @@ namespace CalamityMod.NPCs.Ravager
|
||||
}
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
int rockDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f);
|
||||
int rockDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Stone, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[rockDust2].noGravity = true;
|
||||
Main.dust[rockDust2].velocity *= 5f;
|
||||
rockDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
rockDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Iron, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[rockDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ namespace CalamityMod.NPCs.Signus
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -223,10 +223,10 @@ namespace CalamityMod.NPCs.Signus
|
||||
}
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[cosmiliteDust2].noGravity = true;
|
||||
Main.dust[cosmiliteDust2].velocity *= 5f;
|
||||
cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust2].velocity *= 2f;
|
||||
Main.dust[cosmiliteDust2].noGravity = true;
|
||||
}
|
||||
|
||||
@@ -998,7 +998,7 @@ namespace CalamityMod.NPCs.Signus
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int teleportDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
int teleportDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[teleportDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -1008,10 +1008,10 @@ namespace CalamityMod.NPCs.Signus
|
||||
}
|
||||
for (int j = 0; j < 60; j++)
|
||||
{
|
||||
int teleportDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
int teleportDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[teleportDust2].noGravity = true;
|
||||
Main.dust[teleportDust2].velocity *= 5f;
|
||||
teleportDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
teleportDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[teleportDust2].velocity *= 2f;
|
||||
}
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
{
|
||||
Color color = Main.rand.NextBool() ? Color.Lavender : Color.Crimson;
|
||||
color.A = 150;
|
||||
int slimyDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 2f);
|
||||
int slimyDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 2f);
|
||||
Main.dust[slimyDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -244,10 +244,10 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
{
|
||||
Color color = Main.rand.NextBool() ? Color.Lavender : Color.Crimson;
|
||||
color.A = 150;
|
||||
int slimyDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 3f);
|
||||
int slimyDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 3f);
|
||||
Main.dust[slimyDust2].noGravity = true;
|
||||
Main.dust[slimyDust2].velocity *= 5f;
|
||||
slimyDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 2f);
|
||||
slimyDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 2f);
|
||||
Main.dust[slimyDust2].velocity *= 2f;
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
{
|
||||
Color color = Main.rand.NextBool() ? Color.Lavender : Color.Crimson;
|
||||
color.A = 150;
|
||||
int dust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 2f);
|
||||
int dust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 2f);
|
||||
Main.dust[dust2].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -384,10 +384,10 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
{
|
||||
Color color = Main.rand.NextBool() ? Color.Lavender : Color.Crimson;
|
||||
color.A = 150;
|
||||
int dust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 3f);
|
||||
int dust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 3f);
|
||||
Main.dust[dust2].noGravity = true;
|
||||
Main.dust[dust2].velocity *= 5f;
|
||||
dust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 2f);
|
||||
dust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, color, 2f);
|
||||
Main.dust[dust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -741,7 +741,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int crimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 2f);
|
||||
int crimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 2f);
|
||||
Main.dust[crimDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -751,10 +751,10 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
}
|
||||
for (int j = 0; j < 70; j++)
|
||||
{
|
||||
int crimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 3f);
|
||||
int crimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 3f);
|
||||
Main.dust[crimDust2].noGravity = true;
|
||||
Main.dust[crimDust2].velocity *= 5f;
|
||||
crimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 2f);
|
||||
crimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 2f);
|
||||
Main.dust[crimDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -785,7 +785,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int corruptionDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 2f);
|
||||
int corruptionDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 2f);
|
||||
Main.dust[corruptionDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -795,10 +795,10 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
}
|
||||
for (int j = 0; j < 70; j++)
|
||||
{
|
||||
int corruptionDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 3f);
|
||||
int corruptionDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 3f);
|
||||
Main.dust[corruptionDust2].noGravity = true;
|
||||
Main.dust[corruptionDust2].velocity *= 5f;
|
||||
corruptionDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 2f);
|
||||
corruptionDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TintableDust, 0f, 0f, NPC.alpha, dustColor, 2f);
|
||||
Main.dust[corruptionDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int redDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TheDestroyer, 0f, 0f, 100, default, 2f);
|
||||
int redDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TheDestroyer, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[redDust].noGravity = true;
|
||||
Main.dust[redDust].noLight = true;
|
||||
}
|
||||
@@ -204,7 +204,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
NPC.alpha = 0;
|
||||
}
|
||||
|
||||
Vector2 segmentLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
Vector2 segmentLocation = NPC.Center;
|
||||
float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2);
|
||||
float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2);
|
||||
targetX = (int)(targetX / 16f) * 16;
|
||||
@@ -219,7 +219,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
{
|
||||
try
|
||||
{
|
||||
segmentLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
segmentLocation = NPC.Center;
|
||||
targetX = Main.npc[(int)NPC.ai[1]].position.X + (Main.npc[(int)NPC.ai[1]].width / 2) - segmentLocation.X;
|
||||
targetY = Main.npc[(int)NPC.ai[1]].position.Y + (Main.npc[(int)NPC.ai[1]].height / 2) - segmentLocation.Y;
|
||||
}
|
||||
@@ -352,7 +352,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -363,10 +363,10 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
for (int j = 0; j < 40; j++)
|
||||
{
|
||||
int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[cosmiliteDust2].noGravity = true;
|
||||
Main.dust[cosmiliteDust2].velocity *= 5f;
|
||||
cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int redDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TheDestroyer, 0f, 0f, 100, default, 2f);
|
||||
int redDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TheDestroyer, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[redDust].noGravity = true;
|
||||
Main.dust[redDust].noLight = true;
|
||||
}
|
||||
@@ -915,7 +915,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -926,10 +926,10 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
for (int j = 0; j < 40; j++)
|
||||
{
|
||||
int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[cosmiliteDust2].noGravity = true;
|
||||
Main.dust[cosmiliteDust2].velocity *= 5f;
|
||||
cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int redDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TheDestroyer, 0f, 0f, 100, default, 2f);
|
||||
int redDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TheDestroyer, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[redDust].noGravity = true;
|
||||
Main.dust[redDust].noLight = true;
|
||||
}
|
||||
@@ -200,7 +200,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
NPC.alpha = 0;
|
||||
}
|
||||
|
||||
Vector2 segmentLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
Vector2 segmentLocation = NPC.Center;
|
||||
float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2);
|
||||
float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2);
|
||||
targetX = (int)(targetX / 16f) * 16;
|
||||
@@ -215,7 +215,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
{
|
||||
try
|
||||
{
|
||||
segmentLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
segmentLocation = NPC.Center;
|
||||
targetX = Main.npc[(int)NPC.ai[1]].position.X + (Main.npc[(int)NPC.ai[1]].width / 2) - segmentLocation.X;
|
||||
targetY = Main.npc[(int)NPC.ai[1]].position.Y + (Main.npc[(int)NPC.ai[1]].height / 2) - segmentLocation.Y;
|
||||
}
|
||||
@@ -350,7 +350,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
int cosmiliteDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -361,10 +361,10 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
for (int j = 0; j < 40; j++)
|
||||
{
|
||||
int cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[cosmiliteDust2].noGravity = true;
|
||||
Main.dust[cosmiliteDust2].velocity *= 5f;
|
||||
cosmiliteDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[cosmiliteDust2].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
else
|
||||
NPC.Opacity = MathHelper.Clamp(NPC.Opacity + 0.165f, 0f, 1f);
|
||||
|
||||
Vector2 segmentLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
Vector2 segmentLocation = NPC.Center;
|
||||
float targetX = CalamityGlobalNPC.SCal < 0 ? 0 : Main.npc[CalamityGlobalNPC.SCal].position.X + (Main.player[NPC.target].width / 2);
|
||||
float targetY = CalamityGlobalNPC.SCal < 0 ? 0 : Main.npc[CalamityGlobalNPC.SCal].position.Y + (Main.player[NPC.target].height / 2);
|
||||
float sepMaxSpeed = BossRushEvent.BossRushActive ? 22.5f : 20f;
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int redDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.TheDestroyer, 0f, 0f, 100, default, 2f);
|
||||
int redDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.TheDestroyer, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[redDust].noGravity = true;
|
||||
Main.dust[redDust].noLight = true;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
NPC.alpha = Main.npc[(int)NPC.ai[2]].alpha;
|
||||
}
|
||||
|
||||
Vector2 segmentLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
Vector2 segmentLocation = NPC.Center;
|
||||
float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2);
|
||||
float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2);
|
||||
targetX = (int)(targetX / 16f) * 16;
|
||||
@@ -122,7 +122,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
try
|
||||
{
|
||||
segmentLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
segmentLocation = NPC.Center;
|
||||
targetX = Main.npc[(int)NPC.ai[1]].position.X + (Main.npc[(int)NPC.ai[1]].width / 2) - segmentLocation.X;
|
||||
targetY = Main.npc[(int)NPC.ai[1]].position.Y + (Main.npc[(int)NPC.ai[1]].height / 2) - segmentLocation.Y;
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
int brimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[brimDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -242,10 +242,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
int brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[brimDust2].noGravity = true;
|
||||
Main.dust[brimDust2].velocity *= 5f;
|
||||
brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[brimDust2].velocity *= 2f;
|
||||
}
|
||||
|
||||
|
||||
@@ -326,7 +326,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
int brimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[brimDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -336,10 +336,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
for (int j = 0; j < 70; j++)
|
||||
{
|
||||
int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
int brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[brimDust2].noGravity = true;
|
||||
Main.dust[brimDust2].velocity *= 5f;
|
||||
brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[brimDust2].velocity *= 2f;
|
||||
}
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
int brimDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[brimDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -330,10 +330,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
for (int j = 0; j < 70; j++)
|
||||
{
|
||||
int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
int brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[brimDust2].noGravity = true;
|
||||
Main.dust[brimDust2].velocity *= 5f;
|
||||
brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
brimDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[brimDust2].velocity *= 2f;
|
||||
}
|
||||
|
||||
|
||||
@@ -3256,7 +3256,7 @@ namespace CalamityMod.NPCs.Yharon
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int fieryDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f);
|
||||
int fieryDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[fieryDust].velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
@@ -3266,10 +3266,10 @@ namespace CalamityMod.NPCs.Yharon
|
||||
}
|
||||
for (int j = 0; j < 70; j++)
|
||||
{
|
||||
int fieryDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.CopperCoin, 0f, 0f, 100, default, 3f);
|
||||
int fieryDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[fieryDust2].noGravity = true;
|
||||
Main.dust[fieryDust2].velocity *= 5f;
|
||||
fieryDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f);
|
||||
fieryDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[fieryDust2].velocity *= 2f;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
velocity *= 2f;
|
||||
velocity.SafeNormalize(Vector2.Zero);
|
||||
float projSpeed = 5f * Projectile.scale;
|
||||
Vector2 fireDirection = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
|
||||
Vector2 fireDirection = npc.Center;
|
||||
float fireXVel = Projectile.Center.X - fireDirection.X;
|
||||
float fireYVel = Projectile.Center.Y - fireDirection.Y;
|
||||
float fireVelocity = (float)Math.Sqrt((double)(fireXVel * fireXVel + fireYVel * fireYVel));
|
||||
|
||||
Reference in new issue
Block a user