Profaned Soul Crystal's anti-whip-stack only works on vanilla whips at the moment.
56 lines
1.7 KiB
C#
56 lines
1.7 KiB
C#
using CalamityMod.Buffs.StatDebuffs;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using Terraria.Audio;
|
|
|
|
namespace CalamityMod.Projectiles.Magic
|
|
{
|
|
public class TridentIcicle : ModProjectile, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Projectiles.Magic";
|
|
public override void SetDefaults()
|
|
{
|
|
Projectile.width = 18;
|
|
Projectile.height = 18;
|
|
Projectile.aiStyle = ProjAIStyleID.Arrow;
|
|
AIType = ProjectileID.Bullet;
|
|
Projectile.friendly = true;
|
|
Projectile.coldDamage = true;
|
|
Projectile.DamageType = DamageClass.Magic;
|
|
Projectile.penetrate = 2;
|
|
Projectile.ignoreWater = true;
|
|
Projectile.coldDamage = true;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
//make pretty dust
|
|
int index2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 88);
|
|
Main.dust[index2].noGravity = true;
|
|
}
|
|
|
|
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
|
{
|
|
target.AddBuff(BuffID.Frostburn2, 180);
|
|
}
|
|
|
|
public override Color? GetAlpha(Color lightColor)
|
|
{
|
|
return new Color(200, 200, 200, Projectile.alpha);
|
|
}
|
|
|
|
public override void OnKill(int timeLeft)
|
|
{
|
|
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
|
for (int i = 0; i < 10; i++)
|
|
{
|
|
int index2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 88);
|
|
Main.dust[index2].noGravity = true;
|
|
Main.dust[index2].velocity *= 2f;
|
|
}
|
|
}
|
|
}
|
|
}
|