using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Head)] public class AtaxiaMask : ModItem { public override void SetStaticDefaults() { DisplayName.SetDefault("Ataxia Mask"); Tooltip.SetDefault("12% increased magic damage, reduces mana usage by 15%, and 10% increased magic critical strike chance\n" + "+100 max mana, temporary immunity to lava, and immunity to fire damage"); } public override void SetDefaults() { item.width = 18; item.height = 18; item.value = Item.buyPrice(0, 30, 0, 0); item.rare = 8; item.defense = 9; //45 } 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.armorEffectDrawOutlines = true; } public override void UpdateArmorSet(Player player) { player.setBonus = "5% increased magic damage\n" + "Inferno effect when below 50% life\n" + "Magic attacks summon damaging and healing flare orbs on hit\n" + "You have a 20% chance to emit a blazing explosion when you are hit"; CalamityPlayer modPlayer = player.Calamity(); modPlayer.ataxiaBlaze = true; modPlayer.ataxiaMage = true; player.magicDamage += 0.05f; } public override void UpdateEquip(Player player) { player.manaCost *= 0.85f; player.statManaMax2 += 100; player.magicDamage += 0.12f; player.magicCrit += 10; player.lavaMax += 240; player.buffImmune[BuffID.OnFire] = true; } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 7); recipe.AddIngredient(ItemID.HellstoneBar, 4); recipe.AddIngredient(ModContent.ItemType()); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); } } }