Files
CalamityModPublic/Items/Armor/AerospecHeadgear.cs
T

80 lines
2.9 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 AerospecHeadgear : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Aerospec Headgear");
Tooltip.SetDefault("8% increased rogue damage and 5% increased movement speed");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.value = Item.buyPrice(0, 5, 0, 0);
item.rare = 3;
item.defense = 4; //17
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<AerospecBreastplate>() && legs.type == ModContent.ItemType<AerospecLeggings>();
}
public override void ArmorSetShadows(Player player)
{
player.armorEffectDrawShadow = true;
}
public override void DrawHair(ref bool drawHair, ref bool drawAltHair)
{
drawHair = true;
drawAltHair = true;
}
public override void UpdateArmorSet(Player player)
{
player.setBonus = "5% increased movement speed and rogue critical strike chance\n" +
"Taking over 25 damage in one hit will cause a spread of homing feathers to fall\n" +
"Allows you to fall more quickly and disables fall damage\n" +
"Rogue stealth builds while not attacking and not moving, up to a max of 100\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";
CalamityPlayer modPlayer = player.Calamity();
modPlayer.aeroSet = true;
modPlayer.rogueStealthMax += 1f;
player.noFallDmg = true;
player.moveSpeed += 0.05f;
player.Calamity().throwingCrit += 5;
player.Calamity().wearingRogueArmor = true;
}
public override void UpdateEquip(Player player)
{
player.Calamity().throwingDamage += 0.08f;
player.moveSpeed += 0.05f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<AerialiteBar>(), 5);
recipe.AddIngredient(ItemID.Cloud, 3);
recipe.AddIngredient(ItemID.RainCloud);
recipe.AddIngredient(ItemID.Feather);
recipe.AddTile(TileID.SkyMill);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}