Finished the Hour Hand.

This commit is contained in:
FyloZ 2020-07-06 21:22:34 -04:00
parent c6ec7a0208
commit 5b23355b93

View File

@ -1,5 +1,8 @@
using System.Collections.Generic;
using Decimation.Content.Items.Misc.Souls;
using Decimation.Content.Projectiles.DuneWyrm; using Decimation.Content.Projectiles.DuneWyrm;
using Decimation.Lib.Items; using Decimation.Lib.Items;
using Decimation.Lib.Util.Builder;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Terraria; using Terraria;
using Terraria.ID; using Terraria.ID;
@ -9,6 +12,8 @@ namespace Decimation.Content.Items.Weapons
{ {
public class HourHand : DecimationWeapon public class HourHand : DecimationWeapon
{ {
private const int ManaCost = 20;
protected override string ItemName => "Hour Hand"; protected override string ItemName => "Hour Hand";
protected override string ItemTooltip => "The sands of time flow in your favor!"; protected override string ItemTooltip => "The sands of time flow in your favor!";
protected override int Damages => 45; protected override int Damages => 45;
@ -21,21 +26,50 @@ namespace Decimation.Content.Items.Weapons
item.useTime = 28; item.useTime = 28;
item.useAnimation = 28; item.useAnimation = 28;
item.knockBack = 5; item.knockBack = 5;
item.value = Item.buyPrice(gold: 1); item.value = Item.buyPrice(gold: 4, silver: 70);
item.rare = 2; item.rare = 2;
item.crit = 7; item.crit = 7;
item.shootSpeed = 10f; item.shootSpeed = 10f;
item.autoReuse = true; item.autoReuse = true;
} }
protected override List<ModRecipe> GetRecipes()
{
return new List<ModRecipe>
{
new RecipeBuilder(this)
.WithIngredient(ItemID.AncientBattleArmorMaterial)
.WithIngredient(ItemID.EnchantedSword)
.WithIngredient(ModContent.ItemType<SoulofTime>(), 10)
.WithIngredient(ItemID.GoldBar, 5)
.WithStation(TileID.MythrilAnvil)
.Build(),
new RecipeBuilder(this)
.WithIngredient(ItemID.AncientBattleArmorMaterial)
.WithIngredient(ItemID.EnchantedSword)
.WithIngredient(ModContent.ItemType<SoulofTime>(), 10)
.WithIngredient(ItemID.PlatinumBar, 5)
.WithStation(TileID.MythrilAnvil)
.Build()
};
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage,
ref float knockBack) ref float knockBack)
{ {
if (Main.rand.NextBool()) player.AddBuff(BuffID.Swiftness, 300); if (Main.rand.NextBool()) player.AddBuff(BuffID.Swiftness, 300);
if (player.statMana - ManaCost < 0) return false;
player.statMana -= ManaCost;
return true; return true;
} }
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
{
if (Main.rand.NextBool()) target.AddBuff(BuffID.Slow, 300);
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit) public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit)
{ {
if (Main.rand.NextBool()) target.AddBuff(BuffID.Slow, 300); if (Main.rand.NextBool()) target.AddBuff(BuffID.Slow, 300);