Files
CalamityModPublic/Projectiles/Rogue/EquanimityLightShard.cs
T
Ozzatron 31f396d29b 1 - Replaced AverageDamage with "best class damage"
2 - Shield slams scale with melee instead of anything
3 - A few things scale with summon instead of anything, like Demonshade Red Devil
4 - Hide of Astrum Deus scales with melee instead of anything
5 - Other minor pedantic scaling changes
6 - Hundreds of compile errors
2022-05-22 19:13:21 -04:00

61 lines
1.6 KiB
C#

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using Terraria.Audio;
namespace CalamityMod.Projectiles.Rogue
{
public class EquanimityLightShard : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Light Shard");
}
public override void SetDefaults()
{
Projectile.width = 12;
Projectile.height = 14;
Projectile.friendly = true;
Projectile.ignoreWater = true;
Projectile.alpha = 0;
Projectile.penetrate = 3;
Projectile.tileCollide = true;
Projectile.timeLeft = 120;
Projectile.DamageType = RogueDamageClass.Instance;
}
public override void AI()
{
Projectile.velocity.Y += 0.1f;
Projectile.rotation += 0.4f * Projectile.direction;
if (Projectile.timeLeft < 51)
{
Projectile.alpha += 5;
}
}
public override bool? CanHitNPC(NPC target)
{
if (Projectile.timeLeft < 130)
{
return null;
}
else
{
return false;
}
}
public override bool OnTileCollide(Vector2 oldVelocity)
{
Collision.HitTiles(Projectile.position + Projectile.velocity, Projectile.velocity, Projectile.width, Projectile.height);
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
Projectile.Kill();
return true;
}
}
}