43 lines
1.4 KiB
C#
43 lines
1.4 KiB
C#
using CalamityMod.Buffs.DamageOverTime;
|
|
using CalamityMod.Dusts;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
namespace CalamityMod.Projectiles.Summon
|
|
{
|
|
public class AngelOrb : ModProjectile
|
|
{
|
|
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
|
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Orb");
|
|
ProjectileID.Sets.MinionShot[projectile.type] = true;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
projectile.width = 14;
|
|
projectile.height = 14;
|
|
projectile.friendly = true;
|
|
projectile.ignoreWater = true;
|
|
projectile.alpha = 255;
|
|
projectile.penetrate = -1;
|
|
projectile.timeLeft = 30;
|
|
projectile.minion = true;
|
|
projectile.minionSlots = 0f;
|
|
projectile.usesLocalNPCImmunity = true;
|
|
projectile.localNPCHitCooldown = 10;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 150f, 3f, 6f, 2, ModContent.ProjectileType<AngelBolt>(), 1D, true);
|
|
}
|
|
|
|
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => target.AddBuff(ModContent.BuffType<BanishingFire>(), 300);
|
|
|
|
public override void OnHitPvp(Player target, int damage, bool crit) => target.AddBuff(ModContent.BuffType<BanishingFire>(), 300);
|
|
}
|
|
}
|