Files
CalamityModPublic/Items/Armor/FearmongerGreathelm.cs
T

115 lines
4.2 KiB
C#

using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.World;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor
{
[AutoloadEquip(EquipType.Head)]
public class FearmongerGreathelm : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Fearmonger Greathelm");
Tooltip.SetDefault("Pure terror radiates from your eyes\n" +
"+60 max mana and 10% decreased mana usage\n" +
"10% increased minion damage");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.value = Item.buyPrice(gold: 75);
item.defense = 38; // 132 total
item.Calamity().customRarity = CalamityRarity.DarkBlue;
}
public override void UpdateEquip(Player player)
{
player.statManaMax2 += 60;
player.minionDamage += 0.1f;
player.manaCost *= 0.9f;
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<FearmongerPlateMail>() && legs.type == ModContent.ItemType<FearmongerGreaves>();
}
public override void ArmorSetShadows(Player player)
{
player.armorEffectDrawOutlines = true;
}
public override void UpdateArmorSet(Player player)
{
if (CalamityWorld.death)
{
player.setBonus = @"20% increased minion damage and +2 max minions
The minion damage nerf while wielding weaponry is reduced
Immunity to all forms of frost and flame
All minion attacks grant colossal life regeneration
15% increased damage reduction during the Pumpkin and Frost Moons
This extra damage reduction ignores the soft cap
Provides cold protection in Death Mode";
}
else
{
player.setBonus = @"20% increased minion damage and +2 max minions
The minion damage nerf while wielding weaponry is reduced
Immunity to all forms of frost and flame
All minion attacks grant colossal life regeneration
15% increased damage reduction during the Pumpkin and Frost Moons
This extra damage reduction ignores the soft cap";
}
// This bool encompasses cross-class nerf immunity, colossal life regen on minion attack, and the holiday moon DR
player.Calamity().fearmongerSet = true;
// All-class armors count as rogue sets, but don't grant stealth bonuses
player.Calamity().wearingRogueArmor = true;
player.minionDamage += 0.2f;
player.maxMinions += 2;
int[] immuneDebuffs = {
BuffID.OnFire,
BuffID.Frostburn,
BuffID.CursedInferno,
BuffID.ShadowFlame, //doesn't do anything
BuffID.Daybreak, //doesn't do anything
BuffID.Burning,
ModContent.BuffType<Shadowflame>(),
ModContent.BuffType<BrimstoneFlames>(),
ModContent.BuffType<AbyssalFlames>(),
ModContent.BuffType<HolyFlames>(),
ModContent.BuffType<GodSlayerInferno>(),
BuffID.Chilled,
BuffID.Frozen,
ModContent.BuffType<GlacialState>(),
};
for (int i = 0; i < immuneDebuffs.Length; ++i)
player.buffImmune[immuneDebuffs[i]] = true;
// Constantly emit dim orange light
Lighting.AddLight(player.Center, 0.3f, 0.18f, 0f);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.SpookyHelmet);
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 8);
recipe.AddIngredient(ItemID.SoulofFright, 8);
recipe.AddIngredient(ModContent.ItemType<AscendantSpiritEssence>(), 2);
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}