85 lines
3.4 KiB
C#
85 lines
3.4 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 TarragonHelmet : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Tarragon Helmet");
|
|
Tooltip.SetDefault("Temporary immunity to lava and immunity to cursed inferno, fire, cursed, and chilled debuffs\n" +
|
|
"Can move freely through liquids and 12% increased movement speed\n" +
|
|
"10% increased rogue damage and critical strike chance\n" +
|
|
"5% increased damage reduction");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 18;
|
|
item.height = 18;
|
|
item.value = Item.buyPrice(0, 50, 0, 0);
|
|
item.defense = 15; //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.tarraThrowing = true;
|
|
modPlayer.rogueStealthMax += 1.3f;
|
|
modPlayer.wearingRogueArmor = true;
|
|
player.setBonus = "Reduces enemy spawn rates\n" +
|
|
"Increased heart pickup range\n" +
|
|
"Enemies have a chance to drop extra hearts on death\n" +
|
|
"After every 25 rogue critical hits you will gain 5 seconds of damage immunity\n" +
|
|
"This effect can only occur once every 30 seconds\n" +
|
|
"While under the effects of a debuff you gain 10% increased rogue damage\n" +
|
|
"Rogue stealth builds while not attacking and not moving, up to a max of 130\n" +
|
|
"Once you have built max stealth, you will be able to perform a Stealth Strike\n" +
|
|
"Rogue stealth only reduces when you attack, it does not reduce while moving\n" +
|
|
"The higher your rogue stealth the higher your rogue damage, crit, and movement speed";
|
|
}
|
|
|
|
public override void UpdateEquip(Player player)
|
|
{
|
|
player.Calamity().throwingDamage += 0.1f;
|
|
player.Calamity().throwingCrit += 10;
|
|
player.moveSpeed += 0.12f;
|
|
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();
|
|
}
|
|
}
|
|
}
|