48 lines
1.4 KiB
C#
48 lines
1.4 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");
|
|
SacrificeTotal = 1;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.damage = 14;
|
|
Item.DamageType = DamageClass.Magic;
|
|
Item.mana = 6;
|
|
Item.width = 28;
|
|
Item.height = 30;
|
|
Item.useTime = 20;
|
|
Item.useAnimation = 20;
|
|
Item.useStyle = ItemUseStyleID.Shoot;
|
|
Item.noMelee = true;
|
|
Item.knockBack = 3.5f;
|
|
Item.value = CalamityGlobalItem.Rarity2BuyPrice;
|
|
Item.rare = ItemRarityID.Green;
|
|
Item.UseSound = SoundID.Item8;
|
|
Item.autoReuse = true;
|
|
Item.shoot = ModContent.ProjectileType<FrostBoltProjectile>();
|
|
Item.shootSpeed = 6f;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddRecipeGroup("AnyIceBlock", 20).
|
|
AddRecipeGroup("AnySnowBlock", 10).
|
|
AddIngredient(ItemID.Shiverthorn, 2).
|
|
AddTile(TileID.Bookcases).
|
|
Register();
|
|
}
|
|
}
|
|
}
|