using Terraria.DataStructures; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; using Terraria.ID; using CalamityMod.Projectiles.Rogue; namespace CalamityMod.Items.Weapons.Rogue { public class TheSyringe : RogueWeapon { public static int BaseDamage = 60; public static float Knockback = 5f; public static float Speed = 15f; public override void SetDefaults() { Item.damage = BaseDamage; Item.knockBack = Knockback; Item.autoReuse = true; Item.useTime = 15; Item.useAnimation = 15; Item.useStyle = ItemUseStyleID.Swing; Item.width = 14; Item.height = 50; Item.UseSound = SoundID.Item106; Item.noMelee = true; Item.noUseGraphic = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = Speed; Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Yellow; Item.DamageType = RogueDamageClass.Instance; } public override float StealthDamageMultiplier => 1.2f; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) { int stealth = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 1f); if (stealth.WithinBounds(Main.maxProjectiles)) Main.projectile[stealth].Calamity().stealthStrike = true; return false; } return true; } } }