2 - (Example) Post DoG items are now 2 platinum instead of 1 platinum 40 gold. 3 - (Example) Dev items are now 2 platinum 80 gold instead of 2 platinum. 4 - Privated numeric rarity item values. 5 - All assigned item values use the rarity's names, e.g. RarityLightPurpleBuyPrice.
50 lines
1.4 KiB
C#
50 lines
1.4 KiB
C#
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Items.Materials;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Accessories
|
|
{
|
|
[AutoloadEquip(EquipType.Face)]
|
|
public class FeatherCrown : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Accessories";
|
|
public override void SetStaticDefaults()
|
|
{
|
|
|
|
if (Main.netMode != NetmodeID.Server)
|
|
{
|
|
int equipSlot = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Face);
|
|
ArmorIDs.Face.Sets.OverrideHelmet[equipSlot] = true;
|
|
}
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 44;
|
|
Item.height = 38;
|
|
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
|
|
Item.rare = ItemRarityID.Orange;
|
|
Item.accessory = true;
|
|
}
|
|
|
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
|
{
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
modPlayer.rogueVelocity += 0.15f;
|
|
modPlayer.featherCrown = true;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddRecipeGroup("AnyGoldCrown").
|
|
AddIngredient<AerialiteBar>(6).
|
|
AddIngredient(ItemID.Feather, 8).
|
|
AddTile(TileID.SkyMill).
|
|
Register();
|
|
}
|
|
}
|
|
}
|