Made Providence's non-Holy Blast split Holy Fire projectiles faster in higher difficulties.
This commit is contained in:
1 parent
b7ea3bc681
commit
3dce85b6d6
2 files changed
+12
-15
No files matched your search
@@ -15,6 +15,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public class HolyFire : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Boss";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.projFrames[Projectile.type] = 4;
|
||||
@@ -81,16 +82,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Color loColor = ProvUtils.GetProjectileColor(0, true);
|
||||
|
||||
for (int i = 0; i < 25; i++)
|
||||
{
|
||||
GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center, new Vector2(Main.rand.NextFloat(10), 0).RotatedByRandom(MathHelper.TwoPi), false, 10, Main.rand.NextFloat(0.8f, 1.2f), hiColor));
|
||||
}
|
||||
|
||||
GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, 0f, 0.5f, 0.1f, 4));
|
||||
|
||||
for (float i = 0; i < 1; i += 0.25f)
|
||||
{
|
||||
GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, hiColor, "CalamityMod/Particles/SoftRoundExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.02f * i, 0.125f * i, 8));
|
||||
}
|
||||
|
||||
GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, hiColor, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.02f, 0.045f, 5));
|
||||
|
||||
if (Main.rand.NextBool())
|
||||
@@ -101,12 +99,12 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (CalamityWorld.LegendaryMode && CalamityWorld.revenge)
|
||||
velocity *= Main.rand.NextFloat(1f, 2f);
|
||||
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<HolyFire2>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<HolyFire2>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 1f);
|
||||
|
||||
if (CalamityWorld.LegendaryMode && CalamityWorld.revenge)
|
||||
velocity *= Main.rand.NextFloat(1f, 2f);
|
||||
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, -velocity, ModContent.ProjectileType<HolyFire2>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, -velocity, ModContent.ProjectileType<HolyFire2>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 1f);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -117,14 +115,15 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (CalamityWorld.LegendaryMode && CalamityWorld.revenge)
|
||||
velocity *= Main.rand.NextFloat(1f, 2f);
|
||||
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<HolyFire2>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType<HolyFire2>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 1f);
|
||||
|
||||
if (CalamityWorld.LegendaryMode && CalamityWorld.revenge)
|
||||
velocity *= Main.rand.NextFloat(1f, 2f);
|
||||
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, -velocity, ModContent.ProjectileType<HolyFire2>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, -velocity, ModContent.ProjectileType<HolyFire2>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 1f);
|
||||
}
|
||||
}
|
||||
|
||||
SoundEngine.PlaySound(SoundID.Item20, Projectile.Center);
|
||||
SoundEngine.PlaySound(SoundID.Item100.WithPitchOffset(0.4f), Projectile.Center);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.Providence;
|
||||
using CalamityMod.Particles;
|
||||
@@ -16,6 +17,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public class HolyFire2 : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Boss";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.projFrames[Projectile.type] = 4;
|
||||
@@ -48,7 +50,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.frame > 3)
|
||||
Projectile.frame = 0;
|
||||
|
||||
if (Math.Abs(Projectile.velocity.X) < 7f)
|
||||
float maxVelocity = Projectile.ai[0] == 0f ? 7f : (Main.masterMode || BossRushEvent.BossRushActive) ? 13f : CalamityWorld.death ? 11f : CalamityWorld.revenge ? 10f : Main.expertMode ? 9f : 7f;
|
||||
if (Projectile.velocity.X < maxVelocity)
|
||||
Projectile.velocity.X *= 1.05f;
|
||||
|
||||
int playerTracker = Player.FindClosest(Projectile.Center, 1, 1);
|
||||
@@ -74,17 +77,12 @@ namespace CalamityMod.Projectiles.Boss
|
||||
GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center + new Vector2(Main.rand.NextFloat(15), 0).RotatedByRandom(MathHelper.TwoPi), Projectile.velocity.RotatedBy(Math.PI) * 0.2f, false, 10, Main.rand.NextFloat(0.8f, 1.2f), ProvUtils.GetProjectileColor(255)));
|
||||
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
GeneralParticleHandler.SpawnParticle(new MediumMistParticle(Projectile.Center, Vector2.Zero, Color.LightSlateGray, Color.DarkSlateGray, Main.rand.NextFloat(vel), 150, MathHelper.ToRadians(Main.rand.NextFloat(-1f, 1f))));
|
||||
}
|
||||
|
||||
Projectile.rotation = MathHelper.Lerp(0f, MathHelper.WrapAngle(Vector2.Zero.AngleTo(Projectile.velocity) + MathHelper.ToRadians(-90f)), Math.Clamp(vel, 0f, 1f));
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
return ProvUtils.GetProjectileColor(lightColor);
|
||||
}
|
||||
public override Color? GetAlpha(Color lightColor) => ProvUtils.GetProjectileColor(lightColor);
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user