- Various dye slot changes for accessory/armor dust spawning - Lab Hologram Projectors can now face left or right - Dragonblood Disgorger minor tooltip changes - Nuclear Rod renamed to Nuclear Fuel Rod - Graveyard enemies can now drop Blood Orbs - Nadir now uses Auric Bars and is buffed accordingly - [1.4.4 fix] Fixed typical spear AI prematurely expiring - [1.4.4 fix] Fixed Wulfrum Blunderbuss ammo text being misplaced
49 lines
1.7 KiB
C#
49 lines
1.7 KiB
C#
using CalamityMod.Projectiles.BaseProjectiles;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Projectiles.Melee.Spears
|
|
{
|
|
public class GildedProboscisProj : BaseSpearProjectile
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Projectile.width = Projectile.height = 40;
|
|
Projectile.DamageType = TrueMeleeDamageClass.Instance;
|
|
Projectile.timeLeft = 90;
|
|
Projectile.friendly = true;
|
|
Projectile.hostile = false;
|
|
Projectile.tileCollide = false;
|
|
Projectile.ignoreWater = true;
|
|
Projectile.penetrate = -1;
|
|
Projectile.ownerHitCheck = true;
|
|
Projectile.usesLocalNPCImmunity = true;
|
|
Projectile.localNPCHitCooldown = 4;
|
|
}
|
|
|
|
// These numbers sure are common, huh? yeah, they are
|
|
public override float InitialSpeed => 3f;
|
|
public override float ReelbackSpeed => 2.4f;
|
|
public override float ForwardSpeed => 0.95f;
|
|
public override void ExtraBehavior()
|
|
{
|
|
if (Main.rand.NextBool(4))
|
|
{
|
|
int num = Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, 60, Projectile.direction * 2, 0f, 150, default, 1f);
|
|
Main.dust[num].noGravity = true;
|
|
}
|
|
}
|
|
|
|
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
|
{
|
|
if (!target.canGhostHeal || Main.player[Projectile.owner].moonLeech)
|
|
return;
|
|
|
|
Player player = Main.player[Projectile.owner];
|
|
player.statLife += 1;
|
|
player.HealEffect(1);
|
|
}
|
|
}
|
|
}
|