57 lines
2.0 KiB
C#
57 lines
2.0 KiB
C#
using CalamityMod.Buffs.Potions;
|
|
using CalamityMod.Items.Fishing.BrimstoneCragCatches;
|
|
using CalamityMod.Items.Materials;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Potions
|
|
{
|
|
public class ShadowPotion : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Shadow Potion");
|
|
Tooltip.SetDefault("Causes the player to disappear while not attacking\n" +
|
|
"Holding different types of rogue weapons give the player boosts\n" +
|
|
"Different types of rogue weapons spawn different projectiles on hit\n" +
|
|
"Stealth generation is increased by 10%");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 28;
|
|
item.height = 18;
|
|
item.useTurn = true;
|
|
item.maxStack = 30;
|
|
item.rare = ItemRarityID.Orange;
|
|
item.useAnimation = 17;
|
|
item.useTime = 17;
|
|
item.useStyle = ItemUseStyleID.EatingUsing;
|
|
item.UseSound = SoundID.Item3;
|
|
item.consumable = true;
|
|
item.buffType = ModContent.BuffType<ShadowBuff>();
|
|
item.buffTime = CalamityUtils.SecondsToFrames(480f);
|
|
item.value = Item.buyPrice(0, 2, 0, 0);
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<Shadowfish>());
|
|
recipe.AddIngredient(ItemID.InvisibilityPotion);
|
|
recipe.AddTile(TileID.AlchemyTable);
|
|
recipe.alchemy = true;
|
|
recipe.SetResult(this, 2);
|
|
recipe.AddRecipe();
|
|
// blood orb recipes no alch table effect
|
|
recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<BloodOrb>(), 10);
|
|
recipe.AddIngredient(ItemID.InvisibilityPotion);
|
|
recipe.AddTile(TileID.AlchemyTable);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|