62 lines
2.2 KiB
C#
62 lines
2.2 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.AvaliSkirmisherSet;
|
|
using ForgottenWawiTech.Content.Players;
|
|
|
|
namespace ForgottenWawiTech.Content.Items.Armor.AvaliVanguardSet
|
|
{
|
|
[AutoloadEquip(EquipType.Head)]
|
|
public class AvaliVanguardCowl : ModItem
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 18;
|
|
Item.height = 18;
|
|
Item.value = Item.sellPrice(gold: 50);
|
|
Item.rare = ModContent.RarityType<AvalianItem>();
|
|
Item.defense = 26;
|
|
}
|
|
|
|
public override void UpdateEquip(Player player)
|
|
{
|
|
player.GetDamage(DamageClass.Summon) += 0.28f;
|
|
player.maxMinions += 3;
|
|
player.statLifeMax2 += 70;
|
|
player.endurance += 0.05f;
|
|
}
|
|
|
|
public override bool IsArmorSet(Item head, Item body, Item legs)
|
|
{
|
|
return body.type == ModContent.ItemType<AvaliVanguardChestplate>() && legs.type == ModContent.ItemType<AvaliVanguardLeggings>();
|
|
}
|
|
|
|
public override void UpdateArmorSet(Player player)
|
|
{
|
|
player.setBonus = "Summons a pack of hunting drones that rapidly fire at nearby enemies\n+3 max minions and +25% summon damage when above 75% health\n+10% damage reduction";
|
|
|
|
if ((float)player.statLife / player.statLifeMax2 >= 0.75f)
|
|
{
|
|
player.maxMinions += 3;
|
|
player.GetDamage(DamageClass.Summon) += 0.25f;
|
|
}
|
|
|
|
player.endurance += 0.10f;
|
|
player.GetModPlayer<AvaliVanguardPlayer>().EnableHuntingDrones();
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe()
|
|
.AddIngredient(ModContent.ItemType<AvaliFeather>(), 12)
|
|
.AddIngredient(ModContent.ItemType<EnergyCore>(), 8)
|
|
.AddIngredient(ModContent.ItemType<AvaliSkirmisherCowl>(), 1)
|
|
.AddTile(ModContent.TileType<HighTechMarvel>())
|
|
.Register();
|
|
}
|
|
}
|
|
}
|