Files
CalamityModPublic/Projectiles/Enemy/NuclearToadGoo.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

52 lines
1.7 KiB
C#

using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Dusts;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Enemy
{
public class NuclearToadGoo : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Goop");
Main.projFrames[projectile.type] = 3;
}
public override void SetDefaults()
{
projectile.width = 18;
projectile.height = 18;
projectile.hostile = true;
projectile.timeLeft = 600;
projectile.tileCollide = true;
projectile.ignoreWater = false;
}
public override void AI()
{
if (projectile.localAI[0] == 0f)
{
projectile.frame = Main.rand.Next(3);
projectile.localAI[0] = 1f;
}
if (projectile.velocity.Y < 10f)
projectile.velocity.Y += 0.175f;
}
public override void OnHitPlayer(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
}
public override void Kill(int timeLeft)
{
for (int i = 0; i <= 4; i++)
{
int idx = Dust.NewDust(projectile.position, 8, 8, (int)CalamityDusts.SulfurousSeaAcid, 0, 0, 0, default, 0.75f);
Main.dust[idx].noGravity = true;
Main.dust[idx].velocity *= 3f;
idx = Dust.NewDust(projectile.position, 8, 8, (int)CalamityDusts.SulfurousSeaAcid, 0, 0, 0, default, 0.75f);
Main.dust[idx].noGravity = true;
Main.dust[idx].velocity *= 3f;
}
}
}
}