Files
CalamityModPublic/Items/Armor/TarragonHelm.cs
T
ben-tk 27c3709f43 added increased aggro to all of Cal's melee sets
except bloodflare and auric since they already had it.  also gave it to reaver defensive
2020-12-20 00:22:23 -05:00

94 lines
3.2 KiB
C#

using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.World;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor
{
[AutoloadEquip(EquipType.Head)]
public class TarragonHelm : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Tarragon Helm");
Tooltip.SetDefault("Helm of the disciple of ancients\n" +
"Temporary immunity to lava\n" +
"Can move freely through liquids\n" +
"5% increased damage reduction\n" +
"10% increased melee damage and critical strike chance");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.value = Item.buyPrice(0, 50, 0, 0);
item.defense = 33; //98
item.Calamity().customRarity = CalamityRarity.Turquoise;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip4")
{
line2.text = "10% increased melee damage and critical strike chance\n" +
"Provides heat protection in Death Mode";
}
}
}
}
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.tarraMelee = true;
player.aggro += 800;
string hotkey = CalamityMod.TarraHotKey.TooltipHotkeyString();
player.setBonus = "Increased heart pickup range\n" +
"Enemies have a chance to drop extra hearts on death\n" +
"Enemies are more likely to target you\n" +
"You have a 25% chance to gain a life regen buff when you take damage\n" +
"Press " + hotkey + " to cloak yourself in life energy that heavily reduces enemy contact damage for 10 seconds\n" +
"This has a 30 second cooldown";
}
public override void UpdateEquip(Player player)
{
player.meleeDamage += 0.1f;
player.meleeCrit += 10;
player.endurance += 0.05f;
player.lavaMax += 240;
player.ignoreWater = 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();
}
}
}