48 lines
1.5 KiB
C#
48 lines
1.5 KiB
C#
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using ForgottenWawiTech.Content.Items.Materials;
|
|
using ForgottenWawiTech.Content.Rarities;
|
|
|
|
namespace ForgottenWawiTech.Content.Items.Armor.SingularitySet
|
|
{
|
|
[AutoloadEquip(EquipType.Head)]
|
|
public class SingularityHelmet : ModItem
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 18;
|
|
Item.height = 18;
|
|
Item.value = Item.sellPrice(gold: 5);
|
|
Item.rare = ModContent.RarityType<SingularityItem>();
|
|
Item.defense = 18;
|
|
}
|
|
|
|
public override void UpdateEquip(Player player)
|
|
{
|
|
player.GetDamage(DamageClass.Generic) += 0.15f;
|
|
player.GetCritChance(DamageClass.Generic) += 10;
|
|
}
|
|
|
|
public override bool IsArmorSet(Item head, Item body, Item legs)
|
|
{
|
|
return body.type == ModContent.ItemType<SingularityChestplate>() && legs.type == ModContent.ItemType<SingularityLeggings>();
|
|
}
|
|
|
|
public override void UpdateArmorSet(Player player)
|
|
{
|
|
player.setBonus = "Increased damage and critical strike chance\n+20% damage\n+15% critical strike chance";
|
|
player.GetDamage(DamageClass.Generic) += 0.20f;
|
|
player.GetCritChance(DamageClass.Generic) += 15;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe()
|
|
.AddIngredient(ModContent.ItemType<ControlledSingularity>(), 12)
|
|
.AddTile(TileID.MythrilAnvil)
|
|
.Register();
|
|
}
|
|
}
|
|
}
|