Decimation_Mod/Content/Projectiles/Boss/BloodshotEye/BloodBeam.cs
FyloZ 0cf76d5270 Organized projectiles.
Updated The Mind trinity item.
2020-07-14 22:31:26 -04:00

56 lines
1.7 KiB
C#

using Decimation.Content.Buffs.Buffs;
using Decimation.Content.Dusts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Decimation.Content.Buffs.Debuffs;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Content.Projectiles.Boss.BloodshotEye
{
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;
projectile.friendly = false;
}
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);
Terraria.NPC bloodshotEye = Main.npc[(int)projectile.ai[0]];
bloodshotEye.life += damages;
bloodshotEye.HealEffect(damages);
}
}
}