Files
CalamityModPublic/Projectiles/Rogue/Corrocloud1.cs
T
mochi-angel b18254200f Beacon and Corrosive Spine debuff changes
We'll have to figure out a different effect than making all rogue weapons inflicting Poison, it's unneeded now that the clouds do it.
Also Titanium Shuriken nerfs.
2023-12-30 22:23:51 -08:00

60 lines
1.7 KiB
C#

using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Dusts;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
{
public class Corrocloud1 : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Rogue";
public override void SetStaticDefaults()
{
Main.projFrames[Projectile.type] = 8;
}
public override void SetDefaults()
{
Projectile.width = 32;
Projectile.height = 32;
Projectile.friendly = true;
Projectile.penetrate = 4;
Projectile.timeLeft = 600;
Projectile.DamageType = RogueDamageClass.Instance;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 16;
}
public override void AI()
{
Projectile.velocity *= 0.99f;
Projectile.ai[0] += 1f;
if (Projectile.ai[0] % 7f == 6f)
{
Projectile.frame++;
}
if (Projectile.frame >= 8)
Projectile.Kill();
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff (BuffID.Poisoned, 120);
}
public override void OnHitPlayer(Player target, Player.HurtInfo info)
{
target.AddBuff(BuffID.Poisoned, 120);
}
public override void OnKill(int timeLeft)
{
for (int i = 0; i < 8; i++)
{
Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.SulfurousSeaAcid);
}
}
}
}