Functional Changes: - Ontological Despoiler Negative charge 2 takes longer and deals more damage - Polaris Parrotfish's fire rate now scales with distance to the enemy and is not capped at two shots on screen at a time. various stats like range and damage were adjusted - Sprouting arrows velocity is now unaffected by bow shoot velocity, this fixes some issues high velocity bows has with these arrows - Cinder arrow shards fly out further and the arrow itself now inflicts brimflames Fixed The first dash hitbox of Slagsplitter dealing less damage than intended Fixed Telluric Glare firing normal arrows from far behind it (Hopefully) Fixed Holy Collider being able to fit spawned flares as they spawn when you have low melee speed. Non-functional Changes: - Visuals for Polaris Parrotfish, Sprouting Arrows, Hyperius Bullets, Holy Collider, Slagsplitter Pauldron, and Cinder Arrows. tiny visual change for Earth Meteors and screenshake for artifact of resilience. new Sounds for Slagsplitter Pauldron and sound overhaul for Ontological Despoiler.
60 lines
2.5 KiB
C#
60 lines
2.5 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)
|
|
{
|
|
if (target.CanBeMoved(true))
|
|
{
|
|
// Custom knockback
|
|
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld) * 15;
|
|
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f);
|
|
}
|
|
}
|
|
|
|
public override bool? CanCutTiles() => false;
|
|
}
|
|
}
|