Burning Sea visual stuff
This commit is contained in:
1 parent
a492c9b7c3
commit
668fa51cd4
1 file changed
+25
-12
@@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
bool canUseMana = Owner.CheckMana(Owner.ActiveItem());
|
||||
// Use different behavior depending on if the player is channeling or not.
|
||||
if (Owner.CantUseHoldout() || !canUseMana || Projectile.timeLeft <= 40)
|
||||
if (Owner.CantUseHoldout() || !canUseMana || Projectile.timeLeft <= (int)BurningSea.FizzleOutTime)
|
||||
{
|
||||
Released = true;
|
||||
|
||||
@@ -103,17 +103,26 @@ namespace CalamityMod.Projectiles.Magic
|
||||
if (Timer % 15 == 0f)
|
||||
Owner.CheckMana(Owner.ActiveItem(), -1, true);
|
||||
|
||||
// If channeled for a while, turns red (handled in PreDraw) and starts emitting smoke as a warning.
|
||||
// The smoke only starts once the fireball is completely red.
|
||||
if (Timer > BurningSea.BurnOutTime - 60f)
|
||||
// Spawn little spark effects around the fireball when fully charged.
|
||||
if (Timer > BurningSea.ChargeTime && Timer < BurningSea.BurnOutTime)
|
||||
{
|
||||
for (int s = 0; s < 2; s++)
|
||||
for (int s = 0; s < 6; s++)
|
||||
{
|
||||
Vector2 smokeLocation = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi) * 237f;
|
||||
Vector2 smokeVel = smokeLocation - Projectile.Center;
|
||||
smokeVel.Normalize();
|
||||
smokeVel *= 5f;
|
||||
HeavySmokeParticle burningUp = new(smokeLocation, smokeVel, new Color(192, 192, 192), 10, 1f, 0.6f);
|
||||
float sparkRotation = Main.GlobalTimeWrappedHourly * -5.75f + (MathHelper.TwoPi / 6f * s);
|
||||
Vector2 sparkLocation = Projectile.Center + Vector2.UnitX.RotatedBy(sparkRotation) * 220f;
|
||||
Vector2 sparkVelocity = Vector2.Normalize(sparkLocation - Projectile.Center).RotatedBy(MathHelper.ToRadians(70)) * 2f;
|
||||
AltLineParticle spark = new(sparkLocation, sparkVelocity, false, 8, 0.8f, Color.Lerp(Color.Red, Color.Orange, Main.rand.NextFloat(0.3f)));
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
}
|
||||
// If channeled for a while, turns red (handled in PreDraw) and starts emitting smoke as a warning.
|
||||
if (Timer > BurningSea.BurnOutTime - 90f)
|
||||
{
|
||||
for (int s = 0; s < 3; s++)
|
||||
{
|
||||
Vector2 smokeLocation = Projectile.Center + Main.rand.NextVector2Circular(220f, 220f);
|
||||
Vector2 smokeVel = -Vector2.UnitY * Main.rand.NextFloat(7f, 13f);
|
||||
HeavySmokeParticle burningUp = new(smokeLocation, smokeVel, new Color(192, 192, 192), 10, 0.7f, 0.6f);
|
||||
GeneralParticleHandler.SpawnParticle(burningUp);
|
||||
}
|
||||
}
|
||||
@@ -178,12 +187,16 @@ namespace CalamityMod.Projectiles.Magic
|
||||
// Big fucking fireball
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
float direction = (i % 2f == 0f).ToDirectionInt();
|
||||
float direction = (i % 2 == 0).ToDirectionInt();
|
||||
float offsetDist = 0f;
|
||||
Color fireballColor = Color.Lerp(new Color(255, 200, 200), new Color(255, 30, 30), MathHelper.Clamp(Timer / BurningSea.ChargeTime, 0f, 1f));
|
||||
if (Timer > BurningSea.BurnOutTime - 120f)
|
||||
{
|
||||
fireballColor = Color.Lerp(new Color(255, 30, 30), Color.Red, MathHelper.Clamp((Timer - BurningSea.BurnOutTime + 120f) / 60f, 0f, 1f));
|
||||
offsetDist = MathHelper.Lerp(5f, 40f, (Timer - BurningSea.BurnOutTime + 120f) / 120f);
|
||||
}
|
||||
|
||||
Main.spriteBatch.Draw(TheodoreJNoise, Projectile.Center - Main.screenPosition, null, fireballColor, direction * rotation, TheodoreJNoise.Size() / 2f, drawScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(TheodoreJNoise, Projectile.Center - Main.screenPosition + Main.rand.NextVector2Circular(offsetDist, offsetDist), null, fireballColor, direction * rotation, TheodoreJNoise.Size() / 2f, drawScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
|
||||
Main.spriteBatch.ExitShaderRegion();
|
||||
|
||||
Reference in new issue
Block a user