Icicle Arrow fixes + Hailstorm small change

Icicle arrow should function properly now
Fixed its damage, lifetime, pierce, and tile Collison issues.
Hailstorm lost glacial state in exchange for frostburn.
hailstorm also got a small buff to the crit bonus damage but now looses 50% damage on its second pierce.
This commit is contained in:
Xyk committed 2024-04-20 23:05:50 -07:00
1 parent 0ca08cebc4
commit 4055e1b1fe
2 files changed
+32 -11

No files matched your search

+11 -3
View File
@@ -71,12 +71,12 @@ namespace CalamityMod.Projectiles.Ranged
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
Player Owner = Main.player[Projectile.owner];
target.AddBuff(BuffID.Frostburn2, 120);
target.AddBuff(BuffID.Frostburn, 120);
if (hit.Crit)
{
SoundStyle crit = new("CalamityMod/Sounds/NPCHit/CryogenPhaseTransitionCrack");
SoundEngine.PlaySound(crit with { Volume = 0.35f, Pitch = 1f }, Projectile.Center);
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
target.AddBuff(BuffID.Frostburn2, 300);
int points = 6;
float radians = MathHelper.TwoPi / points;
Vector2 spinningPoint = Vector2.Normalize(new Vector2(-1f, -1f));
@@ -88,11 +88,19 @@ namespace CalamityMod.Projectiles.Ranged
WaterFlavoredParticle subTrail = new WaterFlavoredParticle(Projectile.Center + velocity * 4.5f + addedPlacement, velocity * 7, false, 6, 0.65f, Color.SkyBlue);
GeneralParticleHandler.SpawnParticle(subTrail);
}
int onHitDamage = Owner.CalcIntDamage<RangedDamageClass>(0.33f * Projectile.damage);
int onHitDamage = Owner.CalcIntDamage<RangedDamageClass>(0.48f * Projectile.damage);
Owner.ApplyDamageToNPC(target, onHitDamage, 0f, 0, false);
}
}
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
{
if (Projectile.numHits > 0)
Projectile.damage = (int)(Projectile.damage * 0.5f);
if (Projectile.damage < 1)
Projectile.damage = 1;
}
public override bool PreDraw(ref Color lightColor)
{
if (Projectile.localAI[0] > 15f)
+21 -8
View File
@@ -13,6 +13,7 @@ namespace CalamityMod.Projectiles.Ranged
public override string Texture => "CalamityMod/Items/Ammo/IcicleArrow";
public bool falling = false;
public Vector2 startVelocity;
public bool setFallingStats = false;
public override void SetDefaults()
{
@@ -50,7 +51,7 @@ namespace CalamityMod.Projectiles.Ranged
Projectile.velocity *= 0.99f;
Projectile.alpha += 1;
if (Projectile.localAI[0] == 250)
if (Projectile.localAI[0] == 200)
{
for (int k = 0; k < 10; k++)
{
@@ -60,14 +61,20 @@ namespace CalamityMod.Projectiles.Ranged
}
Projectile.alpha = 255;
Projectile.velocity = new Vector2(0, 0.3f);
Projectile.penetrate = 2;
Projectile.ExpandHitboxBy(50);
falling = true;
}
}
else
{
if (!setFallingStats)
{
Projectile.tileCollide = false;
Projectile.penetrate = 2;
Projectile.numHits = 1;
Projectile.ExpandHitboxBy(50);
setFallingStats = true;
}
if (Projectile.Calamity().allProjectilesHome)
Projectile.Calamity().allProjectilesHome = false; // Prevent the icicle effect from breaking with Arterial Assault
@@ -82,7 +89,7 @@ namespace CalamityMod.Projectiles.Ranged
}
}
if (Projectile.localAI[0] < 350)
if (Projectile.localAI[0] < 320)
Projectile.velocity *= 1.033f;
else
Projectile.tileCollide = true;
@@ -98,12 +105,13 @@ namespace CalamityMod.Projectiles.Ranged
Projectile.Calamity().allProjectilesHome = false; // Prevent the icicle effect from breaking with Arterial Assault
if (!falling)
{
Projectile.localAI[0] = 100;
SoundEngine.PlaySound(SoundID.Item50 with { Volume = 0.35f, Pitch = -0.2f, PitchVariance = 0.2f }, Projectile.Center);
Projectile.velocity = new Vector2(0, -6.5f).RotatedByRandom(0.25f) * Main.rand.NextFloat(0.75f, 1.1f);
for (int k = 0; k < 3; k++)
for (int k = 0; k < 2; k++)
{
Vector2 velocity = startVelocity.RotatedByRandom(0.4f) * Main.rand.NextFloat(0.3f, 0.85f);
WaterFlavoredParticle burst = new WaterFlavoredParticle(Projectile.Center + velocity * 3f, velocity, false, 5, 0.65f, Color.SkyBlue);
WaterFlavoredParticle burst = new WaterFlavoredParticle(Projectile.Center + velocity * 3f, velocity * 0.5f, false, 8, 0.65f, Color.SkyBlue);
GeneralParticleHandler.SpawnParticle(burst);
}
}
@@ -111,7 +119,12 @@ namespace CalamityMod.Projectiles.Ranged
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
{
if (falling)
Projectile.damage = (int)(Projectile.damage * 1.2f);
modifiers.SourceDamage *= 1.35f;
if (Projectile.numHits > 1 && falling)
Projectile.damage = (int)(Projectile.damage * 0.6f);
if (Projectile.damage < 1)
Projectile.damage = 1;
}
public override void OnKill(int timeLeft)
{
@@ -127,7 +140,7 @@ namespace CalamityMod.Projectiles.Ranged
{
if (!falling)
{
Projectile.tileCollide = false;
Projectile.localAI[0] = 100;
SoundEngine.PlaySound(SoundID.Item50 with { Volume = 0.35f, Pitch = -0.2f, PitchVariance = 0.2f }, Projectile.Center);
for (int k = 0; k < 7; k++)
{