Clean up all projectile code.
This commit is contained in:
@@ -25,9 +25,8 @@ public class DemonArrow : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj = Main.dust[dust];
|
||||
obj.velocity /= 2f;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>());
|
||||
Main.dust[dust].velocity /= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +34,7 @@ public class DemonArrow : ModProjectile
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f);
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f);
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item2, Projectile.position);
|
||||
}
|
||||
|
||||
@@ -25,9 +25,8 @@ public class GoldenSpiritArrow : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj = Main.dust[dust];
|
||||
obj.velocity /= 2f;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>());
|
||||
Main.dust[dust].velocity /= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +34,7 @@ public class GoldenSpiritArrow : ModProjectile
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f);
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f);
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item1, Projectile.position);
|
||||
}
|
||||
|
||||
@@ -24,10 +24,9 @@ public class LegendaryArrow : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.LegendaryDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.LegendarySparkle>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj = Main.dust[dust];
|
||||
obj.velocity /= 2f;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.LegendaryDust>());
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.LegendarySparkle>());
|
||||
Main.dust[dust].velocity /= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,8 +34,8 @@ public class LegendaryArrow : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(1))
|
||||
{
|
||||
target.AddBuff(69, 900, false);
|
||||
target.AddBuff(70, 900, false);
|
||||
target.AddBuff(BuffID.Ichor, 900, false);
|
||||
target.AddBuff(BuffID.Venom, 900, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,11 +43,11 @@ public class LegendaryArrow : ModProjectile
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.LegendaryDust>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f);
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.LegendaryDust>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f);
|
||||
}
|
||||
for (int j = 0; j < 5; j++)
|
||||
{
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.LegendarySparkle>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f);
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.LegendarySparkle>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f);
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item1, Projectile.position);
|
||||
}
|
||||
|
||||
@@ -25,20 +25,19 @@ public class RainbowArrow : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
@@ -47,8 +46,8 @@ public class RainbowArrow : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(1))
|
||||
{
|
||||
target.AddBuff(69, 900, false);
|
||||
target.AddBuff(70, 900, false);
|
||||
target.AddBuff(BuffID.Ichor, 900, false);
|
||||
target.AddBuff(BuffID.Venom, 900, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,20 +57,19 @@ public class RainbowArrow : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,9 +25,8 @@ public class StormArrow : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj = Main.dust[dust];
|
||||
obj.velocity /= 2f;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust2>());
|
||||
Main.dust[dust].velocity /= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +34,7 @@ public class StormArrow : ModProjectile
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust2>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f);
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust2>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f);
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item1, Projectile.position);
|
||||
}
|
||||
|
||||
@@ -8,10 +8,6 @@ namespace FabusMod.Projectiles.Daggers;
|
||||
|
||||
public class ColorfulSolution : ModProjectile
|
||||
{
|
||||
private const float maxTicks = 70f;
|
||||
|
||||
private const int alphaReducation = 25;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Colorful Solution");
|
||||
@@ -45,7 +41,7 @@ public class ColorfulSolution : ModProjectile
|
||||
int item = 0;
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
|
||||
{
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.KillProjectile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,20 +49,19 @@ public class ColorfulSolution : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
@@ -75,7 +70,7 @@ public class ColorfulSolution : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(1))
|
||||
{
|
||||
target.AddBuff(70, 720, false);
|
||||
target.AddBuff(BuffID.Venom, 720, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,11 +28,10 @@ public class BlueBolt : ModProjectile
|
||||
Projectile.velocity.Y += Projectile.ai[0];
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDustBlue>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.5f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDustBlue>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.5f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,11 +41,10 @@ public class BlueBolt : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDustBlue>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.5f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDustBlue>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.5f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,15 +28,14 @@ public class BlueBoltRMB : ModProjectile
|
||||
Projectile.velocity.Y += Projectile.ai[0];
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDustBlue>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxWitherDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDustBlue>());
|
||||
Main.dust[dust1].scale = 1f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.5f;
|
||||
Main.dust[dust1].velocity *= 0.5f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxWitherDust>());
|
||||
Main.dust[dust2].scale = 0.8f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.5f;
|
||||
Main.dust[dust2].velocity *= 0.5f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
}
|
||||
}
|
||||
@@ -47,15 +46,14 @@ public class BlueBoltRMB : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDustBlue>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxWitherDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDustBlue>());
|
||||
Main.dust[dust1].scale = 1f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.5f;
|
||||
Main.dust[dust1].velocity *= 0.5f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxWitherDust>());
|
||||
Main.dust[dust2].scale = 0.8f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.5f;
|
||||
Main.dust[dust2].velocity *= 0.5f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,11 +28,10 @@ public class OrangeBolt : ModProjectile
|
||||
Projectile.velocity.Y += Projectile.ai[0];
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.5f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDust>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.5f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,11 +41,10 @@ public class OrangeBolt : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.5f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDust>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.5f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,15 +28,14 @@ public class OrangeBoltRMB : ModProjectile
|
||||
Projectile.velocity.Y += Projectile.ai[0];
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxWitherDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDust>());
|
||||
Main.dust[dust1].scale = 1f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.5f;
|
||||
Main.dust[dust1].velocity *= 0.5f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxWitherDust>());
|
||||
Main.dust[dust2].scale = 0.8f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.5f;
|
||||
Main.dust[dust2].velocity *= 0.5f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
}
|
||||
}
|
||||
@@ -47,15 +46,14 @@ public class OrangeBoltRMB : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxWitherDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDust>());
|
||||
Main.dust[dust1].scale = 1f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.5f;
|
||||
Main.dust[dust1].velocity *= 0.5f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxWitherDust>());
|
||||
Main.dust[dust2].scale = 0.8f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.5f;
|
||||
Main.dust[dust2].velocity *= 0.5f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,20 +28,19 @@ public class RainbowBolt : ModProjectile
|
||||
Projectile.velocity.Y += Projectile.ai[0];
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
@@ -52,20 +51,19 @@ public class RainbowBolt : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,25 +28,24 @@ public class RainbowBoltRMB : ModProjectile
|
||||
Projectile.velocity.Y += Projectile.ai[0];
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SpectralWitherDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
|
||||
int dust4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SpectralWitherDust>());
|
||||
Main.dust[dust4].scale = 0.7f;
|
||||
Dust obj4 = Main.dust[dust4];
|
||||
obj4.velocity *= 0.1f;
|
||||
Main.dust[dust4].velocity *= 0.1f;
|
||||
Main.dust[dust4].noGravity = true;
|
||||
}
|
||||
}
|
||||
@@ -57,25 +56,24 @@ public class RainbowBoltRMB : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SpectralWitherDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
|
||||
int dust4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SpectralWitherDust>());
|
||||
Main.dust[dust4].scale = 0.7f;
|
||||
Dust obj4 = Main.dust[dust4];
|
||||
obj4.velocity *= 0.1f;
|
||||
Main.dust[dust4].velocity *= 0.1f;
|
||||
Main.dust[dust4].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,7 @@ public class GoldenOrb : ModProjectile
|
||||
{
|
||||
if (Projectile.alpha > 70)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.alpha -= 15;
|
||||
Projectile.alpha -= 15;
|
||||
if (Projectile.alpha < 70)
|
||||
{
|
||||
Projectile.alpha = 70;
|
||||
@@ -47,7 +46,7 @@ public class GoldenOrb : ModProjectile
|
||||
{
|
||||
if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].lifeMax > 5)
|
||||
{
|
||||
Vector2 newMove = ((Entity)Main.npc[i]).Center - Projectile.Center;
|
||||
Vector2 newMove = Main.npc[i].Center - Projectile.Center;
|
||||
float distanceTo = (float)Math.Sqrt(newMove.X * newMove.X + newMove.Y * newMove.Y);
|
||||
if (distanceTo < distance)
|
||||
{
|
||||
@@ -65,11 +64,10 @@ public class GoldenOrb : ModProjectile
|
||||
}
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
AnimateProjectile();
|
||||
}
|
||||
@@ -85,14 +83,11 @@ public class GoldenOrb : ModProjectile
|
||||
|
||||
public void AnimateProjectile()
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.frameCounter++;
|
||||
Projectile.frameCounter++;
|
||||
if (Projectile.frameCounter >= 5)
|
||||
{
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.frame++;
|
||||
Projectile projectile3 = Projectile;
|
||||
projectile3.frame %= 3;
|
||||
Projectile.frame++;
|
||||
Projectile.frame %= 3;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,14 +55,11 @@ public class IllusoryMirrorRMB : ModProjectile
|
||||
|
||||
public void AnimateProjectile()
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.frameCounter++;
|
||||
Projectile.frameCounter++;
|
||||
if (Projectile.frameCounter >= 7)
|
||||
{
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.frame++;
|
||||
Projectile projectile3 = Projectile;
|
||||
projectile3.frame %= 5;
|
||||
Projectile.frame++;
|
||||
Projectile.frame %= 5;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,25 +31,25 @@ public class SpectralIllusionRMB : ModProjectile
|
||||
AnimateProjectile();
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowHealingDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowHealingDust>());
|
||||
Main.dust[dust1].scale = 2f;
|
||||
Main.dust[dust1].velocity.Y -= 0.5f;
|
||||
Main.dust[dust1].velocity.X = 0f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust2].scale = 2f;
|
||||
Main.dust[dust2].velocity.Y += 0.5f;
|
||||
Main.dust[dust2].velocity.X = 0f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust3].scale = 2f;
|
||||
Main.dust[dust3].velocity.Y += 0.5f;
|
||||
Main.dust[dust3].velocity.X = 0f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
|
||||
int dust4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust4].scale = 2f;
|
||||
Main.dust[dust4].velocity.Y += 0.5f;
|
||||
Main.dust[dust4].velocity.X = 0f;
|
||||
@@ -67,14 +67,11 @@ public class SpectralIllusionRMB : ModProjectile
|
||||
|
||||
public void AnimateProjectile()
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.frameCounter++;
|
||||
Projectile.frameCounter++;
|
||||
if (Projectile.frameCounter >= 8)
|
||||
{
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.frame++;
|
||||
Projectile projectile3 = Projectile;
|
||||
projectile3.frame %= 7;
|
||||
Projectile.frame++;
|
||||
Projectile.frame %= 7;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,8 +54,7 @@ public class CoalescenceBeam : ModProjectile
|
||||
{
|
||||
if (Charge == MAX_CHARGE)
|
||||
{
|
||||
Vector2 unit = Projectile.velocity;
|
||||
DrawLaser(TextureAssets.Projectile[Projectile.type].Value, Main.player[Projectile.owner].Center, unit, 10f, Projectile.damage, -1.57f, 1f, 1000f, Color.White, 60);
|
||||
DrawLaser(TextureAssets.Projectile[Projectile.type].Value, Main.player[Projectile.owner].Center, Projectile.velocity, 10f, Projectile.damage, -1.57f, 1f, 1000f, Color.White, 60);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -65,9 +64,8 @@ public class CoalescenceBeam : ModProjectile
|
||||
float r = Utils.ToRotation(unit) + rotation;
|
||||
for (float i = transDist; i <= Distance; i += step)
|
||||
{
|
||||
Color c = Color.White;
|
||||
Vector2 origin = start + i * unit;
|
||||
Main.EntitySpriteDraw(texture, origin - Main.screenPosition, new Rectangle(0, 26, 28, 26), (i < transDist) ? Color.Transparent : c, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(texture, origin - Main.screenPosition, new Rectangle(0, 26, 28, 26), (i < transDist) ? Color.Transparent : color, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
}
|
||||
Main.EntitySpriteDraw(texture, start + unit * (transDist - step) - Main.screenPosition, new Rectangle(0, 0, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(texture, start + (Distance + step) * unit - Main.screenPosition, new Rectangle(0, 52, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
@@ -77,10 +75,9 @@ public class CoalescenceBeam : ModProjectile
|
||||
{
|
||||
if (Charge == MAX_CHARGE)
|
||||
{
|
||||
Player p = Main.player[Projectile.owner];
|
||||
Vector2 unit = Projectile.velocity;
|
||||
Player player = Main.player[Projectile.owner];
|
||||
float point = 0f;
|
||||
if (Collision.CheckAABBvLineCollision(Utils.TopLeft(targetHitbox), Utils.Size(targetHitbox), p.Center, p.Center + unit * Distance, 22f, ref point))
|
||||
if (Collision.CheckAABBvLineCollision(Utils.TopLeft(targetHitbox), Utils.Size(targetHitbox), player.Center, player.Center + Projectile.velocity * Distance, 22f, ref point))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -99,48 +96,44 @@ public class CoalescenceBeam : ModProjectile
|
||||
Player player = Main.player[Projectile.owner];
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Vector2 diff = mousePos - player.Center;
|
||||
diff.Normalize();
|
||||
Projectile.velocity = diff;
|
||||
Projectile.direction = ((Main.MouseWorld.X > player.position.X) ? 1 : (-1));
|
||||
Projectile.velocity = mousePos - player.Center;
|
||||
Projectile.velocity.Normalize();
|
||||
Projectile.direction = (Main.MouseWorld.X > player.position.X) ? 1 : (-1);
|
||||
Projectile.netUpdate = true;
|
||||
}
|
||||
Projectile.position = player.Center + Projectile.velocity * MOVE_DISTANCE;
|
||||
Projectile.timeLeft = 2;
|
||||
int dir = Projectile.direction;
|
||||
player.ChangeDir(dir);
|
||||
player.ChangeDir(Projectile.direction);
|
||||
player.heldProj = Projectile.whoAmI;
|
||||
player.itemTime = 2;
|
||||
player.itemAnimation = 2;
|
||||
player.itemRotation = (float)Math.Atan2(Projectile.velocity.Y * dir, Projectile.velocity.X * dir);
|
||||
player.itemRotation = (float)Math.Atan2(Projectile.velocity.Y * Projectile.direction, Projectile.velocity.X * Projectile.direction);
|
||||
if (!player.channel)
|
||||
{
|
||||
Projectile.Kill();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Main.time % 10.0 < 1.0 && !player.CheckMana(player.inventory[player.selectedItem].mana, true, false))
|
||||
if (Main.time % 10.0 < 1.0 && !player.CheckMana(player.inventory[player.selectedItem].mana, true))
|
||||
{
|
||||
Projectile.Kill();
|
||||
}
|
||||
Vector2 offset = Projectile.velocity;
|
||||
offset *= 40f;
|
||||
Vector2 offset = Projectile.velocity * 40f;
|
||||
Vector2 pos = player.Center + offset - new Vector2(10f, 10f);
|
||||
if (Charge < MAX_CHARGE)
|
||||
{
|
||||
Charge++;
|
||||
}
|
||||
int chargeFact = (int)(Charge / 20f);
|
||||
Vector2 dustVelocity = Vector2.UnitX * 18f;
|
||||
dustVelocity = Utils.RotatedBy(dustVelocity, (double)(Projectile.rotation - 1.57f), default);
|
||||
Vector2 dustVelocity = Utils.RotatedBy(Vector2.UnitX * 18f, (double)(Projectile.rotation - 1.57f));
|
||||
Vector2 spawnPos = Projectile.Center + dustVelocity;
|
||||
for (int j = 0; j < chargeFact + 1; j++)
|
||||
{
|
||||
Vector2 spawn = spawnPos + Utils.ToRotationVector2((float)Main.rand.NextDouble() * 6.28f) * (12f - chargeFact * 2);
|
||||
Dust obj = Main.dust[Dust.NewDust(pos, 20, 20, DustID.YellowTorch, Projectile.velocity.X / 2f, Projectile.velocity.Y / 2f, 0, default, 1f)];
|
||||
obj.velocity = Vector2.Normalize(spawnPos - spawn) * 1.5f * (10f - chargeFact * 2f) / 10f;
|
||||
obj.noGravity = true;
|
||||
obj.scale = Main.rand.Next(10, 20) * 0.05f;
|
||||
int dust = Dust.NewDust(pos, 20, 20, DustID.YellowTorch, Projectile.velocity.X / 2f, Projectile.velocity.Y / 2f);
|
||||
Main.dust[dust].velocity = Vector2.Normalize(spawnPos - spawn) * 1.5f * (10f - chargeFact * 2f) / 10f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].scale = Main.rand.Next(10, 20) * 0.05f;
|
||||
}
|
||||
}
|
||||
if (Charge < MAX_CHARGE)
|
||||
@@ -167,9 +160,9 @@ public class CoalescenceBeam : ModProjectile
|
||||
{
|
||||
float num1 = Utils.ToRotation(Projectile.velocity) + ((Main.rand.NextBool(2)) ? (-1f) : 1f) * 1.57f;
|
||||
float num2 = (float)(Main.rand.NextDouble() * 0.800000011920929 + 1.0);
|
||||
//new Vector2((float)Math.Cos(num1) * num2, (float)Math.Sin(num1) * num2);
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.TerraDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxWitherDust>(), 0f, 0f, 0, default, 1f);
|
||||
new Vector2((float)Math.Cos(num1) * num2, (float)Math.Sin(num1) * num2);
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.TerraDust2>());
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxWitherDust>());
|
||||
}
|
||||
DelegateMethods.v3_1 = new Vector3(0.8f, 0.8f, 1f);
|
||||
Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * (Distance - MOVE_DISTANCE), 26f, new Utils.TileActionAttempt(DelegateMethods.CastLight));
|
||||
@@ -182,8 +175,7 @@ public class CoalescenceBeam : ModProjectile
|
||||
|
||||
public override void CutTiles()
|
||||
{
|
||||
DelegateMethods.tilecut_0 = (TileCuttingContext)2;
|
||||
Vector2 unit = Projectile.velocity;
|
||||
Utils.PlotTileLine(Projectile.Center, Projectile.Center + unit * Distance, (Projectile.width + 16) * Projectile.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles));
|
||||
DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile;
|
||||
Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * Distance, (Projectile.width + 16) * Projectile.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,8 +54,7 @@ public class GoldenBeam : ModProjectile
|
||||
{
|
||||
if (Charge == MAX_CHARGE)
|
||||
{
|
||||
Vector2 unit = Projectile.velocity;
|
||||
DrawLaser(TextureAssets.Projectile[Projectile.type].Value, Main.player[Projectile.owner].Center, unit, 10f, Projectile.damage, -1.57f, 1f, 1000f, Color.White, 60);
|
||||
DrawLaser(TextureAssets.Projectile[Projectile.type].Value, Main.player[Projectile.owner].Center, Projectile.velocity, 10f, Projectile.damage, -1.57f, 1f, 1000f, Color.White, 60);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -65,9 +64,8 @@ public class GoldenBeam : ModProjectile
|
||||
float r = Utils.ToRotation(unit) + rotation;
|
||||
for (float i = transDist; i <= Distance; i += step)
|
||||
{
|
||||
Color c = Color.White;
|
||||
Vector2 origin = start + i * unit;
|
||||
Main.EntitySpriteDraw(texture, origin - Main.screenPosition, (Rectangle?)new Rectangle(0, 26, 28, 26), (i < transDist) ? Color.Transparent : c, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(texture, origin - Main.screenPosition, (Rectangle?)new Rectangle(0, 26, 28, 26), (i < transDist) ? Color.Transparent : color, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
}
|
||||
Main.EntitySpriteDraw(texture, start + unit * (transDist - step) - Main.screenPosition, (Rectangle?)new Rectangle(0, 0, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(texture, start + (Distance + step) * unit - Main.screenPosition, (Rectangle?)new Rectangle(0, 52, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
@@ -77,10 +75,9 @@ public class GoldenBeam : ModProjectile
|
||||
{
|
||||
if (Charge == 50f)
|
||||
{
|
||||
Player p = Main.player[Projectile.owner];
|
||||
Vector2 unit = Projectile.velocity;
|
||||
Player player = Main.player[Projectile.owner];
|
||||
float point = 0f;
|
||||
if (Collision.CheckAABBvLineCollision(Utils.TopLeft(targetHitbox), Utils.Size(targetHitbox), p.Center, p.Center + unit * Distance, 22f, ref point))
|
||||
if (Collision.CheckAABBvLineCollision(Utils.TopLeft(targetHitbox), Utils.Size(targetHitbox), player.Center, player.Center + Projectile.velocity * Distance, 22f, ref point))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -139,7 +136,7 @@ public class GoldenBeam : ModProjectile
|
||||
for (int j = 0; j < chargeFact + 1; j++)
|
||||
{
|
||||
Vector2 spawn = spawnPos + Utils.ToRotationVector2((float)Main.rand.NextDouble() * 6.28f) * (12f - chargeFact * 2);
|
||||
Dust obj = Main.dust[Dust.NewDust(pos, 20, 20, DustID.YellowTorch, Projectile.velocity.X / 2f, Projectile.velocity.Y / 2f, 0, default, 1f)];
|
||||
Dust obj = Main.dust[Dust.NewDust(pos, 20, 20, DustID.YellowTorch, Projectile.velocity.X / 2f, Projectile.velocity.Y / 2f)];
|
||||
obj.velocity = Vector2.Normalize(spawnPos - spawn) * 1.5f * (10f - chargeFact * 2f) / 10f;
|
||||
obj.noGravity = true;
|
||||
obj.scale = Main.rand.Next(10, 20) * 0.05f;
|
||||
@@ -149,11 +146,9 @@ public class GoldenBeam : ModProjectile
|
||||
{
|
||||
return;
|
||||
}
|
||||
Vector2 start = player.Center;
|
||||
_ = Projectile.velocity * -1f;
|
||||
for (Distance = MOVE_DISTANCE; Distance <= 2200f; Distance += 5f)
|
||||
{
|
||||
start = player.Center + Projectile.velocity * Distance;
|
||||
Vector2 start = player.Center + Projectile.velocity * Distance;
|
||||
if (!Collision.CanHit(player.Center, 1, 1, start, 1, 1))
|
||||
{
|
||||
Distance -= 5f;
|
||||
@@ -167,9 +162,6 @@ public class GoldenBeam : ModProjectile
|
||||
}
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
float num1 = Utils.ToRotation(Projectile.velocity) + ((Main.rand.NextBool(2)) ? (-1f) : 1f) * 1.57f;
|
||||
float num2 = (float)(Main.rand.NextDouble() * 0.800000011920929 + 1.0);
|
||||
new Vector2((float)Math.Cos(num1) * num2, (float)Math.Sin(num1) * num2);
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
|
||||
}
|
||||
DelegateMethods.v3_1 = new Vector3(0.8f, 0.8f, 1f);
|
||||
@@ -183,8 +175,7 @@ public class GoldenBeam : ModProjectile
|
||||
|
||||
public override void CutTiles()
|
||||
{
|
||||
DelegateMethods.tilecut_0 = (TileCuttingContext)2;
|
||||
Vector2 unit = Projectile.velocity;
|
||||
Utils.PlotTileLine(Projectile.Center, Projectile.Center + unit * Distance, (Projectile.width + 16) * Projectile.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles));
|
||||
DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile;
|
||||
Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * Distance, (Projectile.width + 16) * Projectile.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,8 +54,7 @@ public class HellfireBeamProj : ModProjectile
|
||||
{
|
||||
if (Charge == MAX_CHARGE)
|
||||
{
|
||||
Vector2 unit = Projectile.velocity;
|
||||
DrawLaser(TextureAssets.Projectile[Projectile.type].Value, Main.player[Projectile.owner].Center, unit, 10f, Projectile.damage, -1.57f, 1f, 1000f, Color.White, 60);
|
||||
DrawLaser(TextureAssets.Projectile[Projectile.type].Value, Main.player[Projectile.owner].Center, Projectile.velocity, 10f, Projectile.damage, -1.57f, 1f, 1000f, Color.White, 60);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -65,9 +64,8 @@ public class HellfireBeamProj : ModProjectile
|
||||
float r = Utils.ToRotation(unit) + rotation;
|
||||
for (float i = transDist; i <= Distance; i += step)
|
||||
{
|
||||
Color c = Color.White;
|
||||
Vector2 origin = start + i * unit;
|
||||
Main.EntitySpriteDraw(texture, origin - Main.screenPosition, (Rectangle?)new Rectangle(0, 26, 28, 26), (i < transDist) ? Color.Transparent : c, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(texture, origin - Main.screenPosition, (Rectangle?)new Rectangle(0, 26, 28, 26), (i < transDist) ? Color.Transparent : color, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
}
|
||||
Main.EntitySpriteDraw(texture, start + unit * (transDist - step) - Main.screenPosition, (Rectangle?)new Rectangle(0, 0, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(texture, start + (Distance + step) * unit - Main.screenPosition, (Rectangle?)new Rectangle(0, 52, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
@@ -77,10 +75,9 @@ public class HellfireBeamProj : ModProjectile
|
||||
{
|
||||
if (Charge == MAX_CHARGE)
|
||||
{
|
||||
Player p = Main.player[Projectile.owner];
|
||||
Vector2 unit = Projectile.velocity;
|
||||
Player player = Main.player[Projectile.owner];
|
||||
float point = 0f;
|
||||
if (Collision.CheckAABBvLineCollision(Utils.TopLeft(targetHitbox), Utils.Size(targetHitbox), p.Center, p.Center + unit * Distance, 22f, ref point))
|
||||
if (Collision.CheckAABBvLineCollision(Utils.TopLeft(targetHitbox), Utils.Size(targetHitbox), player.Center, player.Center + Projectile.velocity * Distance, 22f, ref point))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -100,9 +97,8 @@ public class HellfireBeamProj : ModProjectile
|
||||
Player player = Main.player[Projectile.owner];
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Vector2 diff = mousePos - player.Center;
|
||||
diff.Normalize();
|
||||
Projectile.velocity = diff;
|
||||
Projectile.velocity = mousePos - player.Center;
|
||||
Projectile.velocity.Normalize();s
|
||||
Projectile.direction = (Main.MouseWorld.X > player.position.X) ? 1 : (-1);
|
||||
Projectile.netUpdate = true;
|
||||
}
|
||||
@@ -124,8 +120,7 @@ public class HellfireBeamProj : ModProjectile
|
||||
{
|
||||
Projectile.Kill();
|
||||
}
|
||||
Vector2 offset = Projectile.velocity;
|
||||
offset *= 40f;
|
||||
Vector2 offset = Projectile.velocity * 40f;
|
||||
Vector2 pos = player.Center + offset - new Vector2(10f, 10f);
|
||||
if (Charge < MAX_CHARGE)
|
||||
{
|
||||
@@ -138,7 +133,7 @@ public class HellfireBeamProj : ModProjectile
|
||||
for (int j = 0; j < chargeFact + 1; j++)
|
||||
{
|
||||
Vector2 spawn = spawnPos + Utils.ToRotationVector2((float)Main.rand.NextDouble() * 6.28f) * (12f - chargeFact * 2);
|
||||
Dust obj = Main.dust[Dust.NewDust(pos, 20, 20, DustID.YellowTorch, Projectile.velocity.X / 2f, Projectile.velocity.Y / 2f, 0, default, 1f)];
|
||||
Dust obj = Main.dust[Dust.NewDust(pos, 20, 20, DustID.YellowTorch, Projectile.velocity.X / 2f, Projectile.velocity.Y / 2f)];
|
||||
obj.velocity = Vector2.Normalize(spawnPos - spawn) * 1.5f * (10f - chargeFact * 2f) / 10f;
|
||||
obj.noGravity = true;
|
||||
obj.scale = Main.rand.Next(10, 20) * 0.05f;
|
||||
@@ -149,7 +144,6 @@ public class HellfireBeamProj : ModProjectile
|
||||
return;
|
||||
}
|
||||
Vector2 start = player.Center;
|
||||
_ = Projectile.velocity * -1f;
|
||||
for (Distance = MOVE_DISTANCE; Distance <= 2200f; Distance += 5f)
|
||||
{
|
||||
start = player.Center + Projectile.velocity * Distance;
|
||||
@@ -166,11 +160,8 @@ public class HellfireBeamProj : ModProjectile
|
||||
}
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
float num1 = Utils.ToRotation(Projectile.velocity) + (Main.rand.NextBool(2) ? (-1f) : 1f) * 1.57f;
|
||||
float num2 = (float)(Main.rand.NextDouble() * 0.800000011920929 + 1.0);
|
||||
//new Vector2((float)Math.Cos(num1) * num2, (float)Math.Sin(num1) * num2);
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.BloodDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxWitherDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.BloodDust>());
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxWitherDust>());
|
||||
}
|
||||
DelegateMethods.v3_1 = new Vector3(0.8f, 0.8f, 1f);
|
||||
Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * (Distance - MOVE_DISTANCE), 26f, new Utils.TileActionAttempt(DelegateMethods.CastLight));
|
||||
@@ -183,8 +174,7 @@ public class HellfireBeamProj : ModProjectile
|
||||
|
||||
public override void CutTiles()
|
||||
{
|
||||
DelegateMethods.tilecut_0 = (TileCuttingContext)2;
|
||||
Vector2 unit = Projectile.velocity;
|
||||
Utils.PlotTileLine(Projectile.Center, Projectile.Center + unit * Distance, (Projectile.width + 16) * Projectile.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles));
|
||||
DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile;
|
||||
Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * Distance, (Projectile.width + 16) * Projectile.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,9 +65,8 @@ public class RainbowBeam : ModProjectile
|
||||
float r = Utils.ToRotation(unit) + rotation;
|
||||
for (float i = transDist; i <= Distance; i += step)
|
||||
{
|
||||
Color c = Color.White;
|
||||
Vector2 origin = start + i * unit;
|
||||
Main.EntitySpriteDraw(texture, origin - Main.screenPosition, new Rectangle(0, 26, 28, 26), (i < transDist) ? Color.Transparent : c, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(texture, origin - Main.screenPosition, new Rectangle(0, 26, 28, 26), (i < transDist) ? Color.Transparent : color, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
}
|
||||
Main.EntitySpriteDraw(texture, start + unit * (transDist - step) - Main.screenPosition, new Rectangle(0, 0, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(texture, start + (Distance + step) * unit - Main.screenPosition, new Rectangle(0, 52, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
@@ -101,9 +100,8 @@ public class RainbowBeam : ModProjectile
|
||||
Player player = Main.player[Projectile.owner];
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Vector2 diff = mousePos - player.Center;
|
||||
diff.Normalize();
|
||||
Projectile.velocity = diff;
|
||||
Projectile.velocity = mousePos - player.Center;
|
||||
Projectile.velocity.Normalize();
|
||||
Projectile.direction = ((Main.MouseWorld.X > player.position.X) ? 1 : (-1));
|
||||
Projectile.netUpdate = true;
|
||||
}
|
||||
@@ -139,7 +137,7 @@ public class RainbowBeam : ModProjectile
|
||||
for (int j = 0; j < chargeFact + 1; j++)
|
||||
{
|
||||
Vector2 spawn = spawnPos + Utils.ToRotationVector2((float)Main.rand.NextDouble() * 6.28f) * (12f - chargeFact * 2);
|
||||
Dust obj = Main.dust[Dust.NewDust(pos, 20, 20, DustID.YellowTorch, Projectile.velocity.X / 2f, Projectile.velocity.Y / 2f, 0, default, 1f)];
|
||||
Dust obj = Main.dust[Dust.NewDust(pos, 20, 20, DustID.YellowTorch, Projectile.velocity.X / 2f, Projectile.velocity.Y / 2f)];
|
||||
obj.velocity = Vector2.Normalize(spawnPos - spawn) * 1.5f * (10f - chargeFact * 2f) / 10f;
|
||||
obj.noGravity = true;
|
||||
obj.scale = Main.rand.Next(10, 20) * 0.05f;
|
||||
@@ -167,12 +165,9 @@ public class RainbowBeam : ModProjectile
|
||||
}
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
float num1 = Utils.ToRotation(Projectile.velocity) + ((Main.rand.NextBool(2)) ? (-1f) : 1f) * 1.57f;
|
||||
float num2 = (float)(Main.rand.NextDouble() * 0.800000011920929 + 1.0);
|
||||
//new Vector2((float)Math.Cos(num1) * num2, (float)Math.Sin(num1) * num2);
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
}
|
||||
DelegateMethods.v3_1 = new Vector3(0.8f, 0.8f, 1f);
|
||||
Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * (Distance - MOVE_DISTANCE), 26f, new Utils.TileActionAttempt(DelegateMethods.CastLight));
|
||||
@@ -185,8 +180,7 @@ public class RainbowBeam : ModProjectile
|
||||
|
||||
public override void CutTiles()
|
||||
{
|
||||
DelegateMethods.tilecut_0 = (TileCuttingContext)2;
|
||||
Vector2 unit = Projectile.velocity;
|
||||
Utils.PlotTileLine(Projectile.Center, Projectile.Center + unit * Distance, (Projectile.width + 16) * Projectile.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles));
|
||||
DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile;
|
||||
Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * Distance, (Projectile.width + 16) * Projectile.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,9 +66,8 @@ public class VengeanceBeam : ModProjectile
|
||||
float r = Utils.ToRotation(unit) + rotation;
|
||||
for (float i = transDist; i <= Distance; i += step)
|
||||
{
|
||||
Color c = Color.White;
|
||||
origin = start + i * unit;
|
||||
Main.EntitySpriteDraw(texture, origin - Main.screenPosition, new Rectangle(0, 26, 28, 26), (i < transDist) ? Color.Transparent : c, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(texture, origin - Main.screenPosition, new Rectangle(0, 26, 28, 26), (i < transDist) ? Color.Transparent : color, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
}
|
||||
Main.EntitySpriteDraw(texture, start + unit * (transDist - step) - Main.screenPosition, new Rectangle(0, 0, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(texture, start + (Distance + step) * unit - Main.screenPosition, new Rectangle(0, 52, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0);
|
||||
@@ -139,7 +138,7 @@ public class VengeanceBeam : ModProjectile
|
||||
for (int j = 0; j < chargeFact + 1; j++)
|
||||
{
|
||||
Vector2 spawn = spawnPos + Utils.ToRotationVector2((float)Main.rand.NextDouble() * 6.28f) * (12f - chargeFact * 2);
|
||||
Dust obj = Main.dust[Dust.NewDust(pos, 20, 20, DustID.YellowTorch, Projectile.velocity.X / 2f, Projectile.velocity.Y / 2f, 0, default, 1f)];
|
||||
Dust obj = Main.dust[Dust.NewDust(pos, 20, 20, DustID.YellowTorch, Projectile.velocity.X / 2f, Projectile.velocity.Y / 2f)];
|
||||
obj.velocity = Vector2.Normalize(spawnPos - spawn) * 1.5f * (10f - chargeFact * 2f) / 10f;
|
||||
obj.noGravity = true;
|
||||
obj.scale = Main.rand.Next(10, 20) * 0.05f;
|
||||
@@ -150,7 +149,6 @@ public class VengeanceBeam : ModProjectile
|
||||
return;
|
||||
}
|
||||
Vector2 start = player.Center;
|
||||
_ = Projectile.velocity * -1f;
|
||||
for (Distance = MOVE_DISTANCE; Distance <= 2200f; Distance += 5f)
|
||||
{
|
||||
start = player.Center + Projectile.velocity * Distance;
|
||||
@@ -167,11 +165,8 @@ public class VengeanceBeam : ModProjectile
|
||||
}
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
float num1 = Utils.ToRotation(Projectile.velocity) + ((Main.rand.NextBool(2)) ? (-1f) : 1f) * 1.57f;
|
||||
float num2 = (float)(Main.rand.NextDouble() * 0.800000011920929 + 1.0);
|
||||
new Vector2((float)Math.Cos(num1) * num2, (float)Math.Sin(num1) * num2);
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.HolyDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.HolyDust>());
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.FoxDust>());
|
||||
}
|
||||
DelegateMethods.v3_1 = new Vector3(0.8f, 0.8f, 1f);
|
||||
Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * (Distance - MOVE_DISTANCE), 26f, new Utils.TileActionAttempt(DelegateMethods.CastLight));
|
||||
@@ -184,8 +179,7 @@ public class VengeanceBeam : ModProjectile
|
||||
|
||||
public override void CutTiles()
|
||||
{
|
||||
DelegateMethods.tilecut_0 = (TileCuttingContext)2;
|
||||
Vector2 unit = Projectile.velocity;
|
||||
Utils.PlotTileLine(Projectile.Center, Projectile.Center + unit * Distance, (Projectile.width + 16) * Projectile.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles));
|
||||
DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile;
|
||||
Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * Distance, (Projectile.width + 16) * Projectile.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,11 +30,10 @@ public class GoldenLightBlast : ModProjectile
|
||||
Projectile.velocity.Y += Projectile.ai[0];
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,11 +41,10 @@ public class GoldenLightBlast : ModProjectile
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.DD2_BetsyFireballShot, Projectile.position);
|
||||
}
|
||||
|
||||
@@ -30,11 +30,10 @@ public class LightBlast : ModProjectile
|
||||
Projectile.velocity.Y += Projectile.ai[0];
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust2>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,11 +41,10 @@ public class LightBlast : ModProjectile
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust2>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.DD2_BetsyFireballShot, Projectile.position);
|
||||
}
|
||||
|
||||
@@ -29,20 +29,19 @@ public class RainbowLightBlast : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
@@ -53,20 +52,19 @@ public class RainbowLightBlast : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,9 +26,8 @@ public class LunarBolt : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.CrystalDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj = Main.dust[dust];
|
||||
obj.velocity /= 2f;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.CrystalDust2>());
|
||||
Main.dust[dust].velocity /= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +35,7 @@ public class LunarBolt : ModProjectile
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.CrystalDust2>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f);
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType<Dusts.CrystalDust2>(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f);
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item1, Projectile.position);
|
||||
}
|
||||
|
||||
@@ -46,9 +46,9 @@ public class GoddessMinion : Minion
|
||||
|
||||
public override void CheckActive()
|
||||
{
|
||||
Player obj = Main.player[Projectile.owner];
|
||||
FabuPlayer modPlayer = obj.GetModPlayer<FabuPlayer>();
|
||||
if (obj.dead)
|
||||
Player player = Main.player[Projectile.owner];
|
||||
FabuPlayer modPlayer = player.GetModPlayer<FabuPlayer>();
|
||||
if (player.dead)
|
||||
{
|
||||
modPlayer.goddessMinion = false;
|
||||
}
|
||||
@@ -60,14 +60,11 @@ public class GoddessMinion : Minion
|
||||
|
||||
public void AnimateProjectile()
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.frameCounter++;
|
||||
Projectile.frameCounter++;
|
||||
if (Projectile.frameCounter >= 2)
|
||||
{
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.frame++;
|
||||
Projectile projectile3 = Projectile;
|
||||
projectile3.frame %= 3;
|
||||
Projectile.frame++;
|
||||
Projectile.frame %= 3;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Pets;
|
||||
@@ -7,7 +8,7 @@ public class FoxPet : ModProjectile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.CloneDefaults(111);
|
||||
Projectile.CloneDefaults(ProjectileID.Bunny);
|
||||
AIType = 111;
|
||||
Main.projFrames[Projectile.type] = 8;
|
||||
Projectile.width = 70;
|
||||
@@ -28,9 +29,9 @@ public class FoxPet : ModProjectile
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Player obj = Main.player[Projectile.owner];
|
||||
FabuPlayer modPlayer = obj.GetModPlayer<FabuPlayer>();
|
||||
if (obj.dead)
|
||||
Player player = Main.player[Projectile.owner];
|
||||
FabuPlayer modPlayer = player.GetModPlayer<FabuPlayer>();
|
||||
if (player.dead)
|
||||
{
|
||||
modPlayer.foxPet = false;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Pets;
|
||||
@@ -14,9 +15,9 @@ public class MechanicalTooth : ModProjectile
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.CloneDefaults(ProjectileID.ZephyrFish);
|
||||
Projectile.width = 26;
|
||||
Projectile.height = 20;
|
||||
Projectile.CloneDefaults(380);
|
||||
AIType = 380;
|
||||
}
|
||||
|
||||
@@ -28,9 +29,9 @@ public class MechanicalTooth : ModProjectile
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Player obj = Main.player[Projectile.owner];
|
||||
FabuPlayer modPlayer = obj.GetModPlayer<FabuPlayer>();
|
||||
if (obj.dead)
|
||||
Player player = Main.player[Projectile.owner];
|
||||
FabuPlayer modPlayer = player.GetModPlayer<FabuPlayer>();
|
||||
if (player.dead)
|
||||
{
|
||||
modPlayer.kregPet = false;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Pets;
|
||||
@@ -7,7 +8,7 @@ public class PinkFoxPet : ModProjectile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.CloneDefaults(111);
|
||||
Projectile.CloneDefaults(ProjectileID.Bunny);
|
||||
AIType = 111;
|
||||
Main.projFrames[Projectile.type] = 8;
|
||||
Projectile.width = 70;
|
||||
@@ -28,9 +29,9 @@ public class PinkFoxPet : ModProjectile
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Player obj = Main.player[Projectile.owner];
|
||||
FabuPlayer modPlayer = obj.GetModPlayer<FabuPlayer>();
|
||||
if (obj.dead)
|
||||
Player player = Main.player[Projectile.owner];
|
||||
FabuPlayer modPlayer = player.GetModPlayer<FabuPlayer>();
|
||||
if (player.dead)
|
||||
{
|
||||
modPlayer.pinkFoxPet = false;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Projectiles.Pets;
|
||||
@@ -14,7 +15,7 @@ public class WindUpFabu : ModProjectile
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.CloneDefaults(112);
|
||||
Projectile.CloneDefaults(ProjectileID.Penguin);
|
||||
Projectile.width = 34;
|
||||
Projectile.height = 34;
|
||||
AIType = 112;
|
||||
@@ -28,9 +29,9 @@ public class WindUpFabu : ModProjectile
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Player obj = Main.player[Projectile.owner];
|
||||
FabuPlayer modPlayer = obj.GetModPlayer<FabuPlayer>();
|
||||
if (obj.dead)
|
||||
Player player = Main.player[Projectile.owner];
|
||||
FabuPlayer modPlayer = player.GetModPlayer<FabuPlayer>();
|
||||
if (player.dead)
|
||||
{
|
||||
modPlayer.fabu = false;
|
||||
}
|
||||
|
||||
@@ -27,30 +27,27 @@ public class RainbowAxeBeam : ModProjectile
|
||||
{
|
||||
if (Projectile.alpha <= 140)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.alpha++;
|
||||
Projectile.alpha++;
|
||||
}
|
||||
if (Projectile.alpha > 140)
|
||||
{
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.alpha += 15;
|
||||
Projectile.alpha += 15;
|
||||
}
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,8 +34,7 @@ public class RainbowBullet : ModProjectile
|
||||
{
|
||||
if (Projectile.alpha > 70)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.alpha -= 15;
|
||||
Projectile.alpha -= 15;
|
||||
if (Projectile.alpha < 70)
|
||||
{
|
||||
Projectile.alpha = 70;
|
||||
@@ -71,17 +70,16 @@ public class RainbowBullet : ModProjectile
|
||||
}
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0f;
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].velocity *= 0f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0f;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].velocity *= 0f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0f;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].velocity *= 0f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@ namespace FabusMod.Projectiles.RainbowDemon;
|
||||
|
||||
public class RainbowDemonArrow : ModProjectile
|
||||
{
|
||||
private const int alphaReducation = 25;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 18;
|
||||
@@ -28,8 +26,7 @@ public class RainbowDemonArrow : ModProjectile
|
||||
{
|
||||
if (Projectile.alpha > 30)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.alpha -= 15;
|
||||
Projectile.alpha -= 15;
|
||||
if (Projectile.alpha < 30)
|
||||
{
|
||||
Projectile.alpha = 30;
|
||||
@@ -37,20 +34,19 @@ public class RainbowDemonArrow : ModProjectile
|
||||
}
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
@@ -61,20 +57,19 @@ public class RainbowDemonArrow : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,7 @@ public class RainbowDemonClaymoreProj : ModProjectile
|
||||
{
|
||||
if (Projectile.alpha > 70)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.alpha -= 15;
|
||||
Projectile.alpha -= 15;
|
||||
if (Projectile.alpha < 70)
|
||||
{
|
||||
Projectile.alpha = 70;
|
||||
@@ -66,20 +65,19 @@ public class RainbowDemonClaymoreProj : ModProjectile
|
||||
}
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
AnimateProjectile();
|
||||
@@ -96,14 +94,11 @@ public class RainbowDemonClaymoreProj : ModProjectile
|
||||
|
||||
public void AnimateProjectile()
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.frameCounter++;
|
||||
Projectile.frameCounter++;
|
||||
if (Projectile.frameCounter >= 5)
|
||||
{
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.frame++;
|
||||
Projectile projectile3 = Projectile;
|
||||
projectile3.frame %= 3;
|
||||
Projectile.frame++;
|
||||
Projectile.frame %= 3;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,6 @@ namespace FabusMod.Projectiles.RainbowDemon;
|
||||
|
||||
public class RainbowDemonKnife : ModProjectile
|
||||
{
|
||||
private const int alphaReducation = 25;
|
||||
|
||||
private const float maxTicks = 70f;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 16;
|
||||
@@ -35,11 +31,10 @@ public class RainbowDemonKnife : ModProjectile
|
||||
{
|
||||
Vector2 position = Projectile.position;
|
||||
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
|
||||
_ = position + rotVector * 16f;
|
||||
int item = 0;
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
|
||||
{
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.KillProjectile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,8 +42,7 @@ public class RainbowDemonKnife : ModProjectile
|
||||
{
|
||||
if (Projectile.alpha > 30)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.alpha -= 15;
|
||||
Projectile.alpha -= 15;
|
||||
if (Projectile.alpha < 30)
|
||||
{
|
||||
Projectile.alpha = 30;
|
||||
@@ -56,20 +50,19 @@ public class RainbowDemonKnife : ModProjectile
|
||||
}
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
@@ -78,7 +71,7 @@ public class RainbowDemonKnife : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(1))
|
||||
{
|
||||
target.AddBuff(70, 720, false);
|
||||
target.AddBuff(BuffID.Venom, 720, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@ namespace FabusMod.Projectiles.RainbowDemon;
|
||||
|
||||
public class RainbowDemonMagicBall : ModProjectile
|
||||
{
|
||||
private const int alphaReducation = 25;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 10;
|
||||
@@ -27,28 +25,26 @@ public class RainbowDemonMagicBall : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.penetrate--;
|
||||
Projectile.penetrate--;
|
||||
if (Projectile.penetrate <= 0)
|
||||
{
|
||||
Projectile.Kill();
|
||||
@@ -64,8 +60,7 @@ public class RainbowDemonMagicBall : ModProjectile
|
||||
{
|
||||
Projectile.velocity.Y = 0f - oldVelocity.Y;
|
||||
}
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.velocity = projectile2.velocity * 0.75f;
|
||||
Projectile.velocity *= 0.75f;
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -9,8 +9,6 @@ public class RainbowDemonMelee : ModProjectile
|
||||
{
|
||||
private const float maxTicks = 300f;
|
||||
|
||||
private const int alphaReducation = 25;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 80;
|
||||
@@ -36,11 +34,10 @@ public class RainbowDemonMelee : ModProjectile
|
||||
{
|
||||
Vector2 position = Projectile.position;
|
||||
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
|
||||
_ = position + rotVector * 16f;
|
||||
int item = 0;
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
|
||||
{
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.KillProjectile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,8 +45,7 @@ public class RainbowDemonMelee : ModProjectile
|
||||
{
|
||||
if (Projectile.alpha > 30)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.alpha -= 15;
|
||||
Projectile.alpha -= 15;
|
||||
if (Projectile.alpha < 30)
|
||||
{
|
||||
Projectile.alpha = 30;
|
||||
@@ -70,20 +66,19 @@ public class RainbowDemonMelee : ModProjectile
|
||||
}
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,7 @@ public class RainbowDemonShredderProj : ModProjectile
|
||||
{
|
||||
if (Projectile.alpha > 30)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.alpha -= 15;
|
||||
Projectile.alpha -= 15;
|
||||
if (Projectile.alpha < 30)
|
||||
{
|
||||
Projectile.alpha = 30;
|
||||
@@ -33,20 +32,19 @@ public class RainbowDemonShredderProj : ModProjectile
|
||||
}
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
+12
-17
@@ -28,8 +28,7 @@ public class RainbowOrb : ModProjectile
|
||||
{
|
||||
if (Projectile.alpha > 70)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.alpha -= 15;
|
||||
Projectile.alpha -= 15;
|
||||
if (Projectile.alpha < 70)
|
||||
{
|
||||
Projectile.alpha = 70;
|
||||
@@ -65,20 +64,19 @@ public class RainbowOrb : ModProjectile
|
||||
}
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
AnimateProjectile();
|
||||
@@ -95,14 +93,11 @@ public class RainbowOrb : ModProjectile
|
||||
|
||||
public void AnimateProjectile()
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.frameCounter++;
|
||||
Projectile.frameCounter++;
|
||||
if (Projectile.frameCounter >= 5)
|
||||
{
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.frame++;
|
||||
Projectile projectile3 = Projectile;
|
||||
projectile3.frame %= 3;
|
||||
Projectile.frame++;
|
||||
Projectile.frame %= 3;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class BloodDrop : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(3)&& Projectile.alpha <= 100)
|
||||
{
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.BloodDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.BloodDust>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,11 +34,11 @@ public class DemonProjRMB : ModProjectile
|
||||
AnimateProjectile();
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.BloodDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num1].scale = 1.9f;
|
||||
Main.dust[num1].velocity.Y -= 1.5f;
|
||||
Main.dust[num1].velocity.X = 0f;
|
||||
Main.dust[num1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.BloodDust>());
|
||||
Main.dust[dust].scale = 1.9f;
|
||||
Main.dust[dust].velocity.Y -= 1.5f;
|
||||
Main.dust[dust].velocity.X = 0f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,14 +94,11 @@ public class DemonProjRMB : ModProjectile
|
||||
|
||||
public void AnimateProjectile()
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.frameCounter++;
|
||||
Projectile.frameCounter++;
|
||||
if (Projectile.frameCounter >= 3)
|
||||
{
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.frame++;
|
||||
Projectile projectile3 = Projectile;
|
||||
projectile3.frame %= 14;
|
||||
Projectile.frame++;
|
||||
Projectile.frame %= 14;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,15 +28,14 @@ public class DemonProjTwo : ModProjectile
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.OniDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.OniDust>());
|
||||
Main.dust[dust1].scale = 2f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.OniDust>(), 0f, 0f, 0, default, 1f);
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.OniDust>());
|
||||
Main.dust[dust2].scale = 2f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,26 +26,25 @@ public class DemonWave : ModProjectile
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj = Main.dust[num1];
|
||||
obj.velocity *= 0f;
|
||||
Main.dust[num1].noGravity = true;
|
||||
int num2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj2 = Main.dust[num2];
|
||||
obj2.velocity *= 0f;
|
||||
Main.dust[num2].noGravity = true;
|
||||
int num3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj3 = Main.dust[num3];
|
||||
obj3.velocity *= 0f;
|
||||
Main.dust[num3].noGravity = true;
|
||||
int num4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj4 = Main.dust[num4];
|
||||
obj4.velocity *= 0f;
|
||||
Main.dust[num4].noGravity = true;
|
||||
int num5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj5 = Main.dust[num5];
|
||||
obj5.velocity *= 0f;
|
||||
Main.dust[num5].noGravity = true;
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>());
|
||||
Main.dust[dust1].velocity *= 0f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>());
|
||||
Main.dust[dust2].velocity *= 0f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>());
|
||||
Main.dust[dust3].velocity *= 0f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
|
||||
int dust4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>());
|
||||
Main.dust[dust4].velocity *= 0f;
|
||||
Main.dust[dust4].noGravity = true;
|
||||
|
||||
int dust5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust3>());
|
||||
Main.dust[dust5].velocity *= 0f;
|
||||
Main.dust[dust5].noGravity = true;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
|
||||
@@ -26,7 +26,6 @@ public class DreamCatcherProjRMB : ModProjectile
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.extraUpdates = 0;
|
||||
Projectile projectile = Projectile;
|
||||
Projectile.velocity = Projectile.velocity * 0f;
|
||||
}
|
||||
|
||||
@@ -35,21 +34,23 @@ public class DreamCatcherProjRMB : ModProjectile
|
||||
AnimateProjectile();
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num1].scale = 1.9f;
|
||||
Main.dust[num1].velocity.Y -= 1.5f;
|
||||
Main.dust[num1].velocity.X = 0f;
|
||||
Main.dust[num1].noGravity = true;
|
||||
int num2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num2].scale = 1.9f;
|
||||
Main.dust[num2].velocity.Y -= 1.5f;
|
||||
Main.dust[num2].velocity.X = 0f;
|
||||
Main.dust[num2].noGravity = true;
|
||||
int num3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num3].scale = 1.9f;
|
||||
Main.dust[num3].velocity.Y -= 1.5f;
|
||||
Main.dust[num3].velocity.X = 0f;
|
||||
Main.dust[num3].noGravity = true;
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 1.9f;
|
||||
Main.dust[dust1].velocity.Y -= 1.5f;
|
||||
Main.dust[dust1].velocity.X = 0f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 1.9f;
|
||||
Main.dust[dust2].velocity.Y -= 1.5f;
|
||||
Main.dust[dust2].velocity.X = 0f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 1.9f;
|
||||
Main.dust[dust3].velocity.Y -= 1.5f;
|
||||
Main.dust[dust3].velocity.X = 0f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,14 +105,11 @@ public class DreamCatcherProjRMB : ModProjectile
|
||||
|
||||
public void AnimateProjectile()
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.frameCounter++;
|
||||
Projectile.frameCounter++;
|
||||
if (Projectile.frameCounter >= 3)
|
||||
{
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.frame++;
|
||||
Projectile projectile3 = Projectile;
|
||||
projectile3.frame %= 14;
|
||||
Projectile.frame++;
|
||||
Projectile.frame %= 14;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,35 +61,34 @@ public class DreamCatcherProjTwo : ModProjectile
|
||||
Projectile.velocity = (10f * Projectile.velocity + move) / 11f;
|
||||
AdjustMagnitude(ref Projectile.velocity);
|
||||
}
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 2f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust2].scale = 2f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust3].scale = 2f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
int dust4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
|
||||
int dust4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust4].scale = 2f;
|
||||
Dust obj4 = Main.dust[dust4];
|
||||
obj4.velocity *= 0.1f;
|
||||
Main.dust[dust4].velocity *= 0.1f;
|
||||
Main.dust[dust4].noGravity = true;
|
||||
int dust5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
|
||||
int dust5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust5].scale = 2f;
|
||||
Dust obj5 = Main.dust[dust5];
|
||||
obj5.velocity *= 0.1f;
|
||||
Main.dust[dust5].velocity *= 0.1f;
|
||||
Main.dust[dust5].noGravity = true;
|
||||
int dust6 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
|
||||
int dust6 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust6].scale = 2f;
|
||||
Dust obj6 = Main.dust[dust6];
|
||||
obj6.velocity *= 0.1f;
|
||||
Main.dust[dust6].velocity *= 0.1f;
|
||||
Main.dust[dust6].noGravity = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,29 +26,28 @@ public class DreamCatcherWave : ModProjectile
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj = Main.dust[num1];
|
||||
obj.velocity *= 0f;
|
||||
Main.dust[num1].noGravity = true;
|
||||
int num2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj2 = Main.dust[num2];
|
||||
obj2.velocity *= 0f;
|
||||
Main.dust[num2].noGravity = true;
|
||||
int num3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj3 = Main.dust[num3];
|
||||
obj3.velocity *= 0f;
|
||||
Main.dust[num3].noGravity = true;
|
||||
int num4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj4 = Main.dust[num4];
|
||||
obj4.velocity *= 0f;
|
||||
Main.dust[num4].noGravity = true;
|
||||
int num5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj5 = Main.dust[num5];
|
||||
obj5.velocity *= 0f;
|
||||
Main.dust[num5].noGravity = true;
|
||||
int num6 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj6 = Main.dust[num6];
|
||||
obj6.velocity *= 0f;
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].velocity *= 0f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust2].velocity *= 0f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust3].velocity *= 0f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
|
||||
int dust4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust4].velocity *= 0f;
|
||||
Main.dust[dust4].noGravity = true;
|
||||
|
||||
int dust5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust5].velocity *= 0f;
|
||||
Main.dust[dust5].noGravity = true;
|
||||
|
||||
int num6 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[num6].velocity *= 0f;
|
||||
Main.dust[num6].noGravity = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,11 +34,11 @@ public class GoldenFuryProjRMB : ModProjectile
|
||||
AnimateProjectile();
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num1].scale = 1.9f;
|
||||
Main.dust[num1].velocity.Y -= 1.5f;
|
||||
Main.dust[num1].velocity.X = 0f;
|
||||
Main.dust[num1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust].scale = 1.9f;
|
||||
Main.dust[dust].velocity.Y -= 1.5f;
|
||||
Main.dust[dust].velocity.X = 0f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,14 +93,11 @@ public class GoldenFuryProjRMB : ModProjectile
|
||||
|
||||
public void AnimateProjectile()
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.frameCounter++;
|
||||
Projectile.frameCounter++;
|
||||
if (Projectile.frameCounter >= 3)
|
||||
{
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.frame++;
|
||||
Projectile projectile3 = Projectile;
|
||||
projectile3.frame %= 14;
|
||||
Projectile.frame++;
|
||||
Projectile.frame %= 14;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,15 +28,14 @@ public class GoldenFuryProjTwo : ModProjectile
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>());
|
||||
Main.dust[dust1].scale = 2f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>());
|
||||
Main.dust[dust2].scale = 2f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,26 +26,25 @@ public class GoldenFuryWave : ModProjectile
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.GoldenDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj = Main.dust[num1];
|
||||
obj.velocity *= 0f;
|
||||
Main.dust[num1].noGravity = true;
|
||||
int num2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.GoldenDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj2 = Main.dust[num2];
|
||||
obj2.velocity *= 0f;
|
||||
Main.dust[num2].noGravity = true;
|
||||
int num3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.GoldenDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj3 = Main.dust[num3];
|
||||
obj3.velocity *= 0f;
|
||||
Main.dust[num3].noGravity = true;
|
||||
int num4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.GoldenDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj4 = Main.dust[num4];
|
||||
obj4.velocity *= 0f;
|
||||
Main.dust[num4].noGravity = true;
|
||||
int num5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.GoldenDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj5 = Main.dust[num5];
|
||||
obj5.velocity *= 0f;
|
||||
Main.dust[num5].noGravity = true;
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.GoldenDust>());
|
||||
Main.dust[dust1].velocity *= 0f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.GoldenDust>());
|
||||
Main.dust[dust2].velocity *= 0f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.GoldenDust>());
|
||||
Main.dust[dust3].velocity *= 0f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
|
||||
int dust4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.GoldenDust>());
|
||||
Main.dust[dust4].velocity *= 0f;
|
||||
Main.dust[dust4].noGravity = true;
|
||||
|
||||
int dust5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.GoldenDust>());
|
||||
Main.dust[dust5].velocity *= 0f;
|
||||
Main.dust[dust5].noGravity = true;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
|
||||
@@ -27,20 +27,19 @@ public class RainbowClump : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,11 +26,10 @@ public class ShimadaWave : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.5f)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 1.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust2>());
|
||||
Main.dust[dust].scale = 1.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,11 +26,10 @@ public class ShimadaWaveNihon : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.5f)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.OniDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 1.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.OniDust>());
|
||||
Main.dust[dust].scale = 1.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,11 +42,10 @@ public class CarbonKnife : ModProjectile
|
||||
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
|
||||
Vector2 position = Projectile.position;
|
||||
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
|
||||
_ = position + rotVector * 16f;
|
||||
int item = 0;
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
|
||||
{
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.KillProjectile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,11 +42,10 @@ public class CarbonKnifeNihon : ModProjectile
|
||||
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
|
||||
Vector2 position = Projectile.position;
|
||||
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
|
||||
_ = position + rotVector * 16f;
|
||||
int item = 0;
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
|
||||
{
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.KillProjectile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,11 +42,10 @@ public class DeathBlossom : ModProjectile
|
||||
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
|
||||
Vector2 position = Projectile.position;
|
||||
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
|
||||
_ = position + rotVector * 16f;
|
||||
int item = 0;
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
|
||||
{
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.KillProjectile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,10 +55,9 @@ public class FumaShuriken : ModProjectile
|
||||
}
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust>(), 0f, 0f, 0, default, 1f);
|
||||
Dust obj = Main.dust[num1];
|
||||
obj.velocity *= 0f;
|
||||
Main.dust[num1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust>());
|
||||
Main.dust[dust].velocity *= 0f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,11 +42,10 @@ public class GoldenKnife : ModProjectile
|
||||
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
|
||||
Vector2 position = Projectile.position;
|
||||
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
|
||||
_ = position + rotVector * 16f;
|
||||
int item = 0;
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
|
||||
{
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.KillProjectile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,11 +42,10 @@ public class RainbowKnife : ModProjectile
|
||||
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
|
||||
Vector2 position = Projectile.position;
|
||||
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
|
||||
_ = position + rotVector * 16f;
|
||||
int item = 0;
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
|
||||
{
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.KillProjectile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,11 +35,10 @@ public class CarbonShuriken : ModProjectile
|
||||
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
|
||||
Vector2 position = Projectile.position;
|
||||
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
|
||||
_ = position + rotVector * 16f;
|
||||
int item = 0;
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
|
||||
{
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.KillProjectile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,11 +46,10 @@ public class CarbonShuriken : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 1f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousDust>());
|
||||
Main.dust[dust].scale = 1f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class CarbonShurikenNihon : ModProjectile
|
||||
int item = 0;
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
|
||||
{
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.KillProjectile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,11 +47,10 @@ public class CarbonShurikenNihon : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.NightsAxeSparkle>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 1f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.NightsAxeSparkle>());
|
||||
Main.dust[dust].scale = 1f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,11 +40,10 @@ public class HerosShuriken : ModProjectile
|
||||
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
|
||||
Vector2 position = Projectile.position;
|
||||
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
|
||||
_ = position + rotVector * 16f;
|
||||
int item = 0;
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
|
||||
{
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.KillProjectile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,11 +51,10 @@ public class HerosShuriken : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 1f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RyuuDust>());
|
||||
Main.dust[dust].scale = 1f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,11 +35,10 @@ public class OniSlayer : ModProjectile
|
||||
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
|
||||
Vector2 position = Projectile.position;
|
||||
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
|
||||
_ = position + rotVector * 16f;
|
||||
int item = 0;
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
|
||||
{
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.KillProjectile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,11 +46,10 @@ public class OniSlayer : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.OniDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 1f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.OniDust>());
|
||||
Main.dust[dust].scale = 1f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,11 +35,10 @@ public class SparklingDemon : ModProjectile
|
||||
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
|
||||
Vector2 position = Projectile.position;
|
||||
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
|
||||
_ = position + rotVector * 16f;
|
||||
int item = 0;
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
|
||||
{
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.KillProjectile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,11 +46,10 @@ public class SparklingDemon : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 1f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>());
|
||||
Main.dust[dust].scale = 1f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class StonePlatedShurikenProj : ModProjectile
|
||||
int item = 0;
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
|
||||
{
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.KillProjectile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,11 +43,10 @@ public class StonePlatedShurikenProj : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(6))
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.Shuriken.StarDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 1f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = false;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.Shuriken.StarDust>());
|
||||
Main.dust[dust].scale = 1f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,18 +24,16 @@ public class GoldenStaffProj : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.penetrate--;
|
||||
Projectile.penetrate--;
|
||||
if (Projectile.penetrate <= 0)
|
||||
{
|
||||
Projectile.Kill();
|
||||
@@ -51,8 +49,7 @@ public class GoldenStaffProj : ModProjectile
|
||||
{
|
||||
Projectile.velocity.Y = 0f - oldVelocity.Y;
|
||||
}
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.velocity = projectile2.velocity * 0.75f;
|
||||
Projectile.velocity *= 0.75f;
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
||||
}
|
||||
return false;
|
||||
@@ -62,11 +59,10 @@ public class GoldenStaffProj : ModProjectile
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.MeatDust>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
||||
}
|
||||
|
||||
@@ -24,26 +24,23 @@ public class NatureStaffProj : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.NatureStaffDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust2];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.NatureStaffDust>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.NatureStaffDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust1];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.NatureStaffDust2>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.penetrate--;
|
||||
Projectile.penetrate--;
|
||||
if (Projectile.penetrate <= 0)
|
||||
{
|
||||
Projectile.Kill();
|
||||
@@ -59,8 +56,7 @@ public class NatureStaffProj : ModProjectile
|
||||
{
|
||||
Projectile.velocity.Y = 0f - oldVelocity.Y;
|
||||
}
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.velocity *= 0.75f;
|
||||
Projectile.velocity *= 0.75f;
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
||||
}
|
||||
return false;
|
||||
@@ -70,11 +66,10 @@ public class NatureStaffProj : ModProjectile
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.NatureStaffDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.NatureStaffDust>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
||||
}
|
||||
@@ -83,7 +78,7 @@ public class NatureStaffProj : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
target.AddBuff(20, 180, false);
|
||||
target.AddBuff(BuffID.Poisoned, 180, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,26 +24,23 @@ public class SorcerousHellstaffProj : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousHellDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust2];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousHellDust>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousHellDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust1];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousHellDust2>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.penetrate--;
|
||||
Projectile.penetrate--;
|
||||
if (Projectile.penetrate <= 0)
|
||||
{
|
||||
Projectile.Kill();
|
||||
@@ -59,8 +56,7 @@ public class SorcerousHellstaffProj : ModProjectile
|
||||
{
|
||||
Projectile.velocity.Y = 0f - oldVelocity.Y;
|
||||
}
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.velocity *= 0.75f;
|
||||
Projectile.velocity *= 0.75f;
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
||||
}
|
||||
return false;
|
||||
@@ -70,11 +66,10 @@ public class SorcerousHellstaffProj : ModProjectile
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousHellDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousHellDust>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
||||
}
|
||||
@@ -83,7 +78,7 @@ public class SorcerousHellstaffProj : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(6))
|
||||
{
|
||||
target.AddBuff(24, 180, false);
|
||||
target.AddBuff(BuffID.OnFire, 180, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,26 +24,23 @@ public class SorcerousHellstaffProjWhite : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousHellDustWhite>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust2];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousHellDustWhite>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousHellDustPurple>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust1];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousHellDustPurple>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.penetrate--;
|
||||
Projectile.penetrate--;
|
||||
if (Projectile.penetrate <= 0)
|
||||
{
|
||||
Projectile.Kill();
|
||||
@@ -59,8 +56,7 @@ public class SorcerousHellstaffProjWhite : ModProjectile
|
||||
{
|
||||
Projectile.velocity.Y = 0f - oldVelocity.Y;
|
||||
}
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.velocity *= 0.75f;
|
||||
Projectile.velocity *= 0.75f;
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
||||
}
|
||||
return false;
|
||||
@@ -70,11 +66,10 @@ public class SorcerousHellstaffProjWhite : ModProjectile
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousHellDustWhite>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousHellDustWhite>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
||||
}
|
||||
@@ -83,7 +78,7 @@ public class SorcerousHellstaffProjWhite : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(6))
|
||||
{
|
||||
target.AddBuff(24, 180, false);
|
||||
target.AddBuff(BuffID.OnFire, 180, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,8 +42,7 @@ public class SorcerousStaffProj : ModProjectile
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.penetrate--;
|
||||
Projectile.penetrate--;
|
||||
if (Projectile.penetrate <= 0)
|
||||
{
|
||||
Projectile.Kill();
|
||||
@@ -59,8 +58,7 @@ public class SorcerousStaffProj : ModProjectile
|
||||
{
|
||||
Projectile.velocity.Y = 0f - oldVelocity.Y;
|
||||
}
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.velocity *= 0.75f;
|
||||
Projectile.velocity *= 0.75f;
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
||||
}
|
||||
return false;
|
||||
@@ -70,11 +68,10 @@ public class SorcerousStaffProj : ModProjectile
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousDust>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
||||
}
|
||||
|
||||
@@ -24,28 +24,26 @@ public class TranquilityProj : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.penetrate--;
|
||||
Projectile.penetrate--;
|
||||
if (Projectile.penetrate <= 0)
|
||||
{
|
||||
Projectile.Kill();
|
||||
@@ -61,8 +59,7 @@ public class TranquilityProj : ModProjectile
|
||||
{
|
||||
Projectile.velocity.Y = 0f - oldVelocity.Y;
|
||||
}
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.velocity = projectile2.velocity * 0.75f;
|
||||
Projectile.velocity *= 0.75f;
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -26,20 +26,19 @@ public class SpectralMoonBolt : ModProjectile
|
||||
{
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
@@ -48,20 +47,19 @@ public class SpectralMoonBolt : ModProjectile
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item1, Projectile.position);
|
||||
|
||||
@@ -40,11 +40,10 @@ public class TheSpinningRainbow : ModProjectile
|
||||
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
|
||||
Vector2 position = Projectile.position;
|
||||
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
|
||||
_ = position + rotVector * 16f;
|
||||
int item = 0;
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
|
||||
{
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.KillProjectile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,20 +51,19 @@ public class TheSpinningRainbow : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 1f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 1f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 1f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,19 +30,17 @@ public class TheWhisperingIcicle : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.CrystalDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.CrystalDust2>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
AnimateProjectile();
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.penetrate--;
|
||||
Projectile.penetrate--;
|
||||
if (Projectile.penetrate <= 0)
|
||||
{
|
||||
Projectile.Kill();
|
||||
@@ -58,8 +56,7 @@ public class TheWhisperingIcicle : ModProjectile
|
||||
{
|
||||
Projectile.velocity.Y = 0f - oldVelocity.Y;
|
||||
}
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.velocity *= 0.75f;
|
||||
Projectile.velocity *= 0.75f;
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
||||
}
|
||||
return false;
|
||||
@@ -69,11 +66,10 @@ public class TheWhisperingIcicle : ModProjectile
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.CrystalDust2>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.CrystalDust2>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
||||
}
|
||||
@@ -90,14 +86,11 @@ public class TheWhisperingIcicle : ModProjectile
|
||||
|
||||
public void AnimateProjectile()
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.frameCounter++;
|
||||
Projectile.frameCounter++;
|
||||
if (Projectile.frameCounter >= 3)
|
||||
{
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.frame++;
|
||||
Projectile projectile3 = Projectile;
|
||||
projectile3.frame %= 16;
|
||||
Projectile.frame++;
|
||||
Projectile.frame %= 16;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,8 +33,7 @@ public class WishNeedle : ModProjectile
|
||||
{
|
||||
if (Projectile.alpha > 70)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.alpha -= 15;
|
||||
Projectile.alpha -= 15;
|
||||
if (Projectile.alpha < 70)
|
||||
{
|
||||
Projectile.alpha = 70;
|
||||
@@ -70,20 +69,19 @@ public class WishNeedle : ModProjectile
|
||||
}
|
||||
if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 0.9f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 0.9f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user