using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Head)] public class GodSlayerVisage : ModItem { public override void SetStaticDefaults() { DisplayName.SetDefault("God Slayer Visage"); Tooltip.SetDefault("14% increased magic damage and critical strike chance\n" + "+100 max mana and 17% reduced mana usage"); } public override void SetDefaults() { item.width = 18; item.height = 18; item.value = Item.buyPrice(0, 75, 0, 0); item.defense = 21; //96 item.Calamity().postMoonLordRarity = 14; } 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; } public override void UpdateArmorSet(Player player) { CalamityPlayer modPlayer = player.Calamity(); modPlayer.godSlayer = true; modPlayer.godSlayerMage = true; player.setBonus = "You will survive fatal damage and will be healed 150 HP if an attack would have killed you\n" + "This effect can only occur once every 45 seconds\n" + "While the cooldown for this effect is active you gain a 10% increase to all damage\n" + "Enemies will release god slayer flames and healing flames when hit with magic attacks\n" + "Taking damage will cause you to release a magical god slayer explosion"; } public override void UpdateEquip(Player player) { player.manaCost *= 0.83f; player.magicDamage += 0.14f; player.magicCrit += 14; player.statManaMax2 += 100; } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 14); recipe.AddIngredient(ModContent.ItemType(), 8); recipe.AddIngredient(ModContent.ItemType(), 8); recipe.AddTile(ModContent.TileType()); recipe.SetResult(this); recipe.AddRecipe(); } } }