Main.dust[i] culling part 1
This commit is contained in:
1 parent
7875b12f41
commit
f179bd2868
21 files changed
+284
-293
No files matched your search
@@ -63,10 +63,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust = Dust.NewDust(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, Main.rand.NextBool(8) ? 296 : 5, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.25f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.3f;
|
||||
Main.dust[dust].velocity.Y -= 0.5f;
|
||||
Dust blood = Dust.NewDustDirect(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, Main.rand.NextBool(8) ? 296 : 5, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.25f);
|
||||
blood.noGravity = true;
|
||||
blood.velocity *= 1.3f;
|
||||
blood.velocity.Y -= 0.5f;
|
||||
}
|
||||
Lighting.AddLight(npc.Center, 0.08f, 0f, 0f);
|
||||
}
|
||||
|
||||
@@ -53,15 +53,15 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
}
|
||||
|
||||
// Blue n black dust
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, Main.rand.NextBool(3) ? 104 : 186, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.4f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.75f;
|
||||
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 0.75f;
|
||||
Main.dust[dust].velocity.Y = Main.dust[dust].velocity.Y - 1f;
|
||||
Dust water = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, Main.rand.NextBool(3) ? 104 : 186, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.4f);
|
||||
water.noGravity = true;
|
||||
water.velocity *= 0.75f;
|
||||
water.velocity.X *= 0.75f;
|
||||
water.velocity.Y -= 1f;
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.2f;
|
||||
water.noGravity = false;
|
||||
water.scale *= 0.2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,15 +84,15 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
BloodParticle blood = new BloodParticle(npcSize, bloodVelocity, bloodLifetime, bloodScale, bloodColor);
|
||||
GeneralParticleHandler.SpawnParticle(blood);
|
||||
}
|
||||
int dust = Dust.NewDust(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, Main.rand.NextBool(3) ? 104 : 186, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.4f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.75f;
|
||||
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 0.75f;
|
||||
Main.dust[dust].velocity.Y = Main.dust[dust].velocity.Y - 1f;
|
||||
Dust water = Dust.NewDustDirect(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, Main.rand.NextBool(3) ? 104 : 186, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.4f);
|
||||
water.noGravity = true;
|
||||
water.velocity *= 0.75f;
|
||||
water.velocity.X = water.velocity.X * 0.75f;
|
||||
water.velocity.Y = water.velocity.Y - 1f;
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.2f;
|
||||
water.noGravity = false;
|
||||
water.scale *= 0.2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,10 +45,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
Vector2 dustCorner = Player.position - 2f * Vector2.One;
|
||||
Vector2 dustVel = Player.velocity + new Vector2(0f, Main.rand.NextFloat(-5f, -1f));
|
||||
int d = Dust.NewDust(dustCorner, Player.width + 4, Player.height + 4, DustID.GemTopaz, dustVel.X, dustVel.Y);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].scale = Main.rand.NextFloat(0.7f, 1.2f);
|
||||
Main.dust[d].alpha = 235;
|
||||
Dust fire = Dust.NewDustDirect(dustCorner, Player.width + 4, Player.height + 4, DustID.GemTopaz, dustVel.X, dustVel.Y);
|
||||
fire.noGravity = true;
|
||||
fire.scale = Main.rand.NextFloat(0.7f, 1.2f);
|
||||
fire.alpha = 235;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,10 +66,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
Vector2 dustCorner = npc.position - 2f * Vector2.One;
|
||||
Vector2 dustVel = npc.velocity + new Vector2(0f, Main.rand.NextFloat(-5f, -1f));
|
||||
int d = Dust.NewDust(dustCorner, npc.width + 4, npc.height + 4, DustID.GemTopaz, dustVel.X, dustVel.Y);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].scale = Main.rand.NextFloat(0.7f, 1.2f);
|
||||
Main.dust[d].alpha = 235;
|
||||
Dust fire = Dust.NewDustDirect(dustCorner, npc.width + 4, npc.height + 4, DustID.GemTopaz, dustVel.X, dustVel.Y);
|
||||
fire.noGravity = true;
|
||||
fire.scale = Main.rand.NextFloat(0.7f, 1.2f);
|
||||
fire.alpha = 235;
|
||||
}
|
||||
Lighting.AddLight(npc.position, 0.25f, 0.25f, 0.1f);
|
||||
}
|
||||
|
||||
@@ -44,10 +44,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
Vector2 dustCorner = Player.position - 2f * Vector2.One;
|
||||
Vector2 dustVel = Player.velocity + new Vector2(0f, Main.rand.NextFloat(-11f, -2f));
|
||||
int d = Dust.NewDust(dustCorner, Player.width + 4, Player.height + 4, Main.rand.NextBool(4) ? 300 : 323, dustVel.X, dustVel.Y);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].scale = hasDebuffResistance ? Main.rand.NextFloat(0.3f, 0.3f) : Main.rand.NextFloat(0.5f, 0.5f);
|
||||
Main.dust[d].alpha = 235;
|
||||
Dust moonDust = Dust.NewDustDirect(dustCorner, Player.width + 4, Player.height + 4, Main.rand.NextBool(4) ? 300 : 323, dustVel.X, dustVel.Y);
|
||||
moonDust.noGravity = true;
|
||||
moonDust.scale = hasDebuffResistance ? Main.rand.NextFloat(0.3f, 0.3f) : Main.rand.NextFloat(0.5f, 0.5f);
|
||||
moonDust.alpha = 235;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,10 +64,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
Vector2 dustCorner = npc.position - 2f * Vector2.One;
|
||||
Vector2 dustVel = npc.velocity + new Vector2(0f, Main.rand.NextFloat(-11f, -2f));
|
||||
int d = Dust.NewDust(dustCorner, npc.width + 4, npc.height + 4, Main.rand.NextBool(4) ? 300 : 323, dustVel.X, dustVel.Y);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].scale = Main.rand.NextFloat(0.5f, 0.5f);
|
||||
Main.dust[d].alpha = 235;
|
||||
Dust moonDust = Dust.NewDustDirect(dustCorner, npc.width + 4, npc.height + 4, Main.rand.NextBool(4) ? 300 : 323, dustVel.X, dustVel.Y);
|
||||
moonDust.noGravity = true;
|
||||
moonDust.scale = Main.rand.NextFloat(0.5f, 0.5f);
|
||||
moonDust.alpha = 235;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,11 +36,11 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
if (Main.rand.NextBool(14))
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.FungiHit, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].velocity *= 1.2f;
|
||||
Main.dust[dust].velocity.Y += 0.8f;
|
||||
drawInfo.DustCache.Add(dust);
|
||||
Dust dust = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.FungiHit, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
dust.noGravity = false;
|
||||
dust.velocity *= 1.2f;
|
||||
dust.velocity.Y += 0.8f;
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
if (Main.rand.NextBool(9))
|
||||
{
|
||||
|
||||
@@ -30,15 +30,15 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
if (Main.rand.Next(5) < 4)
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.Shadowflame, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.75f;
|
||||
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 0.75f;
|
||||
Main.dust[dust].velocity.Y = Main.dust[dust].velocity.Y - 3f;
|
||||
Dust flame = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.Shadowflame, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.1f);
|
||||
flame.noGravity = true;
|
||||
flame.velocity *= 0.75f;
|
||||
flame.velocity.X *= 0.75f;
|
||||
flame.velocity.Y -= 3f;
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.3f;
|
||||
flame.noGravity = false;
|
||||
flame.scale *= 0.3f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,15 +45,15 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
if (Main.rand.Next(5) < 4)
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.JungleTorch, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 0.6f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.75f;
|
||||
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 0.75f;
|
||||
Main.dust[dust].velocity.Y = Main.dust[dust].velocity.Y - 1f;
|
||||
Dust microbe = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.JungleTorch, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 0.6f);
|
||||
microbe.noGravity = true;
|
||||
microbe.velocity *= 0.75f;
|
||||
microbe.velocity.X *= 0.75f;
|
||||
microbe.velocity.Y -= 1f;
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.2f;
|
||||
microbe.noGravity = false;
|
||||
microbe.scale *= 0.2f;
|
||||
}
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
@@ -68,15 +68,15 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
|
||||
int dust = Dust.NewDust(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, DustID.JungleTorch, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.2f + +(0.000003f * npc.width * npc.height));
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.75f;
|
||||
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 0.75f;
|
||||
Main.dust[dust].velocity.Y = Main.dust[dust].velocity.Y - 1f;
|
||||
Dust microbe = Dust.NewDustDirect(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, DustID.JungleTorch, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.2f + +(0.000003f * npc.width * npc.height));
|
||||
microbe.noGravity = true;
|
||||
microbe.velocity *= 0.75f;
|
||||
microbe.velocity.X *= 0.75f;
|
||||
microbe.velocity.Y -= 1f;
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.4f;
|
||||
microbe.noGravity = false;
|
||||
microbe.scale *= 0.4f;
|
||||
}
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
|
||||
@@ -48,16 +48,16 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
});
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, dustType, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 3f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.8f;
|
||||
Main.dust[dust].velocity.Y -= 0.5f;
|
||||
Dust dust = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, dustType, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 3f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 1.8f;
|
||||
dust.velocity.Y -= 0.5f;
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.5f;
|
||||
dust.noGravity = false;
|
||||
dust.scale *= 0.5f;
|
||||
}
|
||||
drawInfo.DustCache.Add(dust);
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,14 +76,14 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
if (Main.rand.Next(5) < 4)
|
||||
{
|
||||
int dust = Dust.NewDust(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, dustType, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 3f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.8f;
|
||||
Main.dust[dust].velocity.Y -= 0.5f;
|
||||
Dust dust = Dust.NewDustDirect(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, dustType, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 3f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 1.8f;
|
||||
dust.velocity.Y -= 0.5f;
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.5f;
|
||||
dust.noGravity = false;
|
||||
dust.scale *= 0.5f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,10 +48,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
}
|
||||
Vector2 dustCorner = Player.position - 2f * Vector2.One;
|
||||
Vector2 dustVel = Player.velocity + new Vector2(0f, Main.rand.NextFloat(-11f, -2f));
|
||||
int d = Dust.NewDust(dustCorner, Player.width + 4, Player.height + 4, Main.rand.NextBool(4) ? 20 : 113, dustVel.X, dustVel.Y);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].scale = Main.rand.NextFloat(1f, 0.3f);
|
||||
Main.dust[d].alpha = 10;
|
||||
Dust dust = Dust.NewDustDirect(dustCorner, Player.width + 4, Player.height + 4, Main.rand.NextBool(4) ? 20 : 113, dustVel.X, dustVel.Y);
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(1f, 0.3f);
|
||||
dust.alpha = 10;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(NPC npc, ref Color drawColor)
|
||||
@@ -72,10 +72,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
Vector2 dustCorner = npc.position - 2f * Vector2.One;
|
||||
Vector2 dustVel = npc.velocity + new Vector2(0f, Main.rand.NextFloat(-11f, -2f));
|
||||
int d = Dust.NewDust(dustCorner, npc.width + 4, npc.height + 4, Main.rand.NextBool(4) ? 20 : 113, dustVel.X, dustVel.Y);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].scale = Main.rand.NextFloat(1f, 0.3f);
|
||||
Main.dust[d].alpha = 10;
|
||||
Dust dust = Dust.NewDustDirect(dustCorner, npc.width + 4, npc.height + 4, Main.rand.NextBool(4) ? 20 : 113, dustVel.X, dustVel.Y);
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(1f, 0.3f);
|
||||
dust.alpha = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,12 +35,11 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
int dustID = ModContent.DustType<AdrenDust>();
|
||||
Vector2 dustVel = Player.velocity * 0.5f;
|
||||
int idx = Dust.NewDust(Main.rand.NextBool(5) ? drawInfo.Position : drawInfo.Position - Player.velocity * 1.5f, Player.width, Player.height, dustID, dustVel.X, dustVel.Y);
|
||||
Dust d = Main.dust[idx];
|
||||
d.scale = Main.rand.NextFloat(0.4f, 1.2f);
|
||||
d.noGravity = true;
|
||||
d.noLight = false;
|
||||
drawInfo.DustCache.Add(idx);
|
||||
Dust dust = Dust.NewDustDirect(Main.rand.NextBool(5) ? drawInfo.Position : drawInfo.Position - Player.velocity * 1.5f, Player.width, Player.height, dustID, dustVel.X, dustVel.Y);
|
||||
dust.scale = Main.rand.NextFloat(0.4f, 1.2f);
|
||||
dust.noGravity = true;
|
||||
dust.noLight = false;
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,11 +26,11 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
|
||||
if (Main.rand.NextBool(10))
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.TerraBlade, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.75f;
|
||||
Main.dust[dust].velocity.Y -= 0.35f;
|
||||
drawInfo.DustCache.Add(dust);
|
||||
Dust dust = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.TerraBlade, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 0.75f;
|
||||
dust.velocity.Y -= 0.35f;
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,11 +32,11 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
if (Main.rand.Next(5) >= 0)
|
||||
{
|
||||
int dust = Dust.NewDust(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, ModContent.DustType<AbsorberDust>(), npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 2.5f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity.Y -= 1.8f;
|
||||
Main.dust[dust].velocity.Y *= 2.5f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
Dust dust = Dust.NewDustDirect(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, ModContent.DustType<AbsorberDust>(), npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 2.5f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity.Y -= 1.8f;
|
||||
dust.velocity.Y *= 2.5f;
|
||||
dust.noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,11 +28,11 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
if (Main.rand.NextBool(12))
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, (int)CalamityDusts.ProfanedFire, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 3f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.8f;
|
||||
Main.dust[dust].velocity.Y -= 0.5f;
|
||||
drawInfo.DustCache.Add(dust);
|
||||
Dust dust = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, (int)CalamityDusts.ProfanedFire, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 3f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 1.8f;
|
||||
dust.velocity.Y -= 0.5f;
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+58
-58
@@ -2958,9 +2958,9 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 step = teleportOffset / numDust;
|
||||
for (int i = 0; i < numDust; i++)
|
||||
{
|
||||
int dustIndex = Dust.NewDust(Player.Center - (step * i), 1, 1, DustID.VilePowder, step.X, step.Y);
|
||||
Main.dust[dustIndex].noGravity = true;
|
||||
Main.dust[dustIndex].noLight = true;
|
||||
Dust dust = Dust.NewDustDirect(Player.Center - (step * i), 1, 1, DustID.VilePowder, step.X, step.Y);
|
||||
dust.noGravity = true;
|
||||
dust.noLight = true;
|
||||
}
|
||||
|
||||
spectralVeilImmunity = SpectralVeil.VeilIFrames;
|
||||
@@ -2998,9 +2998,9 @@ namespace CalamityMod.CalPlayer
|
||||
SoundEngine.PlaySound(BrimflameScowl.ActivationSound, Player.Center);
|
||||
for (int i = 0; i < 36; i++)
|
||||
{
|
||||
int brimDust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[brimDust].velocity *= 3f;
|
||||
Main.dust[brimDust].scale *= 1.15f;
|
||||
Dust brimDust = Dust.NewDustDirect(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f);
|
||||
brimDust.velocity *= 3f;
|
||||
brimDust.scale *= 1.15f;
|
||||
}
|
||||
int dustAmt = 36;
|
||||
for (int j = 0; j < dustAmt; j++)
|
||||
@@ -3008,10 +3008,10 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 dustRotation = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f;
|
||||
dustRotation = dustRotation.RotatedBy((double)((float)(j - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Player.Center;
|
||||
Vector2 dustVelocity = dustRotation - Player.Center;
|
||||
int brimDust2 = Dust.NewDust(dustRotation + dustVelocity, 0, 0, (int)CalamityDusts.Brimstone, dustVelocity.X * 1.5f, dustVelocity.Y * 1.5f, 100, default, 1.4f);
|
||||
Main.dust[brimDust2].noGravity = true;
|
||||
Main.dust[brimDust2].noLight = true;
|
||||
Main.dust[brimDust2].velocity = dustVelocity;
|
||||
Dust brimDust2 = Dust.NewDustDirect(dustRotation + dustVelocity, 0, 0, (int)CalamityDusts.Brimstone, dustVelocity.X * 1.5f, dustVelocity.Y * 1.5f, 100, default, 1.4f);
|
||||
brimDust2.noGravity = true;
|
||||
brimDust2.noLight = true;
|
||||
brimDust2.velocity = dustVelocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3031,9 +3031,9 @@ namespace CalamityMod.CalPlayer
|
||||
SoundEngine.PlaySound(BloodflareHeadRanged.ActivationSound, Player.Center);
|
||||
for (int d = 0; d < 64; d++)
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Necroplasm, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust].velocity *= 3f;
|
||||
Main.dust[dust].scale *= 1.15f;
|
||||
Dust dust = Dust.NewDustDirect(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Necroplasm, 0f, 0f, 0, default, 1f);
|
||||
dust.velocity *= 3f;
|
||||
dust.scale *= 1.15f;
|
||||
}
|
||||
int dustAmt = 36;
|
||||
for (int d = 0; d < dustAmt; d++)
|
||||
@@ -3041,10 +3041,10 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 source = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f;
|
||||
source = source.RotatedBy((double)((float)(d - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Player.Center;
|
||||
Vector2 dustVel = source - Player.Center;
|
||||
int phanto = Dust.NewDust(source + dustVel, 0, 0, (int)CalamityDusts.Necroplasm, dustVel.X * 1.5f, dustVel.Y * 1.5f, 100, default, 1.4f);
|
||||
Main.dust[phanto].noGravity = true;
|
||||
Main.dust[phanto].noLight = true;
|
||||
Main.dust[phanto].velocity = dustVel;
|
||||
Dust phanto = Dust.NewDustDirect(source + dustVel, 0, 0, (int)CalamityDusts.Necroplasm, dustVel.X * 1.5f, dustVel.Y * 1.5f, 100, default, 1.4f);
|
||||
phanto.noGravity = true;
|
||||
phanto.noLight = true;
|
||||
phanto.velocity = dustVel;
|
||||
}
|
||||
float spread = 45f * 0.0174f;
|
||||
double startAngle = Math.Atan2(Player.velocity.X, Player.velocity.Y) - spread / 2;
|
||||
@@ -3082,11 +3082,11 @@ namespace CalamityMod.CalPlayer
|
||||
SoundEngine.PlaySound(OmegaBlueHelmet.ActivationSound, Player.Center);
|
||||
for (int i = 0; i < 66; i++)
|
||||
{
|
||||
int d = Dust.NewDust(Player.position, Player.width, Player.height, DustID.PurificationPowder, 0, 0, 100, Color.Transparent, 2.6f);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].noLight = true;
|
||||
Main.dust[d].fadeIn = 1f;
|
||||
Main.dust[d].velocity *= 6.6f;
|
||||
Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.PurificationPowder, 0, 0, 100, Color.Transparent, 2.6f);
|
||||
dust.noGravity = true;
|
||||
dust.noLight = true;
|
||||
dust.fadeIn = 1f;
|
||||
dust.velocity *= 6.6f;
|
||||
}
|
||||
}
|
||||
if (dsSetBonus)
|
||||
@@ -3094,9 +3094,9 @@ namespace CalamityMod.CalPlayer
|
||||
SoundEngine.PlaySound(DemonshadeHelm.ActivationSound, Player.Center);
|
||||
for (int i = 0; i < 36; i++)
|
||||
{
|
||||
int brimDust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[brimDust].velocity *= 3f;
|
||||
Main.dust[brimDust].scale *= 1.15f;
|
||||
Dust brimDust = Dust.NewDustDirect(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f);
|
||||
brimDust.velocity *= 3f;
|
||||
brimDust.scale *= 1.15f;
|
||||
}
|
||||
int dustAmt = 36;
|
||||
for (int j = 0; j < dustAmt; j++)
|
||||
@@ -3104,10 +3104,10 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 dustRotation = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f;
|
||||
dustRotation = dustRotation.RotatedBy((double)((float)(j - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Player.Center;
|
||||
Vector2 dustVelocity = dustRotation - Player.Center;
|
||||
int brimDust2 = Dust.NewDust(dustRotation + dustVelocity, 0, 0, (int)CalamityDusts.Brimstone, dustVelocity.X * 1.5f, dustVelocity.Y * 1.5f, 100, default, 1.4f);
|
||||
Main.dust[brimDust2].noGravity = true;
|
||||
Main.dust[brimDust2].noLight = true;
|
||||
Main.dust[brimDust2].velocity = dustVelocity;
|
||||
Dust brimDust2 = Dust.NewDustDirect(dustRotation + dustVelocity, 0, 0, (int)CalamityDusts.Brimstone, dustVelocity.X * 1.5f, dustVelocity.Y * 1.5f, 100, default, 1.4f);
|
||||
brimDust2.noGravity = true;
|
||||
brimDust2.noLight = true;
|
||||
brimDust2.velocity = dustVelocity;
|
||||
}
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
@@ -3231,12 +3231,12 @@ namespace CalamityMod.CalPlayer
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
float angle = MathHelper.TwoPi * i / 30f;
|
||||
int dustIndex = Dust.NewDust(Player.position, 120, 120, DustID.Rain_BloodMoon, 0f, 0f, 0, default, 2f);
|
||||
Main.dust[dustIndex].noGravity = true;
|
||||
Main.dust[dustIndex].velocity *= 4f;
|
||||
dustIndex = Dust.NewDust(Player.position, 120, 120, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[dustIndex].velocity *= 2.25f;
|
||||
Main.dust[dustIndex].noGravity = true;
|
||||
Dust dust = Dust.NewDustDirect(Player.position, 120, 120, DustID.Rain_BloodMoon, 0f, 0f, 0, default, 2f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 4f;
|
||||
dust = Dust.NewDustDirect(Player.position, 120, 120, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1f);
|
||||
dust.velocity *= 2.25f;
|
||||
dust.noGravity = true;
|
||||
Dust.NewDust(Player.Center + angle.ToRotationVector2() * 160f, 0, 0, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1f);
|
||||
}
|
||||
|
||||
@@ -3409,44 +3409,44 @@ namespace CalamityMod.CalPlayer
|
||||
// Make some dust
|
||||
for (int index = 0; index < 100; ++index)
|
||||
{
|
||||
Main.dust[Dust.NewDust(player.position, player.width, player.height, DustID.TeleportationPotion, player.velocity.X * 0.2f, player.velocity.Y * 0.2f, 150, Color.Cyan, 1.2f)].velocity *= 0.5f;
|
||||
Dust.NewDust(player.position, player.width, player.height, DustID.TeleportationPotion, player.velocity.X * 0.1f, player.velocity.Y * 0.1f, 150, Color.Cyan, 1.2f);
|
||||
}
|
||||
Rectangle rect = player.getRect();
|
||||
int dustAmt = rect.Width * rect.Height / 5;
|
||||
for (int k = 0; k < dustAmt; k++)
|
||||
{
|
||||
int idx = Dust.NewDust(new Vector2(rect.X, rect.Y), rect.Width, rect.Height, DustID.TeleportationPotion);
|
||||
Main.dust[idx].scale = Main.rand.NextFloat(0.2f, 0.7f);
|
||||
Dust dust = Dust.NewDustDirect(new Vector2(rect.X, rect.Y), rect.Width, rect.Height, DustID.TeleportationPotion);
|
||||
dust.scale = Main.rand.NextFloat(0.2f, 0.7f);
|
||||
if (k < 10)
|
||||
Main.dust[idx].scale += 0.25f;
|
||||
dust.scale += 0.25f;
|
||||
if (k < 5)
|
||||
Main.dust[idx].scale += 0.25f;
|
||||
dust.scale += 0.25f;
|
||||
}
|
||||
for (int k = 0; k < 50; k++)
|
||||
{
|
||||
int idx = Dust.NewDust(new Vector2(rect.X, rect.Y), rect.Width, rect.Height, DustID.DungeonSpirit);
|
||||
Main.dust[idx].noGravity = true;
|
||||
Dust dust = Dust.NewDustDirect(new Vector2(rect.X, rect.Y), rect.Width, rect.Height, DustID.DungeonSpirit);
|
||||
dust.noGravity = true;
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
Main.dust[idx].velocity *= 0.75f;
|
||||
dust.velocity *= 0.75f;
|
||||
}
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
Main.dust[idx].velocity *= 2f;
|
||||
Main.dust[idx].scale *= 1.2f;
|
||||
dust.velocity *= 2f;
|
||||
dust.scale *= 1.2f;
|
||||
}
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
Main.dust[idx].velocity *= 2f;
|
||||
Main.dust[idx].scale *= 1.2f;
|
||||
dust.velocity *= 2f;
|
||||
dust.scale *= 1.2f;
|
||||
}
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[idx].fadeIn = Main.rand.NextFloat(0.75f, 1f);
|
||||
Main.dust[idx].scale = Main.rand.NextFloat(0.25f, 0.75f);
|
||||
dust.fadeIn = Main.rand.NextFloat(0.75f, 1f);
|
||||
dust.scale = Main.rand.NextFloat(0.25f, 0.75f);
|
||||
}
|
||||
Main.dust[idx].scale *= 0.8f;
|
||||
dust.scale *= 0.8f;
|
||||
}
|
||||
|
||||
if (playSound)
|
||||
@@ -4026,12 +4026,12 @@ namespace CalamityMod.CalPlayer
|
||||
if (Main.rand.NextBool(20))
|
||||
{
|
||||
int confettiDust = Main.rand.Next(139, 143);
|
||||
int confetti = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, confettiDust, Player.velocity.X, Player.velocity.Y, 0, new Color(), 1.2f);
|
||||
Main.dust[confetti].velocity.X *= (float)(1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
Main.dust[confetti].velocity.Y *= (float)(1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
Main.dust[confetti].velocity.X += Main.rand.Next(-50, 51) * 0.05f;
|
||||
Main.dust[confetti].velocity.Y += Main.rand.Next(-50, 51) * 0.05f;
|
||||
Main.dust[confetti].scale *= (float)(1.0 + Main.rand.Next(-30, 31) * 0.01);
|
||||
Dust confetti = Dust.NewDustDirect(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, confettiDust, Player.velocity.X, Player.velocity.Y, 0, new Color(), 1.2f);
|
||||
confetti.velocity.X *= (float)(1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
confetti.velocity.Y *= (float)(1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
confetti.velocity.X += Main.rand.Next(-50, 51) * 0.05f;
|
||||
confetti.velocity.Y += Main.rand.Next(-50, 51) * 0.05f;
|
||||
confetti.scale *= (float)(1.0 + Main.rand.Next(-30, 31) * 0.01);
|
||||
}
|
||||
if (Main.rand.NextBool(40) && Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
@@ -4139,8 +4139,8 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int element = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.RainbowTorch, Player.velocity.X * 0.2f + Player.direction * 3f, Player.velocity.Y * 0.2f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.25f);
|
||||
Main.dust[element].noGravity = true;
|
||||
Dust rainbow = Dust.NewDustDirect(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.RainbowTorch, Player.velocity.X * 0.2f + Player.direction * 3f, Player.velocity.Y * 0.2f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.25f);
|
||||
rainbow.noGravity = true;
|
||||
}
|
||||
}
|
||||
if (dsSetBonus)
|
||||
|
||||
@@ -131,10 +131,10 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.Vortex, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.5f;
|
||||
drawInfo.DustCache.Add(dust);
|
||||
Dust dust = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.Vortex, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 0.5f;
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,10 +146,10 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.GoldCoin, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.5f;
|
||||
drawInfo.DustCache.Add(dust);
|
||||
Dust dust = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.GoldCoin, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 0.5f;
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -166,10 +166,10 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.Shadowflame, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.5f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.5f;
|
||||
drawInfo.DustCache.Add(dust);
|
||||
Dust dust = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.Shadowflame, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.5f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 0.5f;
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -332,11 +332,11 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, Main.rand.NextBool(8) ? 296 : 5, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.25f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.3f;
|
||||
Main.dust[dust].velocity.Y -= 0.5f;
|
||||
drawInfo.DustCache.Add(dust);
|
||||
Dust dust = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, Main.rand.NextBool(8) ? 296 : 5, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.25f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 1.3f;
|
||||
dust.velocity.Y -= 0.5f;
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
if (Main.rand.NextBool(16))
|
||||
{
|
||||
|
||||
@@ -71,12 +71,12 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int sVeilDustIndex1 = Dust.NewDust(Player.Center, 1, 1, DustID.VilePowder, sVeilDustDir.X * j, sVeilDustDir.Y * j);
|
||||
int sVeilDustIndex2 = Dust.NewDust(Player.Center, 1, 1, DustID.VilePowder, -sVeilDustDir.X * j, -sVeilDustDir.Y * j);
|
||||
Main.dust[sVeilDustIndex1].noGravity = false;
|
||||
Main.dust[sVeilDustIndex1].noLight = false;
|
||||
Main.dust[sVeilDustIndex2].noGravity = false;
|
||||
Main.dust[sVeilDustIndex2].noLight = false;
|
||||
Dust sVeilDust1 = Dust.NewDustDirect(Player.Center, 1, 1, DustID.VilePowder, sVeilDustDir.X * j, sVeilDustDir.Y * j);
|
||||
Dust sVeilDust2 = Dust.NewDustDirect(Player.Center, 1, 1, DustID.VilePowder, -sVeilDustDir.X * j, -sVeilDustDir.Y * j);
|
||||
sVeilDust1.noGravity = false;
|
||||
sVeilDust1.noLight = false;
|
||||
sVeilDust2.noGravity = false;
|
||||
sVeilDust2.noLight = false;
|
||||
}
|
||||
|
||||
SoundEngine.PlaySound(SilvaHeadSummon.DispelSound, Player.Center);
|
||||
@@ -94,8 +94,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int j = 0; j < 30; j++)
|
||||
{
|
||||
int num = Dust.NewDust(Player.position, Player.width, Player.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Dust dust = Main.dust[num];
|
||||
Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
dust.position.X += Main.rand.Next(-20, 21);
|
||||
dust.position.Y += Main.rand.Next(-20, 21);
|
||||
dust.velocity *= 0.4f;
|
||||
@@ -122,8 +121,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int j = 0; j < 100; j++)
|
||||
{
|
||||
int scarfDodgeDust = Dust.NewDust(Player.position, Player.width, Player.height, DustID.LifeDrain, 0f, 0f, 100, default, 2f);
|
||||
Dust dust = Main.dust[scarfDodgeDust];
|
||||
Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.LifeDrain, 0f, 0f, 100, default, 2f);
|
||||
dust.position.X += Main.rand.Next(-20, 21);
|
||||
dust.position.Y += Main.rand.Next(-20, 21);
|
||||
dust.velocity *= 0.4f;
|
||||
@@ -266,8 +264,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int j = 0; j < 50; j++)
|
||||
{
|
||||
int nebulousReviveDust = Dust.NewDust(Player.position, Player.width, Player.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
|
||||
Dust dust = Main.dust[nebulousReviveDust];
|
||||
Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
|
||||
dust.position.X += Main.rand.Next(-20, 21);
|
||||
dust.position.Y += Main.rand.Next(-20, 21);
|
||||
dust.velocity *= 0.9f;
|
||||
@@ -351,9 +348,9 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int i = 0; i < 60; i++)
|
||||
{
|
||||
int d = Dust.NewDust(Player.position, Player.width, Player.height, DustID.GemSapphire, 0f, 0f, 0, default, 2.5f);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].velocity *= 5f;
|
||||
Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.GemSapphire, 0f, 0f, 0, default, 2.5f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 5f;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -2355,22 +2352,22 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int d = 0; d < 20; d++)
|
||||
{
|
||||
int dust = Dust.NewDust(Player.position, Player.width, Player.height, DustID.Smoke, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[dust].velocity *= 3f;
|
||||
Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.Smoke, 0f, 0f, 100, default, 2f);
|
||||
dust.velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[dust].scale = 0.5f;
|
||||
Main.dust[dust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
dust.scale = 0.5f;
|
||||
dust.fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
for (int d = 0; d < 35; d++)
|
||||
{
|
||||
int fire = Dust.NewDust(Player.position, Player.width, Player.height, DustID.Torch, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[fire].noGravity = true;
|
||||
Main.dust[fire].velocity *= 5f;
|
||||
fire = Dust.NewDust(Player.position, Player.width, Player.height, DustID.Torch, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[fire].velocity *= 2f;
|
||||
Dust fire = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.Torch, 0f, 0f, 100, default, 3f);
|
||||
fire.noGravity = true;
|
||||
fire.velocity *= 5f;
|
||||
fire = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.Torch, 0f, 0f, 100, default, 2f);
|
||||
fire.velocity *= 2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2382,21 +2379,21 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int d = 0; d < 10; d++)
|
||||
{
|
||||
int ice = Dust.NewDust(Player.position, Player.width, Player.height, DustID.IceRod, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[ice].velocity *= 3f;
|
||||
Dust ice = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.IceRod, 0f, 0f, 100, default, 2f);
|
||||
ice.velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[ice].scale = 0.5f;
|
||||
Main.dust[ice].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
ice.scale = 0.5f;
|
||||
ice.fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int d = 0; d < 15; d++)
|
||||
{
|
||||
int ice = Dust.NewDust(Player.position, Player.width, Player.height, DustID.IceRod, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[ice].noGravity = true;
|
||||
Main.dust[ice].velocity *= 5f;
|
||||
ice = Dust.NewDust(Player.position, Player.width, Player.height, DustID.IceRod, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[ice].velocity *= 2f;
|
||||
Dust ice = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.IceRod, 0f, 0f, 100, default, 3f);
|
||||
ice.noGravity = true;
|
||||
ice.velocity *= 5f;
|
||||
ice = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.IceRod, 0f, 0f, 100, default, 2f);
|
||||
ice.velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -679,14 +679,14 @@ namespace CalamityMod.CalPlayer
|
||||
Player.lifeRegen += 2;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int regen = Dust.NewDust(Player.position, Player.width, Player.height, DustID.Blood, 0f, 0f, 200, new Color(99, 54, 84), 2f);
|
||||
Main.dust[regen].noGravity = true;
|
||||
Main.dust[regen].fadeIn = 1.3f;
|
||||
Dust regen = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.Blood, 0f, 0f, 200, new Color(99, 54, 84), 2f);
|
||||
regen.noGravity = true;
|
||||
regen.fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
Main.dust[regen].velocity = velocity;
|
||||
regen.velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= 34f;
|
||||
Main.dust[regen].position = Player.Center - velocity;
|
||||
regen.position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -783,14 +783,14 @@ namespace CalamityMod.CalPlayer
|
||||
bool dustSpawnRolled = Main.rand.Next(30000) < Player.lifeRegenTime || purity ? Main.rand.NextBool() : aAmpoule ? Main.rand.NextBool(4) : Main.rand.NextBool(30);
|
||||
if (dustType != -1 && dustSpawnRolled)
|
||||
{
|
||||
int regen = Dust.NewDust(Player.position, Player.width, Player.height, dustType, 0f, 0f, purity || aAmpoule ? 80 : 200, default, purity || aAmpoule ? 0.5f : 1f);
|
||||
Main.dust[regen].noGravity = true;
|
||||
Main.dust[regen].fadeIn = 1.3f;
|
||||
Dust regen = Dust.NewDustDirect(Player.position, Player.width, Player.height, dustType, 0f, 0f, purity || aAmpoule ? 80 : 200, default, purity || aAmpoule ? 0.5f : 1f);
|
||||
regen.noGravity = true;
|
||||
regen.fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
Main.dust[regen].velocity = velocity;
|
||||
regen.velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= purity || aAmpoule ? 55f : 34f;
|
||||
Main.dust[regen].position = Player.Center - velocity;
|
||||
regen.position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -826,14 +826,14 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (Main.rand.Next(30000) < Player.lifeRegenTime || Main.rand.NextBool())
|
||||
{
|
||||
int regen = Dust.NewDust(Player.position, Player.width, Player.height, DustID.HeartCrystal, 0f, 0f, 200, Color.OrangeRed, 1f);
|
||||
Main.dust[regen].noGravity = true;
|
||||
Main.dust[regen].fadeIn = 1.3f;
|
||||
Dust regen = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.HeartCrystal, 0f, 0f, 200, Color.OrangeRed, 1f);
|
||||
regen.noGravity = true;
|
||||
regen.fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
Main.dust[regen].velocity = velocity;
|
||||
regen.velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= 34f;
|
||||
Main.dust[regen].position = Player.Center - velocity;
|
||||
regen.position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -632,14 +632,14 @@ namespace CalamityMod.CalPlayer
|
||||
// Old Draedon's Heart dust effect from its standing still regen. Works just fine.
|
||||
int dustID = DustID.TerraBlade;
|
||||
{
|
||||
int regen = Dust.NewDust(Player.position, Player.width, Player.height, dustID, 0f, 0f, 200, default, 1f);
|
||||
Main.dust[regen].noGravity = true;
|
||||
Main.dust[regen].fadeIn = 1.3f;
|
||||
Dust regen = Dust.NewDustDirect(Player.position, Player.width, Player.height, dustID, 0f, 0f, 200, default, 1f);
|
||||
regen.noGravity = true;
|
||||
regen.fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
Main.dust[regen].velocity = velocity;
|
||||
regen.velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= 34f;
|
||||
Main.dust[regen].position = Player.Center - velocity;
|
||||
regen.position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -721,8 +721,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.velocity.Length() == 0f)
|
||||
return;
|
||||
|
||||
Dust dust;
|
||||
dust = Main.dust[Dust.NewDust(Player.Center, 16, 16, DustID.Firefly, 0.23255825f, 10f, 0, new Color(117, 55, 15), 1.5116279f)];
|
||||
Dust dust = Dust.NewDustDirect(Player.Center, 16, 16, DustID.Firefly, 0.23255825f, 10f, 0, new Color(117, 55, 15), 1.5116279f);
|
||||
dust.noGravity = true;
|
||||
dust.noLight = true;
|
||||
dust.fadeIn = 2.5813954f;
|
||||
@@ -1406,12 +1405,12 @@ namespace CalamityMod.CalPlayer
|
||||
if (i % dustDivisor == 0)
|
||||
{
|
||||
currentDustPos = Vector2.Lerp(dustLineStart, dustLineEnd, i / (float)maxHealDustIterations);
|
||||
int holyDust = Dust.NewDust(currentDustPos, 0, 0, DustID.RainbowMk2, 0f, 0f, 0, dustColor, 1f);
|
||||
Main.dust[holyDust].position = currentDustPos;
|
||||
Main.dust[holyDust].velocity = spinningpoint.RotatedBy(MathHelper.TwoPi * i / maxHealDustIterations) * healerDustVel * (0.8f + Main.rand.NextFloat() * 0.4f) + Player.velocity;
|
||||
Main.dust[holyDust].noGravity = true;
|
||||
Main.dust[holyDust].scale = 1f;
|
||||
Main.dust[holyDust].fadeIn = Main.rand.NextFloat() * 2f;
|
||||
Dust holyDust = Dust.NewDustDirect(currentDustPos, 0, 0, DustID.RainbowMk2, 0f, 0f, 0, dustColor, 1f);
|
||||
holyDust.position = currentDustPos;
|
||||
holyDust.velocity = spinningpoint.RotatedBy(MathHelper.TwoPi * i / maxHealDustIterations) * healerDustVel * (0.8f + Main.rand.NextFloat() * 0.4f) + Player.velocity;
|
||||
holyDust.noGravity = true;
|
||||
holyDust.scale = 1f;
|
||||
holyDust.fadeIn = Main.rand.NextFloat() * 2f;
|
||||
Dust dustClone = Dust.CloneDust(holyDust);
|
||||
Dust extraDust = dustClone;
|
||||
extraDust.scale /= 2f;
|
||||
@@ -1857,15 +1856,15 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
int green = Dust.NewDust(Player.position, Player.width, Player.height, DustID.ChlorophyteWeapon, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 2f);
|
||||
Main.dust[green].position.X += (float)Main.rand.Next(-20, 21);
|
||||
Main.dust[green].position.Y += (float)Main.rand.Next(-20, 21);
|
||||
Main.dust[green].velocity *= 0.9f;
|
||||
Main.dust[green].noGravity = true;
|
||||
Main.dust[green].scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
Main.dust[green].shader = GameShaders.Armor.GetSecondaryShader(Player.ArmorSetDye(), Player);
|
||||
Dust green = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.ChlorophyteWeapon, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 2f);
|
||||
green.position.X += (float)Main.rand.Next(-20, 21);
|
||||
green.position.Y += (float)Main.rand.Next(-20, 21);
|
||||
green.velocity *= 0.9f;
|
||||
green.noGravity = true;
|
||||
green.scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
green.shader = GameShaders.Armor.GetSecondaryShader(Player.ArmorSetDye(), Player);
|
||||
if (Main.rand.NextBool())
|
||||
Main.dust[green].scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
green.scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
}
|
||||
}
|
||||
if (!Player.HasCooldown(SilvaRevive.ID) && hasSilvaEffect && silvaCountdown <= 0 && !areThereAnyDamnBosses && !areThereAnyDamnEvents)
|
||||
@@ -1959,16 +1958,15 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
int blood = Dust.NewDust(Player.position, Player.width, Player.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
Dust dust = Main.dust[blood];
|
||||
dust.position.X += (float)Main.rand.Next(-20, 21);
|
||||
dust.position.Y += (float)Main.rand.Next(-20, 21);
|
||||
dust.velocity *= 0.9f;
|
||||
dust.noGravity = true;
|
||||
dust.scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
dust.shader = GameShaders.Armor.GetSecondaryShader(Player.ArmorSetDye(), Player);
|
||||
Dust blood = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
blood.position.X += (float)Main.rand.Next(-20, 21);
|
||||
blood.position.Y += (float)Main.rand.Next(-20, 21);
|
||||
blood.velocity *= 0.9f;
|
||||
blood.noGravity = true;
|
||||
blood.scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
blood.shader = GameShaders.Armor.GetSecondaryShader(Player.ArmorSetDye(), Player);
|
||||
if (Main.rand.NextBool())
|
||||
dust.scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
blood.scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2068,9 +2066,9 @@ namespace CalamityMod.CalPlayer
|
||||
Player.velocity.X = 0f;
|
||||
Player.velocity.Y = -0.4f; // Should negate gravity
|
||||
|
||||
int ice = Dust.NewDust(Player.position, Player.width, Player.height, DustID.GemSapphire);
|
||||
Main.dust[ice].noGravity = true;
|
||||
Main.dust[ice].velocity *= 2f;
|
||||
Dust ice = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.GemSapphire);
|
||||
ice.noGravity = true;
|
||||
ice.velocity *= 2f;
|
||||
|
||||
Player.buffImmune[BuffID.Frozen] = true;
|
||||
Player.buffImmune[BuffID.Chilled] = true;
|
||||
@@ -2215,10 +2213,10 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
int dust = Dust.NewDust(Player.Center, 1, 1, DustID.RedTorch, Player.velocity.X * -0.1f, Player.velocity.Y * -0.1f, 100, default, 3.5f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.2f;
|
||||
Main.dust[dust].velocity.Y -= 0.15f;
|
||||
Dust dust = Dust.NewDustDirect(Player.Center, 1, 1, DustID.RedTorch, Player.velocity.X * -0.1f, Player.velocity.Y * -0.1f, 100, default, 3.5f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 1.2f;
|
||||
dust.velocity.Y -= 0.15f;
|
||||
}
|
||||
}
|
||||
else if (plaguedFuelPack)
|
||||
@@ -2241,10 +2239,10 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
int dust = Dust.NewDust(Player.Center, 1, 1, DustID.GemEmerald, Player.velocity.X * -0.1f, Player.velocity.Y * -0.1f, 100, default, 3.5f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.2f;
|
||||
Main.dust[dust].velocity.Y -= 0.15f;
|
||||
Dust dust = Dust.NewDustDirect(Player.Center, 1, 1, DustID.GemEmerald, Player.velocity.X * -0.1f, Player.velocity.Y * -0.1f, 100, default, 3.5f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 1.2f;
|
||||
dust.velocity.Y -= 0.15f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2736,20 +2734,20 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 source = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 1f; //0.75
|
||||
source = source.RotatedBy((double)((float)(d - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Player.Center;
|
||||
Vector2 dustVel = source - Player.Center;
|
||||
int blue = Dust.NewDust(source + dustVel, 0, 0, DustID.Vortex, dustVel.X, dustVel.Y, 100, default, 1.2f);
|
||||
Main.dust[blue].noGravity = true;
|
||||
Main.dust[blue].noLight = false;
|
||||
Main.dust[blue].velocity = dustVel;
|
||||
Dust blue = Dust.NewDustDirect(source + dustVel, 0, 0, DustID.Vortex, dustVel.X, dustVel.Y, 100, default, 1.2f);
|
||||
blue.noGravity = true;
|
||||
blue.noLight = false;
|
||||
blue.velocity = dustVel;
|
||||
}
|
||||
for (int d = 0; d < dustAmt; d++)
|
||||
{
|
||||
Vector2 source = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f;
|
||||
source = source.RotatedBy((double)((float)(d - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Player.Center;
|
||||
Vector2 dustVel = source - Player.Center;
|
||||
int green = Dust.NewDust(source + dustVel, 0, 0, DustID.TerraBlade, dustVel.X, dustVel.Y, 100, default, 1.2f);
|
||||
Main.dust[green].noGravity = true;
|
||||
Main.dust[green].noLight = false;
|
||||
Main.dust[green].velocity = dustVel;
|
||||
Dust green = Dust.NewDustDirect(source + dustVel, 0, 0, DustID.TerraBlade, dustVel.X, dustVel.Y, 100, default, 1.2f);
|
||||
green.noGravity = true;
|
||||
green.noLight = false;
|
||||
green.velocity = dustVel;
|
||||
}
|
||||
}
|
||||
auralisAuroraCounter = 0;
|
||||
@@ -3812,10 +3810,10 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 source = Vector2.Normalize(Player.velocity) * new Vector2(Player.width / 2f, Player.height) * 0.75f;
|
||||
source = source.RotatedBy((dustIndex - (dustAmt / 2 - 1)) * MathHelper.TwoPi / dustAmt, default) + Player.Center;
|
||||
Vector2 dustVel = source - Player.Center;
|
||||
int dusty = Dust.NewDust(source + dustVel, 0, 0, DustID.RainbowMk2, dustVel.X * 1f, dustVel.Y * 1f, 100, color, 1f);
|
||||
Main.dust[dusty].noGravity = true;
|
||||
Main.dust[dusty].noLight = true;
|
||||
Main.dust[dusty].velocity = dustVel;
|
||||
Dust dusty = Dust.NewDustDirect(source + dustVel, 0, 0, DustID.RainbowMk2, dustVel.X * 1f, dustVel.Y * 1f, 100, color, 1f);
|
||||
dusty.noGravity = true;
|
||||
dusty.noLight = true;
|
||||
dusty.velocity = dustVel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3958,8 +3956,7 @@ namespace CalamityMod.CalPlayer
|
||||
int numDust = 2;
|
||||
for (int i = 0; i < numDust; i++)
|
||||
{
|
||||
int dustIndex = Dust.NewDust(Player.position, Player.width, Player.height, DustID.VilePowder, 0f, 0f);
|
||||
Dust dust = Main.dust[dustIndex];
|
||||
Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.VilePowder, 0f, 0f);
|
||||
dust.position.X += Main.rand.Next(-5, 6);
|
||||
dust.position.Y += Main.rand.Next(-5, 6);
|
||||
dust.velocity *= 0.2f;
|
||||
|
||||
@@ -1105,11 +1105,9 @@ namespace CalamityMod.CalPlayer
|
||||
SoundEngine.PlaySound(SoundID.Item14, proj.Center);
|
||||
for (int dustexplode = 0; dustexplode < 180; dustexplode++)
|
||||
{
|
||||
Vector2 dustd = new Vector2(17f, 17f).RotatedBy(MathHelper.ToRadians(dustexplode * 2));
|
||||
int d = Dust.NewDust(proj.Center, proj.width, proj.height, Main.rand.NextBool() ? DustType<AstralBlue>() : DustType<AstralOrange>(), dustd.X, dustd.Y, 100, default, 1f);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].position = proj.Center;
|
||||
Main.dust[d].velocity *= 0.1f;
|
||||
Vector2 dustd = Vector2.One.RotatedBy(MathHelper.ToRadians(dustexplode * 2)) * 1.7f;
|
||||
Dust dust = Dust.NewDustPerfect(proj.Center, Main.rand.NextBool() ? DustType<AstralBlue>() : DustType<AstralOrange>(), dustd, Alpha: 100);
|
||||
dust.noGravity = true;
|
||||
}
|
||||
titanCooldown = 15;
|
||||
}
|
||||
|
||||
@@ -27,11 +27,11 @@ namespace CalamityMod.Cooldowns
|
||||
{
|
||||
for (int i = 0; i < 66; i++)
|
||||
{
|
||||
int d = Dust.NewDust(instance.player.position, instance.player.width, instance.player.height, DustID.PurificationPowder, 0, 0, 100, Color.Transparent, 2.6f);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].noLight = true;
|
||||
Main.dust[d].fadeIn = 1f;
|
||||
Main.dust[d].velocity *= 6.6f;
|
||||
Dust dust = Dust.NewDustDirect(instance.player.position, instance.player.width, instance.player.height, DustID.PurificationPowder, 0, 0, 100, Color.Transparent, 2.6f);
|
||||
dust.noGravity = true;
|
||||
dust.noLight = true;
|
||||
dust.fadeIn = 1f;
|
||||
dust.velocity *= 6.6f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ namespace CalamityMod.Cooldowns
|
||||
int h = instance.player.height;
|
||||
for (int i = 0; i < 66; i++)
|
||||
{
|
||||
int d = Dust.NewDust(pos, w, h, DustID.GemEmerald, 0, 0, 100, default, 1.5f);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].velocity *= 6.6f;
|
||||
Dust dust = Dust.NewDustDirect(pos, w, h, DustID.GemEmerald, 0, 0, 100, default, 1.5f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 6.6f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user