Files
CalamityModPublic/Projectiles/Typeless/NebulaDust.cs
T
Andrew Marheine fedb78ef74 1 - Nerfed Nebulous Core star damage.
2 - Nerfed Cosmic Discharge damage by 50%.
3 - Fixed Exo Mech animation speeds and adjusted all attacks linked to them accordingly.
4 - Added more logic to prevent exo mechs respawning after they're killed in the fight.
5 - Adjusted exo mech lighting with opacity.
6 - Moved exo mech despawn code around so it doesn't fuck shit up.
7 - Ares Laser Cannon deathray attack moves faster in higher difficulties.
8 - Ares despawns old tesla orbs when it starts firing a new volley.
9 - T Hanos segments take 1.1x damage while vulnerable.
10 - T Hanos segments make the DoG head hit sound while vulnerable.
11 - Added more exceptions for the new pierce resist mechanic.
12 - Ares arms no longer give Rage.
13 - Ares uses the new pierce resist.
It is 3:30 am, if I made any mistakes I am sorry but fucking hell.
2021-09-13 03:24:48 -05:00

72 lines
2.2 KiB
C#

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Typeless
{
public class NebulaDust : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Dust");
}
public override void SetDefaults()
{
projectile.width = 32;
projectile.height = 32;
projectile.friendly = true;
projectile.Opacity = 0f;
projectile.penetrate = -1;
projectile.tileCollide = false;
projectile.ignoreWater = true;
projectile.timeLeft = 3600;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 3;
}
public override void AI()
{
projectile.rotation += projectile.velocity.X * 0.02f;
if (projectile.velocity.X < 0f)
projectile.rotation -= Math.Abs(projectile.velocity.Y) * 0.02f;
else
projectile.rotation += Math.Abs(projectile.velocity.Y) * 0.02f;
projectile.velocity *= 0.98f;
projectile.ai[0] += 1f;
if (projectile.ai[0] >= 60f)
{
if (projectile.Opacity > 0f)
{
projectile.Opacity -= 0.02f;
if (projectile.Opacity < 0f)
projectile.Opacity = 0f;
}
else if (projectile.owner == Main.myPlayer)
projectile.Kill();
}
else if (projectile.Opacity < 0.7f)
{
projectile.Opacity += 0.1f;
if (projectile.Opacity > 0.7f)
projectile.Opacity = 0.7f;
}
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
lightColor.R = (byte)(255 * projectile.Opacity);
lightColor.G = (byte)(255 * projectile.Opacity);
lightColor.B = (byte)(255 * projectile.Opacity);
CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1);
return false;
}
}
}