Decimation_Mod/Content/Projectiles/BloodBeam.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

54 lines
1.6 KiB
C#

using Decimation.Content.Buffs.Debuffs;
using Decimation.Content.Dusts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Content.Projectiles
{
internal class BloodBeam : DecimationProjectile
{
public override string Texture => "Terraria/Projectile_" + ProjectileID.CursedFlameHostile;
protected override void Init()
{
projectile.width = 26;
projectile.height = 26;
projectile.aiStyle = -1;
projectile.penetrate = -1;
projectile.alpha = 255;
projectile.timeLeft = 40;
projectile.tileCollide = false;
projectile.ignoreWater = true;
Damages = 25;
projectile.hostile = true;
}
public override void AI()
{
projectile.velocity.Y += (60 - projectile.timeLeft) * 0.005f;
Dust.NewDust(projectile.position, 26, 26, ModContent.DustType<Blood>());
}
public override void OnHitPlayer(Player target, int damage, bool crit)
{
if (Main.expertMode)
target.AddBuff(ModContent.BuffType<Slimed>(), 600);
int damages = Main.rand.Next(5, 11);
target.Hurt(PlayerDeathReason.LegacyDefault(), damages, 0);
NPC bloodshotEye = Main.npc[(int)projectile.ai[0]];
bloodshotEye.life += damages;
bloodshotEye.HealEffect(damages);
}
}
}