31 lines
1.2 KiB
C#
31 lines
1.2 KiB
C#
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
namespace CalamityMod.Projectiles.Magic
|
|
{
|
|
public class SandstreamScepterExplosion : ModProjectile, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Projectiles.Magic";
|
|
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
|
public Player Owner => Main.player[Projectile.owner];
|
|
private static float ExplosionRadius = 112f;
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
//These shouldn't matter because its circular
|
|
Projectile.width = 112;
|
|
Projectile.height = 112;
|
|
Projectile.friendly = true;
|
|
Projectile.DamageType = RogueDamageClass.Instance;
|
|
Projectile.ignoreWater = true;
|
|
Projectile.tileCollide = false;
|
|
Projectile.penetrate = -1;
|
|
Projectile.timeLeft = 2;
|
|
Projectile.usesLocalNPCImmunity = true;
|
|
Projectile.localNPCHitCooldown = 10;
|
|
}
|
|
|
|
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, ExplosionRadius, targetHitbox);
|
|
}
|
|
}
|