Files
CalamityModPublic/Projectiles/Melee/Spears/SpatialLanceProjectile.cs
T
Andrew Marheine 7a6ae6a0bc 1 - Elemental Gauntlet, Samurai Badge, Yharim's Insignia, Titan Glove, Power Glove, Molten Armor and Mechanical Glove boost true melee damage.
2 - Hide of Astrum Deus true melee boost reduced to 100% from 200%.
3 - Plaguebringer Goliath fixes.
4 - Queen Bee rev+ fixes.
5 - Ravager fixes.
6 - Astrum Aureus fixes.
7 - Slime God Core transitions to final phase later so it doesn't drag on for as long.
8 - SCal, Retinazer phase 2 and Calamitas Clone are easier to hit with true melee.
9 - Yharon fixes.
10 - Brimstone Elemental fixes.
11 - Plantera changes (untested because I'm a dumbass).
12 - Death Mode lightning vanishes more quickly so players almost never accidentally walk into it after the lighting bolt comes down.
13 - Dark Spark beam damage change.
14 - Return of the True Melee Projectile List to make True Melee things easier to do.
2020-06-11 11:53:49 -05:00

61 lines
2.5 KiB
C#

using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Projectiles.BaseProjectiles;
namespace CalamityMod.Projectiles.Melee.Spears
{
public class SpatialLanceProjectile : BaseSpearProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Lance");
}
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 this is a melee-class weapon.
projectile.timeLeft = 90;
projectile.height = 40; //The height of the .png file in pixels divided by 2.
projectile.friendly = true;
projectile.hostile = false;
projectile.tileCollide = false;
projectile.ignoreWater = true;
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 3;
//projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
public override float ReelbackSpeed => 1.1f;
public override float ForwardSpeed => 0.6f;
public override Action<Projectile> EffectBeforeReelback => (proj) =>
{
Projectile.NewProjectile(projectile.Center.X + projectile.velocity.X, projectile.Center.Y + projectile.velocity.Y,
projectile.velocity.X, projectile.velocity.Y, ModContent.ProjectileType<SpatialSpear>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
};
public override void ExtraBehavior()
{
if (Main.rand.NextBool(5))
{
int idx = Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 66, projectile.direction * 2, 0f, 150, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f);
Main.dust[idx].noGravity = true;
}
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
target.AddBuff(ModContent.BuffType<Plague>(), 120);
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
}
}
}