70 lines
2.7 KiB
C#
70 lines
2.7 KiB
C#
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Items.Materials;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using static Terraria.Player;
|
|
|
|
namespace CalamityMod.Items.Armor
|
|
{
|
|
[AutoloadEquip(EquipType.Head)]
|
|
public class StatigelMask : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Statigel Mask");
|
|
Tooltip.SetDefault("10% increased rogue damage and 34% chance to not consume rogue items\n" +
|
|
"7% increased rogue critical strike chance and 12% increased movement speed");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 18;
|
|
item.height = 18;
|
|
item.value = Item.buyPrice(0, 5, 0, 0);
|
|
item.rare = 4;
|
|
item.defense = 6; //23
|
|
}
|
|
|
|
public override bool IsArmorSet(Item head, Item body, Item legs)
|
|
{
|
|
return body.type == ModContent.ItemType<StatigelArmor>() && legs.type == ModContent.ItemType<StatigelGreaves>();
|
|
}
|
|
|
|
public override void UpdateArmorSet(Player player)
|
|
{
|
|
player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" +
|
|
"Grants an extra jump and increased jump height\n" +
|
|
"Rogue stealth builds while not attacking and slower while 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.statigelSet = true;
|
|
modPlayer.rogueStealthMax += 1f;
|
|
player.doubleJumpSail = true;
|
|
Player.jumpHeight += 5;
|
|
player.jumpSpeedBoost += 1.5f;
|
|
player.Calamity().wearingRogueArmor = true;
|
|
}
|
|
|
|
public override void UpdateEquip(Player player)
|
|
{
|
|
player.Calamity().throwingAmmoCost66 = true;
|
|
player.Calamity().throwingDamage += 0.1f;
|
|
player.Calamity().throwingCrit += 7;
|
|
player.moveSpeed += 0.12f;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<PurifiedGel>(), 5);
|
|
recipe.AddIngredient(ItemID.HellstoneBar, 9);
|
|
recipe.AddTile(TileID.Anvils);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|