using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Melee { public class StormRuler : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetDefaults() { Item.width = 80; Item.damage = 80; Item.DamageType = DamageClass.Melee; Item.useAnimation = 25; Item.useTime = 25; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 6.25f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 84; Item.value = CalamityGlobalItem.Rarity10BuyPrice; Item.rare = ItemRarityID.Red; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 20f; } public override void MeleeEffects(Player player, Rectangle hitbox) { if (Main.rand.NextBool(5)) { int num250 = Dust.NewDust(new Vector2((float)hitbox.X, (float)hitbox.Y), hitbox.Width, hitbox.Height, 187, (float)(player.direction * 2), 0f, 150, default, 1.3f); Main.dust[num250].velocity *= 0.2f; } } public override void AddRecipes() { CreateRecipe(). AddIngredient(). AddIngredient(). AddIngredient(ItemID.FragmentVortex, 6). AddTile(TileID.LunarCraftingStation). Register(); } } }