using Terraria; using Terraria.DataStructures; using Terraria.GameContent.Creative; using Terraria.ID; using Terraria.ModLoader; namespace Emiliasmod.Content.Items.Accessories { [Autoload(false)] public class Spacesurf : ModItem { public override string Texture => $"Emiliasmod/Assets/Texture/{Name}"; //public abstract int FlyTime { get; } //public abstract float FlySpeed { get; } //public abstract float Acceleration { get; } //public abstract bool CanHover { get; } public int FlyTime = 180; public float FlySpeed = 9.0f; public float Acceleration = 4.5f; public bool CanHover = true; public override void SetStaticDefaults() { ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(FlyTime, FlySpeed, Acceleration, CanHover); } public override void SetDefaults() { Item.width = 22; Item.height = 20; Item.value = Item.sellPrice(platinum: 1, gold: 35); Item.rare = ItemRarityID.Red; Item.accessory = true; Item.master = true; Item.wingSlot = Item.type; } public override void UpdateAccessory(Player player, bool hideVisual) { player.empressBrooch = true; player.moonLordLegs = true; player.moveSpeed += 0.15f; player.wingsLogic = 45; } public override void AddRecipes() { Recipe recipe = CreateRecipe(); recipe.AddCondition(Condition.DownedMoonLord); recipe.AddIngredient(ItemID.EmpressFlightBooster, 1); recipe.AddIngredient(ItemID.MoonLordLegs, 1); recipe.AddIngredient(ItemID.LongRainbowTrailWings, 1); recipe.Register(); } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentSpeed, ref float ascentRunSpeed) { ascentWhenFalling = 0.85f; ascentWhenRising = 0.15f; maxCanAscendMultiplier = 1f; maxAscentSpeed = 3f; ascentRunSpeed = 2.5f; } } }