Files
CalamityModPublic/Projectiles/Typeless/PendantProjectile3.cs
T
Andrew Marheine 925f6f0247 1 - Bosses are now affected by slowing debuffs but gain a 20 second immunity to them after they wear off.
2 - Reduced the duration of most slowing debuffs.
3 - Cal Clone Soul Seekers cannot fire while she's doing a bullet hell.
4 - Reworked enemy and boss debuff immunities to make more sense.
5 - Increased Aquatic Scourge and Desert Scourge HP because they're now vulnerable to debuffs.
6 - Reduced the damage of Bloodflare ranged set bonus phantoms.
7 - Adjusted DoG's fireball explosion spread.
8 - Leviathan hitboxes should work properly now.
9 - Sun Bats no longer derp out.
2021-05-18 00:57:06 -05:00

51 lines
1.8 KiB
C#

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Buffs.StatDebuffs;
namespace CalamityMod.Projectiles.Typeless
{
public class PendantProjectile3 : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Prism Shard");
}
public override void SetDefaults()
{
projectile.width = 14;
projectile.height = 14;
projectile.friendly = true;
projectile.ignoreWater = true;
projectile.timeLeft = 220;
projectile.penetrate = 1;
projectile.tileCollide = false;
}
public override void AI()
{
CalamityGlobalProjectile.HomeInOnNPC(projectile, true, 200f, 10f, 20f);
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.2f / 255f, (255 - projectile.alpha) * 0.2f / 255f);
projectile.rotation += projectile.velocity.X * 1.25f;
for (int num457 = 0; num457 < 5; num457++)
{
int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 187, 0f, 0f, 100, default, 0.6f);
Main.dust[num458].noGravity = true;
Main.dust[num458].velocity *= 0.5f;
Main.dust[num458].velocity += projectile.velocity * 0.1f;
}
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<Eutrophication>(), 60);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<Eutrophication>(), 60);
}
}
}