using CalamityMod.Buffs.Summon; using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Summon; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Head)] public class ReaverHelmet : ModItem { public override void SetStaticDefaults() { DisplayName.SetDefault("Reaver Helmet"); Tooltip.SetDefault("5% increased minion damage, +2 max minions, and increased minion knockback\n" + "10% increased movement speed and can move freely through liquids"); } public override void SetDefaults() { item.width = 22; item.height = 22; item.value = Item.buyPrice(0, 30, 0, 0); item.rare = 7; item.defense = 3; //36 } public override bool IsArmorSet(Item head, Item body, Item legs) { return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); } public override void ArmorSetShadows(Player player) { player.armorEffectDrawShadowSubtle = true; player.armorEffectDrawOutlines = true; } public override void UpdateArmorSet(Player player) { player.setBonus = "16% increased minion damage\n" + "Summons a reaver orb that emits spore gas when enemies are near"; CalamityPlayer modPlayer = player.Calamity(); modPlayer.reaverOrb = true; if (player.whoAmI == Main.myPlayer) { if (player.FindBuffIndex(ModContent.BuffType()) == -1) { player.AddBuff(ModContent.BuffType(), 3600, true); } if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) { Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), (int)(80f * player.minionDamage), 0f, Main.myPlayer, 0f, 0f); } } player.minionDamage += 0.16f; } public override void UpdateEquip(Player player) { player.ignoreWater = true; player.minionDamage += 0.05f; player.minionKB += 1f; player.maxMinions += 2; player.moveSpeed += 0.1f; } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 8); recipe.AddIngredient(ItemID.JungleSpores, 6); recipe.AddIngredient(ModContent.ItemType()); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); } } }