Files
CalamityModPublic/Items/Armor/DaedalusVisor.cs
T

74 lines
2.7 KiB
C#

using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor
{
[AutoloadEquip(EquipType.Head)]
public class DaedalusVisor : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Daedalus Facemask");
Tooltip.SetDefault("13% increased rogue damage and 7% increased rogue critical strike chance, increases rogue velocity by 15%\n" +
"17% increased movement speed");
}
public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.value = Item.buyPrice(0, 25, 0, 0);
item.rare = 5;
item.defense = 7; //37
}
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 = "5% increased rogue damage\n" +
"Rogue projectiles throw out crystal shards as they travel\n" +
"Rogue stealth builds while not attacking and slower while moving, up to a max of 105\n" +
"Once you have built max stealth, you will be able to perform a Stealth Strike\n" +
"Rogue stealth only reduces when you attack, it does not reduce while moving\n" +
"The higher your rogue stealth the higher your rogue damage, crit, and movement speed";
CalamityPlayer modPlayer = player.Calamity();
modPlayer.daedalusSplit = true;
modPlayer.rogueStealthMax += 1.05f;
modPlayer.throwingDamage += 0.05f;
modPlayer.wearingRogueArmor = true;
}
public override void UpdateEquip(Player player)
{
player.Calamity().throwingVelocity += 0.15f;
player.Calamity().throwingDamage += 0.13f;
player.Calamity().throwingCrit += 7;
player.moveSpeed += 0.17f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<VerstaltiteBar>(), 8);
recipe.AddIngredient(ItemID.CrystalShard, 6);
recipe.AddIngredient(ModContent.ItemType<EssenceofEleum>());
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}