Files
CalamityModPublic/Projectiles/Magic/Shaderain.cs
T
Xyk 279ce5d42e Added Brain Rot
Brain rot is the counterpart debuff to Burning Blood
Removed shadowflame from Hive minds clouds and replaced it with Brain Rot
Added Shadowflame to all of the Hive mind drops
Adjusted some Burning Blood durations to fit the new Brain Rot ones
Tweaked some more debuff visuals, mostly so the effects that scale with npc size don't go as mental as they did before on huge targets
2023-09-24 01:38:12 -07:00

43 lines
1.3 KiB
C#

using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Items.Weapons.Magic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Magic
{
public class Shaderain : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Magic";
public override string Texture => "CalamityMod/Projectiles/Magic/AuraRain";
public override void SetDefaults()
{
Projectile.timeLeft = 600;
Projectile.width = 20;
Projectile.height = 20;
Projectile.netImportant = true;
Projectile.friendly = true;
Projectile.ignoreWater = true;
Projectile.DamageType = DamageClass.Magic;
}
public override void AI()
{
// The projectile will fall.
Projectile.velocity.Y += ShaderainStaff.GravityStrenght;
// The projectile will look towards where it's going.
Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2;
Projectile.netUpdate = true;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<BrainRot>(), 120);
}
}
}