using Terraria; using Terraria.ID; using Terraria.ModLoader; using ForgottenWawiTech.Content.Items.Materials; using ForgottenWawiTech.Content.Players; using ForgottenWawiTech.Content.Rarities; using ForgottenWawiTech.Content.Tiles.CraftingStations; namespace ForgottenWawiTech.Content.Items.Accessories { public class AscendantSwarmModule : ModItem { public override void SetDefaults() { Item.width = 30; Item.height = 34; Item.accessory = true; Item.value = Item.sellPrice(platinum: 240); Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) { player.maxMinions += 6; player.maxTurrets += 3; player.GetDamage(DamageClass.Summon) += 0.35f; player.GetAttackSpeed(DamageClass.Summon) += 0.20f; player.whipRangeMultiplier += 0.30f; player.GetKnockback(DamageClass.Summon) += 2f; player.buffImmune[BuffID.OnFire] = true; player.buffImmune[BuffID.CursedInferno] = true; player.buffImmune[BuffID.Venom] = true; player.GetModPlayer().HandleSwarmAccessory(Item); } public override void AddRecipes() { CreateRecipe() .AddIngredient(ModContent.ItemType(), 6) .AddIngredient(ModContent.ItemType(), 8) .AddIngredient(ModContent.ItemType(), 10) .AddIngredient(ModContent.ItemType(), 16) .AddIngredient(ModContent.ItemType(), 6) .AddTile(ModContent.TileType()) .Register(); } } }