Files
CalamityModPublic/Items/Armor/AuricTeslaHelm.cs
T
2019-11-06 20:22:37 -06:00

91 lines
3.3 KiB
C#

using CalamityMod.CalPlayer;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor
{
[AutoloadEquip(EquipType.Head)]
public class AuricTeslaHelm : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Auric Tesla Royal Helm");
Tooltip.SetDefault("20% increased melee damage and critical strike chance\n" +
"Not moving boosts all damage and critical strike chance");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.value = Item.buyPrice(1, 80, 0, 0);
item.defense = 54; //132
item.Calamity().postMoonLordRarity = 20;
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<AuricTeslaBodyArmor>() && legs.type == ModContent.ItemType<AuricTeslaCuisses>();
}
public override void ArmorSetShadows(Player player)
{
player.armorEffectDrawShadow = true;
}
public override void UpdateArmorSet(Player player)
{
player.setBonus = "Melee Tarragon, Bloodflare, God Slayer, and Silva armor effects\n" +
"All projectiles spawn healing auric orbs on enemy hits\n" +
"Max run speed and acceleration boosted by 10%\n" +
"Your melee damage is multiplied based on how high your HP is; at full HP this effect is at max";
CalamityPlayer modPlayer = player.Calamity();
modPlayer.tarraSet = true;
modPlayer.tarraMelee = true;
modPlayer.bloodflareSet = true;
modPlayer.bloodflareMelee = true;
modPlayer.godSlayer = true;
modPlayer.godSlayerDamage = true;
modPlayer.silvaSet = true;
modPlayer.silvaMelee = true;
modPlayer.auricSet = true;
player.thorns += 3f;
player.lavaMax += 240;
player.ignoreWater = true;
player.crimsonRegen = true;
player.aggro += 1200;
if (player.lavaWet)
{
player.statDefense += 30;
player.lifeRegen += 10;
}
}
public override void UpdateEquip(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.auricBoost = true;
player.meleeDamage += 0.2f;
player.meleeCrit += 20;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<SilvaHelm>());
recipe.AddIngredient(ModContent.ItemType<GodSlayerHelm>());
recipe.AddIngredient(ModContent.ItemType<BloodflareMask>());
recipe.AddIngredient(ModContent.ItemType<TarragonHelm>());
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 10);
recipe.AddIngredient(ModContent.ItemType<PsychoticAmulet>());
recipe.AddTile(ModContent.TileType<DraedonsForge>());
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}