Beam now fizzles out on time

This commit is contained in:
mochi-angel committed 2025-05-11 13:28:45 -07:00
1 parent aab48464b3
commit edad1cf490
3 files changed
+3 -21

No files matched your search

@@ -1434,7 +1434,7 @@ Voidragon: {
After firing, the gun unleashes a beam of abyssal fire that erases foes from existence
The beam grows more powerful based on the amount of shots hit
At maximum damage, abyssal portals rotate around the user that constantly summon creatures from beyond
'Fade to black'
[c/C843E2: 'Fade to black']
'''
}
+1 -1
View File
@@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Ranged
int beamTimer = VoidragonHoldout.ModProjectile<VoidragonHoldout>().beamTimer;
if (beamTimer <= 500 && beamTimer >= 425)
Projectile.scale += 0.1f;
else if (beamTimer <= 75 && beamTimer >= 0 && Projectile.scale > 0f)
else if (beamTimer <= 25 && beamTimer >= 0 && Projectile.scale > 0f)
Projectile.scale -= 0.1f;
Projectile.scale = MathHelper.Clamp(Projectile.scale, 0f, 2f);
+1 -19
View File
@@ -129,30 +129,12 @@ namespace CalamityMod.Projectiles.Ranged
}
if (shotCounter == 51 && framesBetweenShots == 0)
{
Main.NewText(beamTimer);
//Main.NewText(beamTimer);
firingBeam = true;
if (firingBeam && beamTimer > 0)
{
#region Visuals and Sounds
Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * 30;
//Extremely WIP visuals for the laser source
float orbScale = 0.2f * Main.rand.NextFloat(0.8f, 1.1f);
Color smokeColor = Color.Lerp(Color.DimGray, Color.DarkGray, Main.rand.NextFloat(0.2f, 0.6f));
Particle orb = new CustomPulse(GunTipPosition, Vector2.Zero, smokeColor * 0.7f, "CalamityMod/ExtraTextures/GreyscaleVortex", new Vector2(1, 1), Projectile.ai[2] * 0.45f, orbScale, orbScale * 1.1f, 6, false);
GeneralParticleHandler.SpawnParticle(orb);
Particle orb3 = new CustomPulse(GunTipPosition, Vector2.Zero, Color.Indigo, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.5f, 0.15f, 6);
GeneralParticleHandler.SpawnParticle(orb3);
Particle orb2 = new CustomPulse(GunTipPosition, Vector2.Zero, Color.White, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.1f, 0.07f, 6);
GeneralParticleHandler.SpawnParticle(orb2);
float offset = Main.rand.NextFloat(MathHelper.TwoPi);
for (int i = 0; i < 4; i++)
{
Vector2 velocity = (MathHelper.TwoPi * i / 4f + offset).ToRotationVector2();
Particle cross = new GlowSparkParticle(GunTipPosition, velocity, false, 6, 0.4f, Color.BlueViolet * 0.7f, new Vector2(0.07f, 0.08f), true, false);
GeneralParticleHandler.SpawnParticle(cross);
}
#endregion
//If the player hasn't hit any shots, increase the multiplier from 0 to 1 to avoid the rocket doing 0 damage