using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Rogue { public class ScarletDevil : RogueWeapon { public override void SetDefaults() { Item.width = 108; Item.height = 108; Item.damage = 10000; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = Item.useTime = 60; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 8f; Item.UseSound = SoundID.Item60; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 30f; Item.DamageType = RogueDamageClass.Instance; Item.value = CalamityGlobalItem.Rarity16BuyPrice; Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } 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 (Main.projectile.IndexInRange(proj)) Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); return false; } // Terraria seems to really dislike high crit values in SetDefaults public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20; public override void AddRecipes() { CreateRecipe(). AddIngredient(). AddIngredient(). AddIngredient(15). AddIngredient(ItemID.SoulofNight, 15). AddIngredient(5). AddTile(). Register(); } } }