diff --git a/NPCs/AcidRain/CragmawMire.cs b/NPCs/AcidRain/CragmawMire.cs index c0e1f9ca38..987102202f 100644 --- a/NPCs/AcidRain/CragmawMire.cs +++ b/NPCs/AcidRain/CragmawMire.cs @@ -208,9 +208,23 @@ namespace CalamityMod.NPCs.AcidRain } npc.Calamity().DR = 0.125f; npc.HitSound = SoundID.NPCHit1; - if (npc.ai[0] % 600f == 20f) + if (Main.netMode != NetmodeID.MultiplayerClient) { - Projectile.NewProjectile(npc.Center, Vector2.UnitY, ModContent.ProjectileType(), 0, 0f, 0, npc.whoAmI, npc.target); + if (npc.ai[0] % 600f == 20f) + { + Projectile.NewProjectile(npc.Center, Vector2.UnitY, ModContent.ProjectileType(), 0, 0f, 0, npc.whoAmI, npc.target); + } + if (npc.ai[0] % 600f == 240f) + { + int damage = CalamityWorld.downedPolterghast ? 52 : 33; + for (int i = 0; i < 16; i++) + { + float angle = MathHelper.TwoPi / 16f * i; + float angleDelta = Main.rand.NextFloat(MathHelper.TwoPi / 16f) * 0.6f; + angle += angleDelta - angleDelta / 2f; + Projectile.NewProjectile(npc.Center, angle.ToRotationVector2() * 6f, ModContent.ProjectileType(), damage, 4f); + } + } } } } diff --git a/Projectiles/Enemy/CragmawSpike.cs b/Projectiles/Enemy/CragmawSpike.cs new file mode 100644 index 0000000000..696bbf3f0b --- /dev/null +++ b/Projectiles/Enemy/CragmawSpike.cs @@ -0,0 +1,47 @@ +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Enemy +{ + public class CragmawSpike : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spike"); + } + + public override void SetDefaults() + { + projectile.width = 14; + projectile.height = 28; + projectile.hostile = true; + projectile.timeLeft = 600; + projectile.tileCollide = true; + projectile.ignoreWater = false; + } + public override void AI() + { + if (projectile.velocity.Y < 6f) + projectile.velocity.Y += 0.075f; + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; + } + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } + public override void Kill(int timeLeft) + { + for (int i = 0; i <= 2; i++) + { + int idx = Dust.NewDust(projectile.position, 8, 8, (int)CalamityDusts.SulfurousSeaAcid, 0, 0, 0, default, 0.75f); + Main.dust[idx].noGravity = true; + Main.dust[idx].velocity *= 3f; + idx = Dust.NewDust(projectile.position, 8, 8, (int)CalamityDusts.SulfurousSeaAcid, 0, 0, 0, default, 0.75f); + Main.dust[idx].noGravity = true; + Main.dust[idx].velocity *= 3f; + } + } + } +} diff --git a/Projectiles/Enemy/CragmawSpike.png b/Projectiles/Enemy/CragmawSpike.png new file mode 100644 index 0000000000..1547f22da4 Binary files /dev/null and b/Projectiles/Enemy/CragmawSpike.png differ