Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Microsoft.Xna.Framework;
- using Terraria;
- using Terraria.ID;
- using Terraria.ModLoader;
- using static Terraria.ModLoader.ModContent;
- namespace TestMod.Items.Armor
- {
- [AutoloadEquip(EquipType.Head)]
- public class ModdedHelmet : ModItem
- {
- public override void SetStaticDefaults()
- {
- Tooltip.SetDefault("This helmet is Modded.");
- }
- public override void SetDefaults()
- {
- item.width = 18;
- item.height = 18;
- item.value = 1;
- item.rare = 2;
- item.defense = 5;
- }
- public override bool IsArmorSet(Item head, Item body, Item legs)
- {
- return body.type == mod.ItemType("ModdedChestplate") && legs.type == mod.ItemType("ModdedLeggings");
- }
- public override void UpdateArmorSet(Player player)
- {
- player.meleeDamage *= 0.5f;
- player.AddBuff(BuffID.Spelunker, 1);
- }
- public override void AddRecipes()
- {
- ModRecipe recipe = new ModRecipe(mod);
- recipe.AddIngredient(ItemID.DirtBlock, 10);
- recipe.SetResult(this);
- recipe.AddRecipe();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement