Files
CalamityModPublic/Projectiles/Rogue/InkCloud2.cs
T
Ozzatron ae1fa7bec5 Redid DR formula so that DR applies after vanilla defense.
Also moved AEW & Sepulcher DR to vanilla damage taken multiplier, and moved flat defense reductions for Calamity debuffs into their buff files.
Unified line endings and added extensions to get CalamityGlobalNPC and CalamityGlobalProjectile.

THIS WILL REQUIRE ENORMOUS AMOUNTS OF TESTING AND REBALANCING.
2019-10-07 19:40:40 -04:00

47 lines
1.3 KiB
C#

using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
{
public class InkCloud2 : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ink Cloud");
}
public override void SetDefaults()
{
projectile.width = 36;
projectile.height = 30;
projectile.friendly = true;
projectile.alpha = 0;
projectile.penetrate = -1;
projectile.tileCollide = true;
projectile.ignoreWater = true;
projectile.timeLeft = 100;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = -1;
Mod calamity = ModLoader.GetMod("CalamityMod");
projectile.GetGlobalProjectile<CalamityGlobalProjectile>(calamity).rogue = true;
}
public override void AI()
{
if (projectile.timeLeft < 50)
projectile.alpha += 5;
if (projectile.timeLeft < 75)
projectile.velocity *= 0.95f;
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
if (!target.friendly)
{
target.AddBuff(BuffID.Confused, 300);
}
}
}
}