need to look for correct wings behavior

This commit is contained in:
Emilia(SleepeeSoftware) 2026-02-21 20:23:40 +01:00
parent ec42e38dae
commit 4831105c03
4 changed files with 70 additions and 59 deletions

2
.gitignore vendored
View File

@ -1,2 +1,4 @@
bin/
obj/
.vscode
Assets/

View File

@ -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;
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();
}
//if (player.)
player.CancelAllBootRunVisualEffects(); // This ensures that boot visual effects don't overlap if multiple are equipped
player.GetModPlayer<SpacesuitStatBonusAccessoryPlayer>().SpacesuitStatBonusAccessory = true;
}
// 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
}
// 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;
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);
}
}
}
}
}

View File

@ -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();
}
}

View File

@ -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