Files
CalamityModPublic/Items/Armor/UmbraphileHood.cs
T

69 lines
2.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 UmbraphileHood : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Umbraphile Hood");
Tooltip.SetDefault("8% increased rogue damage and 10% increased rogue velocity");
}
public override void SetDefaults()
{
item.width = 22;
item.height = 20;
item.value = Item.buyPrice(0, 30, 0, 0);
item.rare = ItemRarityID.Lime;
item.defense = 8; //36
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<UmbraphileRegalia>() && legs.type == ModContent.ItemType<UmbraphileBoots>();
}
public override void ArmorSetShadows(Player player)
{
player.armorEffectDrawShadow = true;
}
public override void UpdateArmorSet(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.umbraphileSet = true;
modPlayer.rogueStealthMax += 1.1f;
player.setBonus = "Rogue weapons have a chance to create explosions on hit\n" +
"Stealth strikes always create an explosion\n" +
"Penumbra potions always build stealth at max effectiveness\n" +
"Rogue stealth builds while not attacking and slower while moving, up to a max of 110\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";
player.Calamity().wearingRogueArmor = true;
}
public override void UpdateEquip(Player player)
{
player.Calamity().throwingDamage += 0.08f;
player.Calamity().throwingVelocity += 0.1f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<SolarVeil>(), 12);
recipe.AddIngredient(ItemID.HallowedBar, 8);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}