52 lines
1.7 KiB
C#
52 lines
1.7 KiB
C#
using Terraria.DataStructures;
|
|
using CalamityMod.Projectiles.Rogue;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Rogue
|
|
{
|
|
public class MetalMonstrosity : RogueWeapon
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 32;
|
|
Item.height = 32;
|
|
Item.useStyle = ItemUseStyleID.Swing;
|
|
Item.autoReuse = true;
|
|
Item.noUseGraphic = true;
|
|
Item.noMelee = true;
|
|
Item.UseSound = SoundID.Item1;
|
|
Item.rare = ItemRarityID.Orange;
|
|
Item.value = CalamityGlobalItem.Rarity3BuyPrice;
|
|
|
|
Item.damage = 30;
|
|
Item.useAnimation = 40;
|
|
Item.useTime = 40;
|
|
Item.knockBack = 7f;
|
|
Item.shoot = ModContent.ProjectileType<MetalChunk>();
|
|
Item.shootSpeed = 7f;
|
|
|
|
Item.DamageType = RogueDamageClass.Instance;
|
|
}
|
|
|
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
|
{
|
|
int proj = Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<MetalChunk>(), damage, knockback, player.whoAmI);
|
|
if (player.Calamity().StealthStrikeAvailable() && proj.WithinBounds(Main.maxProjectiles))
|
|
Main.projectile[proj].Calamity().stealthStrike = true;
|
|
return false;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient(ItemID.SpikyBall, 500).
|
|
AddIngredient(ItemID.Spike, 80).
|
|
AddTile(TileID.Anvils).
|
|
Register();
|
|
}
|
|
}
|
|
}
|