using CalamityMod.Items.Materials; using CalamityMod.Items.Weapons.Summon; using CalamityMod.Projectiles.Rogue; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Rogue { public class Supernova : RogueWeapon { public static readonly SoundStyle ExplosionSound = new("CalamityMod/Sounds/Item/SupernovaBoom") { Volume = 0.8f }; public override void SetDefaults() { Item.width = 34; Item.damage = 675; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 24; Item.useStyle = ItemUseStyleID.Swing; Item.useTime = 24; Item.knockBack = 8f; Item.UseSound = SoundID.Item15; Item.autoReuse = true; Item.height = 36; Item.value = CalamityGlobalItem.Rarity15BuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; Item.DamageType = RogueDamageClass.Instance; Item.rare = ModContent.RarityType(); } public override float StealthDamageMultiplier => 1.08f; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike { int stealth = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); if (stealth.WithinBounds(Main.maxProjectiles)) Main.projectile[stealth].Calamity().stealthStrike = true; return false; } return true; } public override void AddRecipes() { CreateRecipe(). AddIngredient(). AddIngredient(). AddIngredient(). AddIngredient(). AddIngredient(). AddTile(). Register(); } } }