51 lines
1.7 KiB
C#
51 lines
1.7 KiB
C#
using Terraria.DataStructures;
|
|
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Projectiles.Rogue;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Rogue
|
|
{
|
|
[LegacyName("FlameScythe")]
|
|
public class SubductionSlicer : RogueWeapon
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 50;
|
|
Item.height = 48;
|
|
Item.damage = 90;
|
|
Item.noMelee = true;
|
|
Item.noUseGraphic = true;
|
|
Item.autoReuse = true;
|
|
Item.useStyle = ItemUseStyleID.Swing;
|
|
Item.useTime = 20;
|
|
Item.useAnimation = 20;
|
|
Item.knockBack = 8.5f;
|
|
Item.UseSound = SoundID.Item1;
|
|
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
|
|
Item.rare = ItemRarityID.Yellow;
|
|
Item.shoot = ModContent.ProjectileType<SubductionSlicerProj>();
|
|
Item.shootSpeed = 16f;
|
|
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, type, damage, knockback, player.whoAmI);
|
|
if (proj.WithinBounds(Main.maxProjectiles))
|
|
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
|
return false;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient<ScoriaBar>(9).
|
|
AddTile(TileID.MythrilAnvil).
|
|
Register();
|
|
}
|
|
}
|
|
}
|