This commit formats the entire codebase according to `dotnet format` and its limited understanding of our provided `.editorconfig`.
43 lines
1.3 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|