From 4831105c0317870e8e94d30faa40b083f86ecdd2 Mon Sep 17 00:00:00 2001 From: "Emilia(SleepeeSoftware)" Date: Sat, 21 Feb 2026 20:23:40 +0100 Subject: [PATCH] need to look for correct wings behavior --- .gitignore | 2 + Content/Items/Accessories/Spacesuit.cs | 52 +++++++++---------------- Content/Items/Accessories/Spacesurf.cs | 54 +++++++++++++++++++++++--- README.md | 21 +--------- 4 files changed, 70 insertions(+), 59 deletions(-) diff --git a/.gitignore b/.gitignore index 59fc676..9ee37dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ bin/ obj/ +.vscode +Assets/ diff --git a/Content/Items/Accessories/Spacesuit.cs b/Content/Items/Accessories/Spacesuit.cs index 29978d6..fb52fe3 100644 --- a/Content/Items/Accessories/Spacesuit.cs +++ b/Content/Items/Accessories/Spacesuit.cs @@ -44,12 +44,15 @@ namespace Emiliasmod.Content.Items.Accessories player.fireWalk = true; player.noFallDmg = true; player.lavaRose = true; - //player.lavaMax += 20 * 60; + player.lavaImmune = true; + player.statDefense += DefenseBonus; - player.arcticDivingGear = true; - player.accMerman = true; + if (player.wet || player.honeyWet || player.lavaWet || player.shimmerWet) { + player.arcticDivingGear = true; + player.accMerman = true; + } if (Main.dayTime == false) { player.wereWolf = true; @@ -76,42 +79,25 @@ namespace Emiliasmod.Content.Items.Accessories player.GetAttackSpeed(DamageClass.Generic) += 0.10f; player.GetCritChance(DamageClass.Generic) += 4f; player.GetKnockback(DamageClass.Summon) += 0.5f; + player.blockRange += 1; player.pickSpeed -= 0.15f; - player.moveSpeed += 0.08f; + player.accRunSpeed *= 3.75f; + player.runSlowdown *= 1.75f; if (!hideVisual) { - player.CancelAllBootRunVisualEffects(); + player.CancelAllBootRunVisualEffects(); // This ensures that boot visual effects don't overlap if multiple are equipped + + // Hellfire Treads sprint dust. For more info on sprint dusts see Player.SpawnFastRunParticles() method in Player.cs + player.hellfireTreads = true; + // Other boot run visual effects include: sailDash, coldDash, desertDash, fairyBoots + + if (!player.mount.Active || player.mount.Type != MountID.WallOfFleshGoat) { + // Spawns flames when walking, like Flame Waker Boots. We also check the Goat Skull mount so the effects don't overlap. + player.DoBootsEffect(player.DoBootsEffect_PlaceFlamesOnTile); + } } - //if (player.) - - player.GetModPlayer().SpacesuitStatBonusAccessory = true; - } - - } - - // Some movement effects are not suitable to be modified in ModItem.UpdateAccessory due to how the math is done. - // ModPlayer.PostUpdateRunSpeeds is suitable for these modifications. - public class SpacesuitStatBonusAccessoryPlayer : ModPlayer - { - public bool SpacesuitStatBonusAccessory = false; - - public override void ResetEffects() { - SpacesuitStatBonusAccessory = false; - } - - public override void PostUpdateRunSpeeds() { - //// We only want our additional changes to apply if ExampleStatBonusAccessory is equipped and not on a mount. - if (Player.mount.Active || !SpacesuitStatBonusAccessory) { - return; - } - - // The following modifications are similar to Shadow Armor set bonus - Player.runAcceleration *= 1.75f; - Player.maxRunSpeed *= 1.15f; - Player.accRunSpeed *= 6.75f; - Player.runSlowdown *= 1.75f; } } } diff --git a/Content/Items/Accessories/Spacesurf.cs b/Content/Items/Accessories/Spacesurf.cs index 7c6cebe..dd9962e 100644 --- a/Content/Items/Accessories/Spacesurf.cs +++ b/Content/Items/Accessories/Spacesurf.cs @@ -19,21 +19,63 @@ namespace Emiliasmod.Content.Items.Accessories 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.wingTimeMax = 100000; - player.moveSpeed += 0.1f; - //player.jumpSpeedBoost += 1.8f; + 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.CelestialSigil, 1); + recipe.AddIngredient(ItemID.EmpressFlightBooster, 1); recipe.AddIngredient(ItemID.MoonLordLegs, 1); recipe.AddIngredient(ItemID.LongRainbowTrailWings, 1); + recipe.AddIngredient(ItemID.MasterNinjaGear, 1); recipe.Register(); } } diff --git a/README.md b/README.md index d5eefb0..ae522d1 100644 --- a/README.md +++ b/README.md @@ -71,23 +71,4 @@ ___ - spacesuit (Terrarian upgrade + Mystical Conch + Diving gear) - Alien Surf (Sigil + Celestial Starboard) - Space Combat (Top Down Ship Control). - - - -Items: { - EmiliasWand: { - DisplayName: Emilias Wand - Tooltip: - ''' - Is it a Drill ? is it a Sword ? It's an Hitachi Magic Wand !! (never used ?) - ''' - } - Spacesuit: { - DisplayName: Spacesuit - Tooltip: - Are you ready for Space ? - ''' - Beam me up !!!! - ''' - } -} + - Drill Containment Unit need to be integrated as it come very nicely into the mods as a post moonlord mount