48 lines
1.5 KiB
C#
48 lines
1.5 KiB
C#
using CalamityMod.Buffs.DamageOverTime;
|
|
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Items.Materials;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Accessories
|
|
{
|
|
public class AlchemicalFlask : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Alchemical Flask");
|
|
Tooltip.SetDefault("All attacks inflict the plague\n" +
|
|
"Makes you immune to the plague\n" +
|
|
"Projectiles spawn plague seekers on enemy hits");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 26;
|
|
item.height = 26;
|
|
item.value = Item.buyPrice(0, 24, 0, 0);
|
|
item.rare = 8;
|
|
item.accessory = true;
|
|
}
|
|
|
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
|
{
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
modPlayer.alchFlask = true;
|
|
player.buffImmune[ModContent.BuffType<Plague>()] = true;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ItemID.BottledWater);
|
|
recipe.AddIngredient(ItemID.Bezoar);
|
|
recipe.AddIngredient(ModContent.ItemType<PlagueCellCluster>(), 10);
|
|
recipe.AddTile(TileID.MythrilAnvil);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|