Decimation_Mod/Content/Items/Misc/HyperStar.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

46 lines
1.3 KiB
C#

using Decimation.Lib.Items;
using Decimation.Lib.Util.Builder;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Content.Items.Misc
{
internal class HyperStar : DecimationItem
{
public static readonly int ManaHealAmount = 10;
protected override string ItemName => "Hyper Star";
protected override string ItemTooltip => "Adds 10 to maximum mana";
protected override void Init()
{
this.item.CloneDefaults(ItemID.ManaCrystal);
}
public override bool CanUseItem(Player player)
{
return player.statManaMax >= 200 && player.GetModPlayer<DecimationPlayer>().hyperStars < 10;
}
public override bool UseItem(Player player)
{
player.statManaMax2 += ManaHealAmount;
player.GetModPlayer<DecimationPlayer>().hyperStars++;
if (Main.myPlayer == player.whoAmI) player.ManaEffect(ManaHealAmount);
return true;
}
protected override ModRecipe GetRecipe()
{
return new RecipeBuilder(this.mod, this)
.WithIngredient(ItemID.ManaCrystal)
.WithIngredient(ItemID.SoulofMight)
.WithIngredient(ItemID.SoulofLight)
.WithStation(TileID.MythrilAnvil)
.Build();
}
}
}