"Muzzle flash" effect for HolyBurnOrb and HolyLight projectiles

This commit is contained in:
Xhack committed 2024-07-27 02:29:16 -04:00
1 parent 4f2841375f
commit d747d3938e
4 files changed
+15 -21

No files matched your search

-19
View File
@@ -1295,25 +1295,6 @@ namespace CalamityMod.NPCs.Providence
}
else if (Main.netMode != NetmodeID.MultiplayerClient)
Projectile.NewProjectile(NPC.GetSource_FromAI(), fireFrom, vector2, projectileType, dmgAmt, 0f, Main.myPlayer);
Color dustColor = Main.hslToRgb(Main.rgbToHsl(nightAI ? new Color(100, 200, 250) : (projectileType == ModContent.ProjectileType<HolyBurnOrb>() ? Color.Orange : Color.Green)).X, 1f, 0.5f);
dustColor.A = 255;
int maxDust = 3;
for (int j = 0; j < maxDust; j++)
{
int dust = Dust.NewDust(fireFrom, 0, 0, DustID.RainbowMk2, 0f, 0f, 0, dustColor, 1f);
Main.dust[dust].position = fireFrom;
Main.dust[dust].velocity = vector2 * cocoonProjVelocity * (j * 0.5f + 1f);
Main.dust[dust].noGravity = true;
Main.dust[dust].scale = 1f + j;
Main.dust[dust].fadeIn = Main.rand.NextFloat() * 2f;
Dust dust2 = Dust.CloneDust(dust);
Dust dust3 = dust2;
dust3.scale /= 2f;
dust3 = dust2;
dust3.fadeIn /= 2f;
dust2.color = new Color(255, 255, 255, 255);
}
}
// Radial offset
Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

+9 -1
View File
@@ -17,6 +17,7 @@ namespace CalamityMod.Projectiles.Boss
{
public class HolyBurnOrb : ModProjectile, ILocalizedModType
{
bool started = false;
public new string LocalizationCategory => "Projectiles.Boss";
public override string Texture => "CalamityMod/Projectiles/StarProj";
@@ -36,7 +37,7 @@ namespace CalamityMod.Projectiles.Boss
public override void OnSpawn(IEntitySource source)
{
}
public override void AI()
@@ -65,6 +66,13 @@ namespace CalamityMod.Projectiles.Boss
if (Projectile.ai[0] == 0f && BossRushEvent.BossRushActive)
Projectile.velocity *= 1.25f;
if (!started)
{
Color cl = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255);
GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, cl, "CalamityMod/Particles/BlastCone", new Vector2(Main.rand.NextFloat(4f, 7f), 1.5f), Vector2.Zero.AngleTo(Projectile.velocity), 1f, 0f, 30));
started = true;
}
if (Projectile.ai[0] < 240f)
{
Projectile.ai[0] += 1f;
+6 -1
View File
@@ -31,7 +31,12 @@ namespace CalamityMod.Projectiles.Boss
public override void OnSpawn(IEntitySource source)
{
SoundStyle soundStyle = SoundID.DD2_WitherBeastCrystalImpact;
soundStyle.MaxInstances = 10;
SoundEngine.PlaySound(soundStyle, Projectile.Center);
Color col = new Color(54, 209, 54);
GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, col, "CalamityMod/Particles/BlastCone", new Vector2(Main.rand.NextFloat(4f, 7f), 1.5f), Vector2.Zero.AngleTo(Projectile.velocity), 1f, 0f, 30));
}
public override void AI()
@@ -68,7 +73,7 @@ namespace CalamityMod.Projectiles.Boss
Projectile.Kill();
}
Color col = new Color(54, 209, 54, 255);
Color col = new Color(54, 209, 54);
GlowOrbParticle p = new GlowOrbParticle(Projectile.Center, Projectile.velocity, false, 25, 1f, col);