2 - True melee damage tooltip only displays on true melee weapons. 3 - True melee code adjustments to make it better.
42 lines
1.5 KiB
C#
42 lines
1.5 KiB
C#
using CalamityMod.Buffs.DamageOverTime;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
using CalamityMod.Projectiles.BaseProjectiles;
|
|
|
|
namespace CalamityMod.Projectiles.Melee.Spears
|
|
{
|
|
public class FulgurationHalberdProj : BaseSpearProjectile
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Fulguration Halberd");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
projectile.width = 40; //The width of the .png file in pixels divided by 2.
|
|
projectile.aiStyle = 19;
|
|
projectile.melee = true; //Dictates whether projectile is a melee-class weapon.
|
|
projectile.timeLeft = 90;
|
|
projectile.height = 40; //The height of the .png file in pixels divided by 2.
|
|
projectile.scale = 1.5f;
|
|
projectile.friendly = true;
|
|
projectile.hostile = false;
|
|
projectile.tileCollide = false;
|
|
projectile.ignoreWater = true;
|
|
projectile.penetrate = -1;
|
|
projectile.ownerHitCheck = true;
|
|
projectile.Calamity().trueMelee = true;
|
|
}
|
|
|
|
public override float InitialSpeed => 3f;
|
|
public override float ReelbackSpeed => 2.4f;
|
|
public override float ForwardSpeed => 0.95f;
|
|
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
|
{
|
|
target.immune[projectile.owner] = 8;
|
|
target.AddBuff(ModContent.BuffType<BurningBlood>(), 300);
|
|
}
|
|
}
|
|
}
|