using Terraria;
using System;
using Terraria.ID;
using System.Diagnostics;
using Microsoft.Xna.Framework;
using Terraria.ModLoader;
namespace SacredTools.Items.Weapons
{
public class PandolarRepeater : ModItem
{
public override void SetDefaults()
{
item.name = "Pandolar Repeater";
item.damage = 55;
item.noMelee = true;
item.ranged = true;
item.width = 69;
item.height = 40;
item.toolTip = "death to the enemies!";
item.toolTip2 = "Pandolar FTW!";
item.useTime = 18;
item.useAnimation = 30;
item.useStyle = 5;
item.shoot = 3;
item.useAmmo = 1;
item.knockBack = 1;
item.value = Item.sellPrice(0, 30, 0, 0);
item.rare = 5;
item.useSound = 5;
item.autoReuse = true;
item.shootSpeed = 20f;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ProjectileID.FrostburnArrow, damage, knockBack, player.whoAmI, 0f, 0f); //This is spawning a projectile of type FrostburnArrow using the original stats
return false; //Makes sure to not fire the original projectile
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.SnowBlock, 100);
recipe.AddIngredient(null, "OblivionBar", 20);
recipe.AddIngredient(null, "PandolarBow", 1);
recipe.AddTile(TileID.MythrilAnvil); //at work bench
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}