54 lines
1.8 KiB
C#
54 lines
1.8 KiB
C#
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using ForgottenWawiTech.Content.Items.Materials;
|
|
using ForgottenWawiTech.Content.Rarities;
|
|
using ForgottenWawiTech.Content.Tiles.CraftingStations;
|
|
|
|
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(platinum: 500);
|
|
Item.rare = ModContent.RarityType<SingularityItem>();
|
|
Item.defense = 100;
|
|
}
|
|
|
|
public override void UpdateEquip(Player player)
|
|
{
|
|
player.GetDamage(DamageClass.Generic) += 0.5f;
|
|
player.GetCritChance(DamageClass.Generic) += 100;
|
|
player.endurance += 0.10f;
|
|
player.statLifeMax2 += 500;
|
|
|
|
}
|
|
|
|
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 = "Every hit is a guaranteed critical hit.\nIncreases defense by 50% and allows you to walk on water.";
|
|
player.GetCritChance(DamageClass.Generic) = 1000;
|
|
player.waterWalk = true;
|
|
player.statDefense *= 1.5f;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe()
|
|
.AddIngredient(ModContent.ItemType<ControlledSingularity>(), 12)
|
|
.AddIngredient(ModContent.ItemType<SingularityAlloy>(), 8)
|
|
.AddTile(ModContent.TileType<SingularitySealingUnit>())
|
|
.Register();
|
|
}
|
|
}
|
|
}
|