83 lines
2.3 KiB
C#
83 lines
2.3 KiB
C#
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace Emiliasmod.Content.Items.Accessories
|
|
{
|
|
[AutoloadEquip(EquipType.Wings)]
|
|
public class Spacesurf : ModItem
|
|
{
|
|
public override void SetStaticDefaults() {
|
|
ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(180, 14f, 4f, true);
|
|
}
|
|
|
|
public override void SetDefaults() {
|
|
Item.CloneDefaults(ItemID.LongRainbowTrailWings);
|
|
//Item.width = 22;
|
|
//Item.height = 20;
|
|
Item.value = Item.sellPrice(platinum: 1, gold: 35);
|
|
Item.rare = ItemRarityID.Red;
|
|
Item.accessory = true;
|
|
Item.wingSlot = 45;
|
|
}
|
|
|
|
public override void UpdateAccessory(Player player, bool hideVisual) {
|
|
player.empressBrooch = true;
|
|
player.moonLordLegs = true;
|
|
player.moveSpeed += 0.35f;
|
|
player.dashType = 1;
|
|
//player.wings = 45;
|
|
//player.wingsLogic = 45;
|
|
//if (player.TryingToHoverUp)
|
|
//{
|
|
// player.velocity.Y -= 0.4f * player.gravDir;
|
|
// if (player.gravDir == 1f)
|
|
// {
|
|
// if (player.velocity.Y > 0f)
|
|
// {
|
|
// player.velocity.Y -= 1f;
|
|
// }
|
|
// else if (player.velocity.Y > 0f - jumpSpeed)
|
|
// {
|
|
// player.velocity.Y -= 0.2f;
|
|
// }
|
|
// if (player.velocity.Y < (0f - jumpSpeed) * 3f)
|
|
// {
|
|
// player.velocity.Y = (0f - jumpSpeed) * 3f;
|
|
// }
|
|
// }
|
|
// else
|
|
// {
|
|
// if (player.velocity.Y < 0f)
|
|
// {
|
|
// player.velocity.Y += 1f;
|
|
// }
|
|
// else if (player.velocity.Y < jumpSpeed)
|
|
// {
|
|
// player.velocity.Y += 0.2f;
|
|
// }
|
|
// if (player.velocity.Y > jumpSpeed * 3f)
|
|
// {
|
|
// player.velocity.Y = jumpSpeed * 3f;
|
|
// }
|
|
// }
|
|
//}
|
|
//if (player.TryingToHoverDown && !player.controlJump && player.velocity.Y != 0f)
|
|
//{
|
|
// player.velocity.Y += 0.4f;
|
|
//}
|
|
}
|
|
|
|
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.AddIngredient(ItemID.MasterNinjaGear, 1);
|
|
recipe.Register();
|
|
}
|
|
}
|
|
}
|