using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { public class ElementalQuiver : ModItem { public override void SetStaticDefaults() { DisplayName.SetDefault("Elemental Quiver"); Tooltip.SetDefault("Ranged projectiles have a chance to split\n" + "Ranged weapons have a chance to instantly kill normal enemies\n" + "10% increased ranged damage and 5% increased ranged critical strike chance\n" + "20% reduced ammo usage and increased life regen, minion knockback, defense, and pick speed"); } public override void SetDefaults() { item.width = 28; item.height = 32; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; item.Calamity().postMoonLordRarity = 20; } public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); modPlayer.eQuiver = true; player.rangedDamage += 0.1f; player.rangedCrit += 5; player.ammoCost80 = true; player.lifeRegen += 2; player.statDefense += 5; player.pickSpeed -= 0.15f; player.minionKB += 0.5f; } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.MagicQuiver); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType(), 20); recipe.AddIngredient(ModContent.ItemType(), 20); recipe.AddIngredient(ModContent.ItemType(), 20); recipe.AddTile(ModContent.TileType()); recipe.SetResult(this); recipe.AddRecipe(); } } }