65 lines
2.6 KiB
C#
65 lines
2.6 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.Items.Armor.ProtogenOperativeSet;
|
|
|
|
namespace ForgottenWawiTech.Content.Items.Armor.ProtogenSentinelSet
|
|
{
|
|
[AutoloadEquip(EquipType.Head)]
|
|
public class ProtogenSentinelHood : ModItem
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 18;
|
|
Item.height = 18;
|
|
Item.value = Item.sellPrice(gold: 60);
|
|
Item.rare = ModContent.RarityType<ProtogenItem>();
|
|
Item.defense = 26;
|
|
}
|
|
|
|
public override void UpdateEquip(Player player)
|
|
{
|
|
player.GetDamage(DamageClass.Magic) += 0.32f;
|
|
player.statManaMax2 += 150;
|
|
player.manaCost -= 0.20f;
|
|
player.GetCritChance(DamageClass.Magic) += 12;
|
|
player.endurance += 0.06f;
|
|
}
|
|
|
|
public override bool IsArmorSet(Item head, Item body, Item legs)
|
|
{
|
|
return body.type == ModContent.ItemType<ProtogenSentinelChestplate>() && legs.type == ModContent.ItemType<ProtogenSentinelLeggings>();
|
|
}
|
|
|
|
public override void UpdateArmorSet(Player player)
|
|
{
|
|
player.setBonus = "Summons an AI core that fires adaptive energy beams\nProjectiles have a 20% chance to split into seeking fragments\n+25% magic damage and -22% mana cost\nGrants immunity to most debuffs";
|
|
player.GetDamage(DamageClass.Magic) += 0.25f;
|
|
player.manaCost -= 0.22f;
|
|
player.buffImmune[BuffID.Poisoned] = true;
|
|
player.buffImmune[BuffID.OnFire] = true;
|
|
player.buffImmune[BuffID.Bleeding] = true;
|
|
player.buffImmune[BuffID.Confused] = true;
|
|
player.buffImmune[BuffID.Slow] = true;
|
|
player.buffImmune[BuffID.Weak] = true;
|
|
player.buffImmune[BuffID.Silenced] = true;
|
|
player.buffImmune[BuffID.Cursed] = true;
|
|
// TODO: Implement AI core projectile and splitting projectile system
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe()
|
|
.AddIngredient(ModContent.ItemType<MalfunctioningNanites>(), 14)
|
|
.AddIngredient(ModContent.ItemType<EnergyCore>(), 8)
|
|
.AddIngredient(ModContent.ItemType<ProtogenOperativeHood>(), 1)
|
|
.AddIngredient(ItemID.Wire, 20)
|
|
.AddTile(ModContent.TileType<HighTechMarvel>())
|
|
.Register();
|
|
}
|
|
}
|
|
}
|