Melee speed changes on accessories, armors, and buffs. All changes are based on the list posted in tester feedback and all are in except vanilla armor adjustments and feral claw upgrade stacking.
68 lines
2.1 KiB
C#
68 lines
2.1 KiB
C#
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Rarities;
|
|
using CalamityMod.Tiles.Furniture.CraftingStations;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria.GameContent;
|
|
|
|
namespace CalamityMod.Items.Accessories
|
|
{
|
|
public class DarkSunRing : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Accessories";
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 7));
|
|
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 42;
|
|
Item.height = 60;
|
|
Item.value = CalamityGlobalItem.Rarity14BuyPrice;
|
|
Item.defense = 10;
|
|
Item.lifeRegen = 1;
|
|
Item.accessory = true;
|
|
Item.rare = ModContent.RarityType<DarkBlue>();
|
|
}
|
|
|
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
|
{
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
modPlayer.darkSunRing = true;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient<UelibloomBar>(10).
|
|
AddIngredient<DarksunFragment>(20).
|
|
AddTile<CosmicAnvil>().
|
|
Register();
|
|
}
|
|
|
|
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
|
{
|
|
CalamityUtils.DrawInventoryCustomScale(
|
|
spriteBatch,
|
|
texture: TextureAssets.Item[Type].Value,
|
|
position,
|
|
frame,
|
|
drawColor,
|
|
itemColor,
|
|
origin,
|
|
scale,
|
|
wantedScale: 0.8f,
|
|
drawOffset: new(0f, 0f)
|
|
);
|
|
return false;
|
|
}
|
|
}
|
|
}
|