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.7 KiB
C#
49 lines
1.7 KiB
C#
using CalamityMod.Projectiles.Ranged;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Ranged
|
|
{
|
|
public class Needler : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 44;
|
|
Item.height = 26;
|
|
Item.damage = 52;
|
|
Item.DamageType = DamageClass.Ranged;
|
|
Item.useTime = 18;
|
|
Item.useAnimation = 18;
|
|
Item.useStyle = ItemUseStyleID.Shoot;
|
|
Item.noMelee = true;
|
|
Item.knockBack = 5.5f;
|
|
Item.value = CalamityGlobalItem.RarityLightRedBuyPrice;
|
|
Item.rare = ItemRarityID.LightRed;
|
|
Item.UseSound = SoundID.Item108;
|
|
Item.autoReuse = true;
|
|
Item.shootSpeed = 9f;
|
|
Item.shoot = ModContent.ProjectileType<NeedlerProj>();
|
|
Item.useAmmo = AmmoID.Bullet;
|
|
}
|
|
|
|
public override Vector2? HoldoutOffset()
|
|
{
|
|
return new Vector2(-5, 0);
|
|
}
|
|
|
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
|
{
|
|
if (type == ProjectileID.Bullet)
|
|
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<NeedlerProj>(), damage, knockback, player.whoAmI);
|
|
else
|
|
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
|
|
|
|
return false;
|
|
}
|
|
}
|
|
}
|