This commit formats the entire codebase according to `dotnet format` and its limited understanding of our provided `.editorconfig`.
44 lines
1.6 KiB
C#
44 lines
1.6 KiB
C#
using CalamityMod.Buffs.DamageOverTime;
|
|
using CalamityMod.Items.Weapons.Magic;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Projectiles.Magic
|
|
{
|
|
public class SparkInfernal : ModProjectile, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Projectiles.Magic";
|
|
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Projectile.width = 10;
|
|
Projectile.height = 10;
|
|
Projectile.friendly = true;
|
|
Projectile.penetrate = 1;
|
|
Projectile.timeLeft = 300;
|
|
Projectile.DamageType = DamageClass.Magic;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.Torch, Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f);
|
|
}
|
|
|
|
public override void OnKill(int timeLeft)
|
|
{
|
|
Player player = Main.player[Projectile.owner];
|
|
|
|
int infernadoDamage = (int)player.GetTotalDamage<MagicDamageClass>().ApplyTo(TheWand.BaseDamage);
|
|
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<InfernadoMarkFriendly>(), infernadoDamage, Projectile.knockBack, Projectile.owner);
|
|
}
|
|
|
|
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
|
{
|
|
target.AddBuff(ModContent.BuffType<Dragonfire>(), 120);
|
|
}
|
|
}
|
|
}
|