49 lines
1.5 KiB
C#
49 lines
1.5 KiB
C#
using CalamityMod.Projectiles.Magic;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Magic
|
|
{
|
|
public class FrostBolt : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Frost Bolt");
|
|
Tooltip.SetDefault("Casts a slow-moving ball of frost");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.damage = 14;
|
|
item.magic = true;
|
|
item.mana = 6;
|
|
item.width = 28;
|
|
item.height = 30;
|
|
item.useTime = 20;
|
|
item.useAnimation = 20;
|
|
item.useStyle = ItemUseStyleID.HoldingOut;
|
|
item.noMelee = true;
|
|
item.knockBack = 3.5f;
|
|
item.value = Item.buyPrice(0, 2, 0, 0);
|
|
item.rare = ItemRarityID.Green;
|
|
item.UseSound = SoundID.Item8;
|
|
item.autoReuse = true;
|
|
item.shoot = ModContent.ProjectileType<FrostBoltProjectile>();
|
|
item.shootSpeed = 6f;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddRecipeGroup("AnyIceBlock", 20);
|
|
recipe.AddIngredient(ItemID.Shiverthorn, 2);
|
|
recipe.AddRecipeGroup("AnySnowBlock", 10);
|
|
recipe.AddIngredient(ItemID.WaterBucket);
|
|
recipe.AddTile(TileID.Bookcases);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|