Decimation_Mod/Content/Items/Weapons/VampiricEdge.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

62 lines
2.0 KiB
C#

using Decimation.Content.Items.Misc.Souls;
using Decimation.Content.Items.Weapons.Bloodshot;
using Decimation.Lib.Items;
using Decimation.Lib.Util;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Content.Items.Weapons
{
internal class VampiricEdge : DecimationWeapon
{
private readonly int shootDelay = 72;
private int _timeToShoot = 72;
protected override string ItemName => "Vampiric Edge";
protected override int Damages => 54;
protected override string Projectile => "Tooth";
protected override void InitWeapon()
{
item.width = 46;
item.height = 52;
item.crit = 6;
item.knockBack = 4.5f;
item.useTime = 20;
item.useAnimation = 20;
item.shootSpeed = 5f;
this.item.value = Item.buyPrice(0, 3);
item.rare = Rarity.Green.GetRarityValue();
item.autoReuse = true;
}
public override void UpdateInventory(Player player)
{
if (_timeToShoot > 0) _timeToShoot--;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY,
ref int type, ref int damage, ref float knockBack)
{
if (_timeToShoot > 0) return false;
_timeToShoot = shootDelay;
return base.Shoot(player, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack);
}
protected override ModRecipe GetRecipe()
{
ModRecipe recipe = GetNewModRecipe(this, 1, TileID.MythrilAnvil, true);
recipe.AddIngredient(ItemID.BloodButcherer);
recipe.AddIngredient(ModContent.ItemType<VampiricShiv>());
recipe.AddIngredient(ModContent.ItemType<SoulofTime>(), 10);
recipe.AddIngredient(ItemID.SoulofNight, 10);
return recipe;
}
}
}