69 lines
2.6 KiB
C#
69 lines
2.6 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 VictideHeadgear : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Victide Headgear");
|
|
Tooltip.SetDefault("5% increased rogue damage");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 18;
|
|
item.height = 18;
|
|
item.value = Item.buyPrice(0, 1, 50, 0);
|
|
item.rare = 2;
|
|
item.defense = 3; //10
|
|
}
|
|
|
|
public override bool IsArmorSet(Item head, Item body, Item legs)
|
|
{
|
|
return body.type == ModContent.ItemType<VictideBreastplate>() && legs.type == ModContent.ItemType<VictideLeggings>();
|
|
}
|
|
|
|
public override void UpdateArmorSet(Player player)
|
|
{
|
|
player.setBonus = "Increased life regen and rogue damage while submerged in liquid\n" +
|
|
"When using any weapon you have a 10% chance to throw a returning seashell projectile\n" +
|
|
"This seashell does true damage and does not benefit from any damage class\n" +
|
|
"Slightly reduces breath loss in the abyss\n" +
|
|
"Rogue stealth builds while not attacking and not moving, up to a max of 100\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.victideSet = true;
|
|
modPlayer.rogueStealthMax += 1f;
|
|
modPlayer.wearingRogueArmor = true;
|
|
player.ignoreWater = true;
|
|
if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
|
|
{
|
|
player.Calamity().throwingDamage += 0.1f;
|
|
player.lifeRegen += 3;
|
|
}
|
|
}
|
|
|
|
public override void UpdateEquip(Player player)
|
|
{
|
|
player.Calamity().throwingDamage += 0.05f;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<VictideBar>(), 3);
|
|
recipe.AddTile(TileID.Anvils);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|