2026-02-22 20:09:01 +01:00

54 lines
1.9 KiB
C#

using Emiliasmod.Content.Projectiles;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Emiliasmod.Content.Items.Weapon
{
// This is a basic item template.
// Please see tModLoader's ExampleMod for every other example:
// https://github.com/tModLoader/tModLoader/tree/stable/ExampleMod
public class EmiliasWand : ModItem
{
public override void SetStaticDefaults() {
// As mentioned in the documentation, IsDrill and IsChainsaw automatically reduce useTime and useAnimation to 60% of what is set in SetDefaults and decrease tileBoost by 1, but only for vanilla items.
// We set it here despite it doing nothing because it is likely to be used by other mods to provide special effects to drill or chainsaw items globally.
ItemID.Sets.IsDrill[Type] = true;
}
// The Display Name and Tooltip of this item can be edited in the 'Localization/en-US_Mods.Emiliasmod.hjson' file.
public override void SetDefaults()
{
Item.damage = 300;
Item.pick = 300;
Item.DamageType = DamageClass.MeleeNoSpeed;
Item.tileBoost = 5;
Item.width = 64;
Item.height = 64;
Item.useTime = 2;
Item.useAnimation = 15;
Item.crit = 36;
Item.knockBack = 6;
Item.useStyle = ItemUseStyleID.Shoot;
Item.value = Item.buyPrice(platinum: 1);
Item.rare = ItemRarityID.Red;
//Item.UseSound = SoundID.ZombieMoan;
Item.shoot = ModContent.ProjectileType<EmiliasWandProjectile>();
Item.shootSpeed = 32f; // Adjusts how far away from the player to hold the projectile
Item.noMelee = true; // Turns off damage from the item itself, as we have a projectile
Item.noUseGraphic = true; // Stops the item from drawing in your hands, for the aforementioned reason
Item.channel = true;
}
public override void AddRecipes()
{
Recipe recipe = CreateRecipe();
recipe.AddIngredient(ItemID.DirtBlock, 10);
recipe.AddTile(TileID.WorkBenches);
recipe.Register();
}
}
}