This commit is contained in:
termigator1359 committed 2020-03-23 21:56:15 -04:00
commit 7a22b3ddef
3 files changed
+63 -2

No files matched your search

+16 -2
View File
@@ -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<CragmawVibeCheckChain>(), 0, 0f, 0, npc.whoAmI, npc.target);
if (npc.ai[0] % 600f == 20f)
{
Projectile.NewProjectile(npc.Center, Vector2.UnitY, ModContent.ProjectileType<CragmawVibeCheckChain>(), 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<CragmawSpike>(), damage, 4f);
}
}
}
}
}
+47
View File
@@ -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<Irradiated>(), 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;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B