77 lines
2.7 KiB
C#
77 lines
2.7 KiB
C#
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Items.Materials;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Armor
|
|
{
|
|
[AutoloadEquip(EquipType.Head)]
|
|
public class TarragonHornedHelm : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Tarragon Horned Helm");
|
|
Tooltip.SetDefault("Temporary immunity to lava and immunity to cursed inferno, fire, cursed, and chilled debuffs\n" +
|
|
"Can move freely through liquids\n" +
|
|
"5% increased damage reduction and +3 max minions");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 18;
|
|
item.height = 18;
|
|
item.value = Item.buyPrice(0, 50, 0, 0);
|
|
item.defense = 3; //98
|
|
item.Calamity().postMoonLordRarity = 12;
|
|
}
|
|
|
|
public override bool IsArmorSet(Item head, Item body, Item legs)
|
|
{
|
|
return body.type == ModContent.ItemType<TarragonBreastplate>() && legs.type == ModContent.ItemType<TarragonLeggings>();
|
|
}
|
|
|
|
public override void ArmorSetShadows(Player player)
|
|
{
|
|
player.armorEffectDrawShadowSubtle = true;
|
|
player.armorEffectDrawOutlines = true;
|
|
}
|
|
|
|
public override void UpdateArmorSet(Player player)
|
|
{
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
modPlayer.tarraSet = true;
|
|
modPlayer.tarraSummon = true;
|
|
player.setBonus = "+1 max minion and 55% increased minion damage\n" +
|
|
"Reduces enemy spawn rates\n" +
|
|
"Increased heart pickup range\n" +
|
|
"Enemies have a chance to drop extra hearts on death\n" +
|
|
"Summons a life aura around you that damages nearby enemies";
|
|
player.minionDamage += 0.55f;
|
|
player.maxMinions++;
|
|
}
|
|
|
|
public override void UpdateEquip(Player player)
|
|
{
|
|
player.maxMinions += 3;
|
|
player.endurance += 0.05f;
|
|
player.lavaMax += 240;
|
|
player.ignoreWater = true;
|
|
player.buffImmune[BuffID.CursedInferno] = true;
|
|
player.buffImmune[BuffID.OnFire] = true;
|
|
player.buffImmune[BuffID.Cursed] = true;
|
|
player.buffImmune[BuffID.Chilled] = true;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<UeliaceBar>(), 7);
|
|
recipe.AddIngredient(ModContent.ItemType<DivineGeode>(), 6);
|
|
recipe.AddTile(TileID.LunarCraftingStation);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|