66 lines
2.3 KiB
C#
66 lines
2.3 KiB
C#
using CalamityMod.Items.Materials;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using CalamityMod.CalPlayer;
|
|
|
|
namespace CalamityMod.Items.Armor
|
|
{
|
|
[AutoloadEquip(EquipType.Head)]
|
|
public class WulfrumMask : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Wulfrum Mask");
|
|
Tooltip.SetDefault("3% increased rogue damage");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 18;
|
|
item.height = 18;
|
|
item.value = Item.buyPrice(0, 0, 75, 0);
|
|
item.rare = 1;
|
|
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.03f;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<WulfrumShard>(), 5);
|
|
recipe.AddIngredient(ModContent.ItemType<EnergyCore>());
|
|
recipe.AddTile(TileID.Anvils);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|