57 lines
2.0 KiB
C#
57 lines
2.0 KiB
C#
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using ForgottenWawiTech.Content.Items.Materials;
|
|
using ForgottenWawiTech.Content.Rarities;
|
|
using ForgottenWawiTech.Content.Tiles.CraftingStations;
|
|
using ForgottenWawiTech.Content.Players;
|
|
|
|
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: 100);
|
|
Item.rare = ModContent.RarityType<SingularityItem>();
|
|
Item.defense = 38;
|
|
}
|
|
|
|
public override void UpdateEquip(Player player)
|
|
{
|
|
player.GetDamage(DamageClass.Generic) += 0.15f;
|
|
player.GetCritChance(DamageClass.Generic) += 15;
|
|
player.endurance += 0.05f;
|
|
player.statLifeMax2 += 100;
|
|
|
|
}
|
|
|
|
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 = "Summons a singularity orb that fires energy beams at enemies\n+25% damage, +20% critical strike chance, and +15% damage reduction\nAllows you to walk on water";
|
|
player.GetDamage(DamageClass.Generic) += 0.25f;
|
|
player.GetCritChance(DamageClass.Generic) += 20;
|
|
player.endurance += 0.15f;
|
|
player.waterWalk = true;
|
|
player.GetModPlayer<SingularityPlayer>().EnableSingularityOrb();
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe()
|
|
.AddIngredient(ModContent.ItemType<ControlledSingularity>(), 8)
|
|
.AddIngredient(ModContent.ItemType<SingularityAlloy>(), 6)
|
|
.AddTile(ModContent.TileType<SingularitySealingUnit>())
|
|
.Register();
|
|
}
|
|
}
|
|
}
|