Two Yharon reversions:
1 - Now has contact damage during phase 2 fireball dash again 2 - Completely reverted yharon fireball behavior
This commit is contained in:
1 parent
61c491c615
commit
7e6d9fa1fd
3 files changed
+48
-14
No files matched your search
@@ -2238,6 +2238,9 @@ namespace CalamityMod.NPCs.Yharon
|
||||
|
||||
if (NPC.ai[1] >= fireballBreathTimer)
|
||||
{
|
||||
// Set damage once charge starts
|
||||
NPC.damage = setDamage;
|
||||
|
||||
if (NPC.ai[1] % (expertMode ? 6f : 8f) == 0f && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
float xOffset = 30f;
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public class YharonFireball : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Boss";
|
||||
private float speedX = -1f;
|
||||
private float speedX2 = -2f;
|
||||
private float speedX = -3f;
|
||||
private float speedX2 = -5f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -95,13 +95,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
for (int x = 0; x < 3; x++)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, speedX, -6f, ModContent.ProjectileType<YharonFireball2>(), Projectile.damage, 0f, Main.myPlayer);
|
||||
speedX += 1f;
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, speedX, -50f, ModContent.ProjectileType<YharonFireball2>(), Projectile.damage, 0f, Main.myPlayer);
|
||||
speedX += 3f;
|
||||
}
|
||||
for (int x = 0; x < 2; x++)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, speedX2, -6f, ModContent.ProjectileType<YharonFireball2>(), Projectile.damage, 0f, Main.myPlayer);
|
||||
speedX2 += 4f;
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, speedX2, -75f, ModContent.ProjectileType<YharonFireball2>(), Projectile.damage, 0f, Main.myPlayer);
|
||||
speedX2 += 10f;
|
||||
}
|
||||
}
|
||||
Projectile.ExpandHitboxBy(144);
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.width = 34;
|
||||
Projectile.height = 34;
|
||||
Projectile.hostile = true;
|
||||
Projectile.Opacity = 0.25f;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 3600;
|
||||
@@ -60,21 +61,43 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.frame >= Main.projFrames[Type])
|
||||
Projectile.frame = 0;
|
||||
|
||||
if (Projectile.ai[0] < TimeBeforeFalling)
|
||||
if (Projectile.velocity.Y >= -16f)
|
||||
{
|
||||
Projectile.ai[0] += 1f;
|
||||
Projectile.velocity.Y -= 0.1f;
|
||||
if (Projectile.velocity.Y < MaxUpwardVelocity)
|
||||
Projectile.velocity.Y = MaxUpwardVelocity;
|
||||
if (Projectile.Opacity < 1f)
|
||||
{
|
||||
Projectile.Opacity = 1f;
|
||||
SoundEngine.PlaySound(SoundID.Item20, Projectile.Center);
|
||||
int dustAmount = 36;
|
||||
|
||||
for (int i = 0; i < dustAmount; i++)
|
||||
{
|
||||
Vector2 dustSpawnPosition = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.5f;
|
||||
dustSpawnPosition = dustSpawnPosition.RotatedBy((double)((float)(i - (dustAmount / 2 - 1)) * MathHelper.TwoPi / (float)dustAmount), default) + Projectile.Center;
|
||||
Vector2 dustVelocity = dustSpawnPosition - Projectile.Center;
|
||||
|
||||
int dust = Dust.NewDust(dustSpawnPosition + dustVelocity, 0, 0, DustID.Pixie, dustVelocity.X, dustVelocity.Y);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].noLight = true;
|
||||
Main.dust[dust].velocity = dustVelocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Projectile.velocity.Y < -1f)
|
||||
{
|
||||
// 129 frames to get from -50 to -1
|
||||
Projectile.velocity.Y *= 0.97f;
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile.velocity.X *= 0.8f;
|
||||
// 85 frames to get from -1 to 16
|
||||
Projectile.velocity.Y += 0.2f;
|
||||
if (Projectile.velocity.Y > MaxDownwardVelocity)
|
||||
Projectile.velocity.Y = MaxDownwardVelocity;
|
||||
if (Projectile.velocity.Y > 16f)
|
||||
Projectile.velocity.Y = 16f;
|
||||
}
|
||||
|
||||
Projectile.velocity.X *= 0.995f;
|
||||
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2;
|
||||
|
||||
if (Projectile.localAI[0] == 0f)
|
||||
@@ -83,6 +106,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
SoundEngine.PlaySound(FireballSound, Projectile.Center);
|
||||
}
|
||||
|
||||
if (Projectile.ai[0] >= 2f)
|
||||
{
|
||||
Projectile.alpha -= 25;
|
||||
if (Projectile.alpha < 0)
|
||||
Projectile.alpha = 0;
|
||||
}
|
||||
|
||||
if (Main.rand.NextBool(16))
|
||||
{
|
||||
Dust dust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, DustID.Pixie, 0f, 0f, 200, default, 1f);
|
||||
@@ -91,6 +121,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target) => Projectile.velocity.Y >= -16f;
|
||||
public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, Projectile.alpha);
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
|
||||
Reference in new issue
Block a user