67 lines
2.3 KiB
C#
67 lines
2.3 KiB
C#
using CalamityMod.Items.Materials;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using CalamityMod.CalPlayer;
|
|
using Terraria.GameContent.Creative;
|
|
|
|
namespace CalamityMod.Items.Armor
|
|
{
|
|
[AutoloadEquip(EquipType.Head)]
|
|
public class WulfrumMask : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
|
|
DisplayName.SetDefault("Wulfrum Mask");
|
|
Tooltip.SetDefault("10% increased rogue damage");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 18;
|
|
Item.height = 18;
|
|
Item.value = Item.buyPrice(0, 0, 75, 0);
|
|
Item.rare = ItemRarityID.Blue;
|
|
Item.defense = 1; //6
|
|
}
|
|
|
|
public override bool IsArmorSet(Item head, Item body, Item legs)
|
|
{
|
|
return body.type == ModContent.ItemType<WulfrumArmor>() && legs.type == ModContent.ItemType<WulfrumLeggings>();
|
|
}
|
|
|
|
public override void UpdateArmorSet(Player player)
|
|
{
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
player.setBonus = "+3 defense\n" +
|
|
"+5 defense when below 50% life\n" +
|
|
"Rogue stealth builds while not attacking and slower while moving, up to a max of 50\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.statDefense += 3; //9
|
|
if (player.statLife <= (int)(player.statLifeMax2 * 0.5))
|
|
{
|
|
player.statDefense += 5; //14
|
|
}
|
|
modPlayer.rogueStealthMax += 0.5f;
|
|
modPlayer.wearingRogueArmor = true;
|
|
}
|
|
|
|
public override void UpdateEquip(Player player)
|
|
{
|
|
player.Calamity().throwingDamage += 0.1f;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient<WulfrumShard>(5).
|
|
AddIngredient<EnergyCore>().
|
|
AddTile(TileID.Anvils).
|
|
Register();
|
|
}
|
|
}
|
|
}
|