2 - (Example) Post DoG items are now 2 platinum instead of 1 platinum 40 gold. 3 - (Example) Dev items are now 2 platinum 80 gold instead of 2 platinum. 4 - Privated numeric rarity item values. 5 - All assigned item values use the rarity's names, e.g. RarityLightPurpleBuyPrice.
49 lines
1.5 KiB
C#
49 lines
1.5 KiB
C#
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Projectiles.Melee.Spears;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Melee
|
|
{
|
|
public class StarnightLance : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Weapons.Melee";
|
|
public override void SetStaticDefaults()
|
|
{
|
|
ItemID.Sets.Spears[Item.type] = true;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 72;
|
|
Item.height = 72;
|
|
Item.damage = 110;
|
|
Item.DamageType = DamageClass.Melee;
|
|
Item.noMelee = true;
|
|
Item.useTurn = true;
|
|
Item.noUseGraphic = true;
|
|
Item.useAnimation = 23;
|
|
Item.useStyle = ItemUseStyleID.Shoot;
|
|
Item.useTime = 23;
|
|
Item.knockBack = 6;
|
|
Item.UseSound = SoundID.Item1;
|
|
Item.autoReuse = true;
|
|
Item.value = CalamityGlobalItem.RarityPinkBuyPrice;
|
|
Item.rare = ItemRarityID.Pink;
|
|
Item.shoot = ModContent.ProjectileType<StarnightLanceProjectile>();
|
|
Item.shootSpeed = 6f;
|
|
}
|
|
|
|
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient<CryonicBar>(12).
|
|
AddTile(TileID.MythrilAnvil).
|
|
Register();
|
|
}
|
|
}
|
|
}
|