using ForgottenWawiTech.Content.Projectiles; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace ForgottenWawiTech.Content.Items.Weapons.Magic { public class ShatteredPrism : ModItem { public override string Texture => "Terraria/Images/Item_" + ItemID.LastPrism; // TODO: Change public static Color OverrideColor = new(80,0,80); public override void SetDefaults() { Item.CloneDefaults(ItemID.LastPrism); Item.mana = 4; Item.damage = 500; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 30f; Item.color = OverrideColor; } public override bool CanUseItem(Player player) { return player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0; } public override void AddRecipes() { Recipe recipe = CreateRecipe(); // Only add recipe if Calamity Mod is loaded if (ModLoader.TryGetMod("CalamityMod", out Mod calamityMod)) { recipe.AddIngredient(ItemID.LastPrism, 1); recipe.AddIngredient(calamityMod.Find("ShatteredCommunity").Type, 1); recipe.AddIngredient(10); recipe.AddTile(); recipe.Register(); } } } }