Files
CalamityModPublic/Projectiles/Rogue/Corrocloud3.cs
T
Ozzatron 31f396d29b 1 - Replaced AverageDamage with "best class damage"
2 - Shield slams scale with melee instead of anything
3 - A few things scale with summon instead of anything, like Demonshade Red Devil
4 - Hide of Astrum Deus scales with melee instead of anything
5 - Other minor pedantic scaling changes
6 - Hundreds of compile errors
2022-05-22 19:13:21 -04:00

58 lines
1.7 KiB
C#

using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Dusts;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
{
public class Corrocloud3 : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Corrocloud");
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, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
}
public override void Kill(int timeLeft)
{
for (int i = 0; i < 8; i++)
{
Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.SulfurousSeaAcid);
}
}
}
}