Files
CalamityModPublic/Items/Armor/DaedalusHeadgear.cs
T
Andrew Marheine ff223e0674 1 - Draedon's Heart is now the Exo Mech expert accessory, removed the the recipe and Rev+ accessory affects.
2 - Daedalus armor, Catastrophe Claymore, Crystal Blade, Consecrated Water and Fulguration Halberd require less crystal shards to craft.
3 - Revivify Potion blood orb recipe requirement increased.
4 - Exo Mech treasure bag.
5 - Reduced Fabstaff and Helium Flash recipe requirements.
6 - Weak Reference Support for exo mechs adjusted.
7 - Exo mech minimap icons.
8 - Exo mech loot drop code.
9 - Artemis targets the same player as Apollo if Apollo is alive.
2021-09-09 15:55:21 -05:00

78 lines
2.7 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 DaedalusHeadgear : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Daedalus Mask");
Tooltip.SetDefault("5% increased minion damage");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.value = Item.buyPrice(0, 25, 0, 0);
item.rare = ItemRarityID.Pink;
item.defense = 3; //33
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<DaedalusBreastplate>() && legs.type == ModContent.ItemType<DaedalusLeggings>();
}
public override void ArmorSetShadows(Player player)
{
player.armorEffectDrawShadowSubtle = true;
player.armorEffectDrawOutlines = true;
}
public override void UpdateArmorSet(Player player)
{
player.setBonus = "20% increased minion damage and +2 max minions\n" +
"A daedalus crystal floats above you to protect you";
CalamityPlayer modPlayer = player.Calamity();
modPlayer.daedalusCrystal = true;
if (player.whoAmI == Main.myPlayer)
{
if (player.FindBuffIndex(ModContent.BuffType<DaedalusSummonSetBuff>()) == -1)
{
player.AddBuff(ModContent.BuffType<DaedalusSummonSetBuff>(), 3600, true);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<DaedalusCrystal>()] < 1)
{
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<DaedalusCrystal>(), (int)(95f * player.MinionDamage()), 0f, Main.myPlayer, 50f, 0f);
}
}
player.minionDamage += 0.2f;
player.maxMinions += 2;
}
public override void UpdateEquip(Player player)
{
player.minionDamage += 0.05f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<VerstaltiteBar>(), 8);
recipe.AddIngredient(ItemID.CrystalShard, 3);
recipe.AddIngredient(ModContent.ItemType<EssenceofEleum>());
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}