Profaned Soul Crystal's anti-whip-stack only works on vanilla whips at the moment.
47 lines
1.6 KiB
C#
47 lines
1.6 KiB
C#
using Microsoft.Xna.Framework;
|
|
using CalamityMod.Buffs.StatDebuffs;
|
|
using CalamityMod.Dusts;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
namespace CalamityMod.Projectiles.Enemy
|
|
{
|
|
public class NuclearBulletLarge : ModProjectile, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Projectiles.Enemy";
|
|
public override void SetDefaults()
|
|
{
|
|
Projectile.width = 30;
|
|
Projectile.height = 18;
|
|
Projectile.hostile = true;
|
|
Projectile.timeLeft = 240;
|
|
Projectile.tileCollide = false;
|
|
Projectile.ignoreWater = true;
|
|
}
|
|
public override void AI()
|
|
{
|
|
Lighting.AddLight(Projectile.Center, Color.White.ToVector3() * 1.25f);
|
|
Projectile.rotation = Projectile.velocity.ToRotation();
|
|
}
|
|
|
|
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
|
{
|
|
if (info.Damage <= 0)
|
|
return;
|
|
|
|
target.AddBuff(ModContent.BuffType<Irradiated>(), 300);
|
|
}
|
|
public override void OnKill(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;
|
|
}
|
|
}
|
|
}
|
|
}
|