2 - Buffed Wulfrum armor damage so that it actually does something to early game weapons and adjusted a few other early game armors as well. 3 - Fixed Large Perf Worm freaking out.
60 lines
1.8 KiB
C#
60 lines
1.8 KiB
C#
using CalamityMod.Items.Materials;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Armor
|
|
{
|
|
[AutoloadEquip(EquipType.Head)]
|
|
public class WulfrumHelm : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Wulfrum Helm");
|
|
Tooltip.SetDefault("10% increased melee damage");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 18;
|
|
item.height = 18;
|
|
item.value = Item.buyPrice(0, 0, 75, 0);
|
|
item.rare = ItemRarityID.Blue;
|
|
item.defense = 3; //8
|
|
}
|
|
|
|
public override bool IsArmorSet(Item head, Item body, Item legs)
|
|
{
|
|
return body.type == ModContent.ItemType<WulfrumArmor>() && legs.type == ModContent.ItemType<WulfrumLeggings>();
|
|
}
|
|
|
|
public override void UpdateArmorSet(Player player)
|
|
{
|
|
player.setBonus = "Enemies are more likely to target you\n" +
|
|
"+3 defense\n" +
|
|
"+5 defense when below 50% life";
|
|
player.statDefense += 3; //11
|
|
if (player.statLife <= (int)(player.statLifeMax2 * 0.5))
|
|
{
|
|
player.statDefense += 5; //16
|
|
}
|
|
player.aggro += 100;
|
|
}
|
|
|
|
public override void UpdateEquip(Player player)
|
|
{
|
|
player.meleeDamage += 0.1f;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<WulfrumShard>(), 5);
|
|
recipe.AddIngredient(ModContent.ItemType<EnergyCore>());
|
|
recipe.AddTile(TileID.Anvils);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|