using CalamityMod.CalPlayer; using CalamityMod.CalPlayer.Dashes; using CalamityMod.Items.Materials; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using Terraria.GameContent; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace CalamityMod.Items.Accessories { [LegacyName("StatisBeltOfCurses")] public class StatisVoidSash : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; public override void SetStaticDefaults() { Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(8, 3)); ItemID.Sets.AnimatesAsSoul[Type] = true; } public override void SetDefaults() { Item.width = 28; Item.height = 32; Item.accessory = true; Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); player.autoJump = true; player.jumpSpeedBoost += 0.6f; player.noFallDmg = true; player.blackBelt = true; modPlayer.DashID = StatisVoidSashDash.ID; player.dashType = 0; player.spikedBoots = 2; } public override void AddRecipes() { CreateRecipe(). AddIngredient(). AddIngredient(10). AddIngredient(20). AddTile(). 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: 1f, drawOffset: new(0f, 0f) ); return false; } } }