using CalamityMod.Buffs.Summon; using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Summon; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Head)] public class DemonshadeHelm : ModItem { public override void SetStaticDefaults() { DisplayName.SetDefault("Demonshade Helm"); Tooltip.SetDefault("30% increased damage and 15% increased critical strike chance, +10 max minions"); } public override void SetDefaults() { item.width = 18; item.height = 18; item.value = Item.buyPrice(5, 0, 0, 0); item.defense = 50; //15 item.Calamity().postMoonLordRarity = 16; } 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.armorEffectDrawShadow = true; player.armorEffectDrawOutlines = true; } public override void UpdateArmorSet(Player player) { player.setBonus = "100% increased minion damage\n" + "All attacks inflict the demon flame debuff\n" + "Shadowbeams and demon scythes will fire down when you are hit\n" + "A friendly red devil follows you around\n" + "Press Y to enrage nearby enemies with a dark magic spell for 10 seconds\n" + "This makes them do 25% more damage but they also take 125% more damage"; CalamityPlayer modPlayer = player.Calamity(); modPlayer.dsSetBonus = true; modPlayer.wearingRogueArmor = true; if (player.whoAmI == Main.myPlayer && !modPlayer.chibii) { modPlayer.redDevil = true; 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(), 10000, 0f, Main.myPlayer, 0f, 0f); } } player.minionDamage += 1f; } public override void UpdateEquip(Player player) { player.maxMinions += 10; player.allDamage += 0.3f; player.Calamity().AllCritBoost(15); } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 8); recipe.AddTile(ModContent.TileType()); recipe.SetResult(this); recipe.AddRecipe(); } } }