Dash accessory

RynSus

Terrarian
C#:
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Localization;
using Terraria;
using trib;
namespace trib.Accessories
{
    [AutoloadEquip(EquipType.Wings)]
    public class DarkBoots : ModItem
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("Emperial boots"); // By default, capitalization in classnames will add spaces to the display name. You can customize the display name here by uncommenting this line.
            Tooltip.SetDefault("Dash at the speed of light");
        }

        public override void SetDefaults()
        {
            item.width = 20;
            item.height = 20;
            item.value = 500000;
            item.rare = -22;
            item.accessory = true;
        }
        public override void UpdateAccessory(Player player, bool hideVisual) {
            player.moveSpeed += 7f;
            player.accRunSpeed += 6f;
            player.GetModPlayer<GlobalPlayer>().db = true;
            player.moveSpeed += 0.25f;
            player.wingTimeMax = 300;
        }
        public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising,
            ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
        {
            ascentWhenFalling = 0.1f;
            ascentWhenRising = 0.45f;
            maxCanAscendMultiplier = 1.5f;
            maxAscentMultiplier = 6f;
            constantAscend = 0.3f;
        }

        public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration)
        {
            speed = 9f;
            acceleration *= 2.5f;
        }
        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.DirtBlock, 1);
            recipe.AddTile(TileID.WorkBenches);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}
I am having trouble creating a dash accessory, i have looked through examplemod and that just left me with more questions. I searched several times for this but could not find anything helpful. I am a complete beginner and have pretty much no clue what im doing, could someone please help. (i provided the code for the accessory even thought idk if that helps)
 
Back
Top Bottom