Files
CalamityModPublic/Projectiles/Enemy/NuclearBulletLarge.cs
T
DominicKarma42 55e89c9b98 Replaced (hopefully) every magic number with a constant
Note: Does not include item rarities, and appears to shown nonexistant using directive movement in the commit. This does not really affect anything, however.
2020-05-30 17:56:36 -04:00

47 lines
1.6 KiB
C#

using Microsoft.Xna.Framework;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Dusts;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Enemy
{
public class NuclearBulletLarge : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Nuclear Bullet");
}
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, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 300);
}
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;
}
}
}
}