56 lines
1.8 KiB
C#
56 lines
1.8 KiB
C#
using CalamityMod.Buffs.DamageOverTime;
|
|
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Projectiles.Melee.Shortswords;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Melee
|
|
{
|
|
[LegacyName("ElementalShortsword")]
|
|
public class ElementalShiv : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Elemental Shiv");
|
|
Tooltip.SetDefault("Shoots a rainbow shiv that spawns additional shivs on hit\n" +
|
|
"Receives 33% benefit from melee speed bonuses");
|
|
SacrificeTotal = 1;
|
|
ItemID.Sets.BonusAttackSpeedMultiplier[Item.type] = 0.33f;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.useStyle = ItemUseStyleID.Rapier;
|
|
Item.DamageType = DamageClass.Melee;
|
|
Item.useAnimation = 10;
|
|
Item.useTime = 10;
|
|
Item.width = 44;
|
|
Item.height = 44;
|
|
Item.damage = 190;
|
|
Item.knockBack = 8.5f;
|
|
Item.UseSound = SoundID.Item1;
|
|
Item.autoReuse = true;
|
|
Item.noUseGraphic = true;
|
|
Item.noMelee = true;
|
|
Item.shoot = ModContent.ProjectileType<ElementalShivProj>();
|
|
Item.shootSpeed = 2.4f;
|
|
Item.value = CalamityGlobalItem.Rarity11BuyPrice;
|
|
Item.rare = ItemRarityID.Purple;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient(ItemID.PiercingStarlight).
|
|
AddIngredient(ItemID.LunarBar, 5).
|
|
AddIngredient<LifeAlloy>(5).
|
|
AddIngredient<GalacticaSingularity>(5).
|
|
AddTile(TileID.LunarCraftingStation).
|
|
Register();
|
|
}
|
|
}
|
|
}
|