using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using ForgottenWawiTech.Content.Items.Materials; using ForgottenWawiTech.Content.Projectiles.Transcendent; using ForgottenWawiTech.Content.Rarities; using ForgottenWawiTech.Content.Tiles.CraftingStations; namespace ForgottenWawiTech.Content.Items.Weapons.Magic { public class TranscendentSingularityStaff : ModItem { public override void SetStaticDefaults() { Item.staff[Type] = true; } public override void SetDefaults() { Item.width = 64; Item.height = 64; Item.damage = 5000; Item.DamageType = DamageClass.Magic; Item.knockBack = 5f; Item.crit = 50; Item.mana = 50; Item.useTime = 18; Item.useAnimation = 18; Item.useStyle = ItemUseStyleID.Shoot; Item.UseSound = SoundID.Item73; Item.autoReuse = true; Item.noMelee = true; Item.shootSpeed = 20f; Item.shoot = ModContent.ProjectileType(); Item.value = Item.sellPrice(platinum: 310); Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { Vector2 spawnPosition = player.Center + new Vector2(0f, -16f); Vector2 spawnVelocity = velocity * 0.6f + player.velocity * 0.4f; spawnVelocity = spawnVelocity.RotatedByRandom(MathHelper.ToRadians(8f)); Projectile.NewProjectile(source, spawnPosition, spawnVelocity, type, damage, knockback, player.whoAmI); return false; } public override void AddRecipes() { CreateRecipe() .AddIngredient(ModContent.ItemType(), 8) .AddIngredient(ModContent.ItemType(), 10) .AddIngredient(ModContent.ItemType(), 12) .AddIngredient(ModContent.ItemType(), 20) .AddIngredient(ModContent.ItemType(), 8) .AddTile(ModContent.TileType()) .Register(); } } }