89 lines
3.1 KiB
C#
89 lines
3.1 KiB
C#
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Items.Accessories;
|
|
using CalamityMod.Items.Materials;
|
|
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().customRarity = CalamityRarity.Violet;
|
|
}
|
|
|
|
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 and God Slayer effects\n" +
|
|
"Enemies are more likely to target you\n" +
|
|
"All projectiles spawn healing auric orbs on enemy hits";
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
modPlayer.tarraSet = true;
|
|
modPlayer.tarraMelee = true;
|
|
modPlayer.bloodflareSet = true;
|
|
modPlayer.bloodflareMelee = true;
|
|
modPlayer.godSlayer = true;
|
|
modPlayer.godSlayerDamage = 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;
|
|
}
|
|
|
|
if (modPlayer.godSlayerDashHotKeyPressed)
|
|
modPlayer.dashMod = 9;
|
|
}
|
|
|
|
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<GodSlayerHelm>());
|
|
recipe.AddIngredient(ModContent.ItemType<BloodflareMask>());
|
|
recipe.AddIngredient(ModContent.ItemType<TarragonHelm>());
|
|
recipe.AddIngredient(ModContent.ItemType<PsychoticAmulet>());
|
|
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 12);
|
|
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|