85 lines
3.0 KiB
C#
85 lines
3.0 KiB
C#
using CalamityMod.Buffs.Summon;
|
|
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Projectiles.Summon;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Armor
|
|
{
|
|
[AutoloadEquip(EquipType.Head)]
|
|
public class AtaxiaHelmet : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Ataxia Helmet");
|
|
Tooltip.SetDefault("5% increased minion damage and increased minion knockback\n" +
|
|
"+2 max minions\n" +
|
|
"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 = 6; //40
|
|
}
|
|
|
|
public override bool IsArmorSet(Item head, Item body, Item legs)
|
|
{
|
|
return body.type == ModContent.ItemType<AtaxiaArmor>() && legs.type == ModContent.ItemType<AtaxiaSubligar>();
|
|
}
|
|
|
|
public override void ArmorSetShadows(Player player)
|
|
{
|
|
player.armorEffectDrawOutlines = true;
|
|
}
|
|
|
|
public override void UpdateArmorSet(Player player)
|
|
{
|
|
player.setBonus = "40% increased minion damage\n" +
|
|
"Inferno effect when below 50% life\n" +
|
|
"Summons a chaos spirit to protect you\n" +
|
|
"You have a 20% chance to emit a blazing explosion when you are hit";
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
modPlayer.ataxiaBlaze = true;
|
|
modPlayer.chaosSpirit = true;
|
|
if (player.whoAmI == Main.myPlayer)
|
|
{
|
|
if (player.FindBuffIndex(ModContent.BuffType<AtaxiaSummonSetBuff>()) == -1)
|
|
{
|
|
player.AddBuff(ModContent.BuffType<AtaxiaSummonSetBuff>(), 3600, true);
|
|
}
|
|
if (player.ownedProjectileCounts[ModContent.ProjectileType<ChaosSpirit>()] < 1)
|
|
{
|
|
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<ChaosSpirit>(), (int)(190f * player.minionDamage), 0f, Main.myPlayer, 0f, 0f);
|
|
}
|
|
}
|
|
player.minionDamage += 0.4f;
|
|
}
|
|
|
|
public override void UpdateEquip(Player player)
|
|
{
|
|
player.minionDamage += 0.05f;
|
|
player.minionKB += 1.5f;
|
|
player.maxMinions += 2;
|
|
player.lavaMax += 240;
|
|
player.buffImmune[BuffID.OnFire] = true;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<CruptixBar>(), 7);
|
|
recipe.AddIngredient(ItemID.HellstoneBar, 4);
|
|
recipe.AddIngredient(ModContent.ItemType<CoreofChaos>());
|
|
recipe.AddTile(TileID.MythrilAnvil);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|