49 lines
1.7 KiB
C#
49 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
|
|
{
|
|
public class ContaminatedBile : RogueWeapon
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Item.damage = 9;
|
|
Item.width = Item.height = 24;
|
|
Item.useAnimation = Item.useTime = 31;
|
|
Item.noMelee = true;
|
|
Item.noUseGraphic = true;
|
|
Item.useStyle = ItemUseStyleID.Swing;
|
|
Item.knockBack = 4.5f;
|
|
Item.rare = ItemRarityID.Green;
|
|
Item.value = CalamityGlobalItem.Rarity2BuyPrice;
|
|
Item.UseSound = SoundID.Item106;
|
|
Item.autoReuse = true;
|
|
Item.shoot = ModContent.ProjectileType<ContaminatedBileFlask>();
|
|
Item.shootSpeed = 15f;
|
|
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 p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
|
|
if (p.WithinBounds(Main.maxProjectiles))
|
|
Main.projectile[p].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
|
return false;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient(ItemID.BottledWater).
|
|
AddIngredient<SulphuricScale>(10).
|
|
AddTile(TileID.Bottles).
|
|
Register();
|
|
}
|
|
}
|
|
}
|