Decimation_Mod/Content/Projectiles/Stinger.cs
FyloZ ec4585bed5 - Changed Bloodshot Eye's music to Boss 1 Orchestra ( https://www.youtube.com/watch?time_continue=120&v=r-9nKGc85FQ )
- Added support for animated projectiles
- Refactoring
- Removed useless fields
- Fixed swords not dealing damages
- Added Hour Hand (from Evie's PR)
2020-03-21 00:11:07 -04:00

37 lines
1.1 KiB
C#

using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Content.Projectiles
{
internal class Stinger : DecimationProjectile
{
protected override void Init()
{
projectile.width = 10;
projectile.height = 18;
projectile.tileCollide = true;
projectile.penetrate = 2;
projectile.timeLeft = 200;
projectile.extraUpdates = 1;
projectile.ignoreWater = false;
}
public override void AI() //this make that the projectile will face the corect way
{ // |
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
if (Main.rand.Next(2) == 0)
{
target.AddBuff(BuffID.Poisoned, 100);
}
}
}
}