46 lines
1.5 KiB
C#
46 lines
1.5 KiB
C#
using CalamityMod.Items.Placeables;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Ranged
|
|
{
|
|
public class AstralRepeater : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
|
public override void SetDefaults()
|
|
{
|
|
Item.damage = 99;
|
|
Item.DamageType = DamageClass.Ranged;
|
|
Item.width = 38;
|
|
Item.height = 78;
|
|
Item.useTime = 5;
|
|
Item.useAnimation = 15;
|
|
Item.reuseDelay = 15;
|
|
Item.useLimitPerAnimation = 3;
|
|
Item.useStyle = ItemUseStyleID.Shoot;
|
|
Item.noMelee = true;
|
|
Item.knockBack = 2.5f;
|
|
Item.value = CalamityGlobalItem.Rarity9BuyPrice;
|
|
Item.rare = ItemRarityID.Cyan;
|
|
Item.UseSound = SoundID.Item5;
|
|
Item.autoReuse = true;
|
|
Item.shoot = ProjectileID.WoodenArrowFriendly;
|
|
Item.shootSpeed = 16f;
|
|
Item.useAmmo = AmmoID.Arrow;
|
|
Item.Calamity().canFirePointBlankShots = true;
|
|
}
|
|
|
|
// Terraria seems to really dislike high crit values in SetDefaults
|
|
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25;
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient<AstralBar>(7).
|
|
AddTile(TileID.LunarCraftingStation).
|
|
Register();
|
|
}
|
|
}
|
|
}
|