61 lines
2.2 KiB
C#
61 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;
|
|
|
|
namespace ForgottenWawiTech.Content.Items.Armor.AvaliVanguardSet
|
|
{
|
|
[AutoloadEquip(EquipType.Head)]
|
|
public class AvaliVanguardMask : ModItem
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 18;
|
|
Item.height = 18;
|
|
Item.value = Item.sellPrice(gold: 50);
|
|
Item.rare = ModContent.RarityType<AvalianItem>();
|
|
Item.defense = 28;
|
|
}
|
|
|
|
public override void UpdateEquip(Player player)
|
|
{
|
|
player.GetDamage(DamageClass.Ranged) += 0.28f;
|
|
player.GetCritChance(DamageClass.Ranged) += 18;
|
|
player.statLifeMax2 += 75;
|
|
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+22% ranged damage and critical strike chance when above 75% health\n+10% damage reduction";
|
|
|
|
if ((float)player.statLife / player.statLifeMax2 >= 0.75f)
|
|
{
|
|
player.GetDamage(DamageClass.Ranged) += 0.22f;
|
|
player.GetCritChance(DamageClass.Ranged) += 22;
|
|
}
|
|
|
|
player.endurance += 0.10f;
|
|
// TODO: Implement hunting drone projectile system
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe()
|
|
.AddIngredient(ModContent.ItemType<AvaliFeather>(), 12)
|
|
.AddIngredient(ModContent.ItemType<EnergyCore>(), 8)
|
|
.AddIngredient(ModContent.ItemType<AvaliSkirmisherMask>(), 1)
|
|
.AddTile(ModContent.TileType<HighTechMarvel>())
|
|
.Register();
|
|
}
|
|
}
|
|
}
|