using Terraria.DataStructures; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; namespace CalamityMod.Items.Weapons.Rogue { public class SludgeSplotch : RogueWeapon { public override void SetStaticDefaults() { Item.ResearchUnlockCount = 99; } public override void SetDefaults() { Item.width = 32; Item.damage = 48; Item.noMelee = true; Item.noUseGraphic = true; Item.consumable = true; Item.useAnimation = 18; Item.useStyle = ItemUseStyleID.Swing; Item.useTime = 18; Item.knockBack = 1f; Item.autoReuse = true; Item.height = 30; Item.maxStack = 9999; Item.value = Item.sellPrice(0, 0, 0, 40); Item.rare = ItemRarityID.Green; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; Item.DamageType = RogueDamageClass.Instance; } public override float StealthVelocityMultiplier => 1.2f; public override float StealthKnockbackMultiplier => 3f; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { SoundEngine.PlaySound(SoundID.NPCDeath9 with { Volume = SoundID.NPCDeath9.Volume * 2f }, player.Center); if (player.Calamity().StealthStrikeAvailable()) { int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 1f); if (p.WithinBounds(Main.maxProjectiles)) Main.projectile[p].Calamity().stealthStrike = true; return false; } return true; } public override void AddRecipes() { CreateRecipe(100). AddIngredient(15). AddRecipeGroup("Boss2Material"). Register(); } } }