Files
CalamityModPublic/Projectiles/Typeless/PauldronExplosion.cs
T
Xyk 3cbac9086f Dashes, dashes, and more dashes
Flame licked shell is no longer a flame empowering dash accessory
A modified version of the effect is now on a new accessory called Slagsplitter Pauldron

Gehenna is gone

Ornate Shield, Asguardian Aegis, Void Sash, and God Slayer Dash have all had their visuals significantly tweaked. outside of Void Sash's scythes no longer spawning directly behind the player, there were no functional changes to these dash adjustments
2023-09-20 02:22:28 -07:00

56 lines
2.3 KiB
C#

using System;
using CalamityMod.Dusts;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Typeless
{
public class PauldronExplosion : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Typeless";
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
public Player Owner => Main.player[Projectile.owner];
private static float ExplosionRadius = 150f;
public override void SetDefaults()
{
//These shouldn't matter because its circular
Projectile.width = 150;
Projectile.height = 150;
Projectile.friendly = true;
Projectile.DamageType = AverageDamageClass.Instance;
Projectile.ignoreWater = true;
Projectile.tileCollide = false;
Projectile.penetrate = -1;
Projectile.timeLeft = 2;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = -1;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.OnFire3, 240);
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.OrangeRed, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0f, Main.rand.NextFloat(0.8f, 1.1f), 20);
GeneralParticleHandler.SpawnParticle(pulse);
Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.DarkOrange, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0f, Main.rand.NextFloat(0.6f, 0.9f), 20);
GeneralParticleHandler.SpawnParticle(pulse2);
}
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, ExplosionRadius, targetHitbox);
public override bool? CanDamage() => base.CanDamage();
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
{
modifiers.HitDirectionOverride = Math.Sign(Owner.direction);
}
public override bool? CanCutTiles() => false;
}
}