Nerfed Umbraphile armor's explosions (esp considering how they can get crazy with DoT boosting) Rebalanced Scourge of the Seas so its less of an armor pen monster and stealth is now viable.
86 lines
2.7 KiB
C#
86 lines
2.7 KiB
C#
using CalamityMod.Buffs.DamageOverTime;
|
|
using System;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Projectiles.Rogue
|
|
{
|
|
public class ScourgeVenomCloud : ModProjectile
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Venom Cloud");
|
|
Main.projFrames[Projectile.type] = 10;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Projectile.width = 45;
|
|
Projectile.height = 45;
|
|
Projectile.friendly = true;
|
|
Projectile.penetrate = -1;
|
|
Projectile.alpha = 255;
|
|
Projectile.tileCollide = false;
|
|
Projectile.ignoreWater = true;
|
|
Projectile.timeLeft = 3600;
|
|
Projectile.usesLocalNPCImmunity = true;
|
|
Projectile.localNPCHitCooldown = 45;
|
|
Projectile.DamageType = RogueDamageClass.Instance;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
Projectile.ai[0] += 1f;
|
|
Projectile.frameCounter++;
|
|
if (Projectile.frameCounter > 6)
|
|
{
|
|
Projectile.frame++;
|
|
Projectile.frameCounter = 0;
|
|
}
|
|
if (Projectile.ai[0] < 219f) //255 - frameCounter tick * number of disippation frames
|
|
{
|
|
if (Projectile.frame >= 4)
|
|
{
|
|
Projectile.frame = 0;
|
|
}
|
|
}
|
|
else if (Projectile.owner == Main.myPlayer && Projectile.frame >= Main.projFrames[Projectile.type])
|
|
{
|
|
Projectile.Kill();
|
|
}
|
|
Projectile.velocity *= 0.98f;
|
|
if (Projectile.alpha > 110)
|
|
{
|
|
Projectile.alpha -= 30;
|
|
if (Projectile.alpha < 110)
|
|
{
|
|
Projectile.alpha = 110;
|
|
}
|
|
}
|
|
if (Math.Abs(Projectile.velocity.X) > 0.1f)
|
|
{
|
|
Projectile.spriteDirection = -Projectile.direction;
|
|
}
|
|
}
|
|
|
|
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
|
{
|
|
target.AddBuff(BuffID.Venom, 120);
|
|
if (Projectile.ai[1] == 1f && Projectile.owner == Main.myPlayer) //stealth strike attack
|
|
{
|
|
target.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 120);
|
|
}
|
|
}
|
|
|
|
public override void OnHitPvp(Player target, int damage, bool crit)
|
|
{
|
|
target.AddBuff(BuffID.Venom, 120);
|
|
if (Projectile.ai[1] == 1f && Projectile.owner == Main.myPlayer) //stealth strike attack
|
|
{
|
|
target.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 120);
|
|
}
|
|
}
|
|
}
|
|
}
|