Files
CalamityModPublic/Projectiles/Rogue/Corrocloud1.cs
T
DominicKarma 5713fdab15 FUCKTON of content. See description for a list
Added Eternity, my dev weapon
Changed the Sulf Sea worldgen a bit (a wip, more sprites needed)
Added a ton of Acid Rain weapons and enemies
Added a ton of summon weapons
Added some early-game Sulf Sea weapons
2020-03-09 17:55:45 -05:00

58 lines
1.6 KiB
C#

using CalamityMod.Dusts;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
{
public class Corrocloud1 : 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.Calamity().rogue = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 8;
}
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(BuffID.CursedInferno, 120);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.CursedInferno, 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);
}
}
}
}