44 lines
1.5 KiB
C#
44 lines
1.5 KiB
C#
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using CalamityMod.Buffs.DamageOverTime;
|
|
using CalamityMod.Buffs.StatDebuffs;
|
|
namespace CalamityMod.Projectiles.Ranged
|
|
{
|
|
public class MagnomalyExplosion : ModProjectile
|
|
{
|
|
public override void SetStaticDefaults() //don't remove this projectile
|
|
{
|
|
DisplayName.SetDefault("Explosion");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
projectile.width = 192;
|
|
projectile.height = 192;
|
|
projectile.friendly = true;
|
|
projectile.ignoreWater = true;
|
|
projectile.tileCollide = false;
|
|
projectile.ranged = true;
|
|
projectile.penetrate = -1;
|
|
projectile.timeLeft = 5;
|
|
projectile.usesLocalNPCImmunity = true;
|
|
projectile.localNPCHitCooldown = -1;
|
|
projectile.alpha = 255;
|
|
}
|
|
|
|
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
|
{
|
|
target.AddBuff(ModContent.BuffType<ExoFreeze>(), 30);
|
|
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
|
|
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
|
|
target.AddBuff(ModContent.BuffType<Plague>(), 120);
|
|
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
|
|
target.AddBuff(BuffID.CursedInferno, 120);
|
|
target.AddBuff(BuffID.Frostburn, 120);
|
|
target.AddBuff(BuffID.OnFire, 120);
|
|
target.AddBuff(BuffID.Ichor, 120);
|
|
}
|
|
}
|
|
}
|