Plant tier

This commit is contained in:
Altixal committed 2025-05-09 13:50:44 +07:00
1 parent ddf41a2eb8
commit 2e6b459c5f
7 files changed
+68 -18

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@
BoneWings = 8,
FlameWings = 9,
FrozenWings = 10,
SpectreWings = 11,
GhostWings = 11, // Spectre Wings
SteampunkWings = 12,
LeafWings = 13,
BatWings = 14,
+35
View File
@@ -19,6 +19,11 @@ namespace CalamityMod.Items.Accessories.Wings
public override float MaxAscentSpeed => 2.5f;
public override float BaseAscent => 0.125f;
// How powerful the acceleration increase is while pressing UP
// This also affects the flight time tick rate
// 1f = 2x as fast and 2x flight time drainage
public static float BoostPower = 1.5f;
public override void SetStaticDefaults() => ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(120, 8f, 1.5f);
public override void SetDefaults()
@@ -84,6 +89,36 @@ namespace CalamityMod.Items.Accessories.Wings
player.noFallDmg = true;
}
public override void AdditionalFlightMovement(Player player)
{
if (player.TryingToHoverUp)
{
player.velocity.Y -= BaseAscent * BoostPower * player.gravDir;
if (player.gravDir == 1f)
{
if (player.velocity.Y > 0f)
player.velocity.Y -= BonusAscentWhileFalling * BoostPower;
else if (player.velocity.Y > Player.jumpSpeed * RisingSpeedThreshold * -BoostPower)
player.velocity.Y -= BonusAscentWhileRising * BoostPower;
if (player.velocity.Y < Player.jumpSpeed * MaxAscentSpeed * -BoostPower)
player.velocity.Y = Player.jumpSpeed * MaxAscentSpeed * -BoostPower;
}
else
{
if (player.velocity.Y < 0f)
player.velocity.Y += BonusAscentWhileFalling * BoostPower;
else if (player.velocity.Y < Player.jumpSpeed * RisingSpeedThreshold * BoostPower)
player.velocity.Y += BonusAscentWhileRising * BoostPower;
if (player.velocity.Y > Player.jumpSpeed * MaxAscentSpeed * BoostPower)
player.velocity.Y = Player.jumpSpeed * MaxAscentSpeed * BoostPower;
}
player.wingTime -= BoostPower - 1f;
}
}
public override void AddRecipes()
{
CreateRecipe().
+12 -13
View File
@@ -34,18 +34,6 @@ namespace CalamityMod.Items.Accessories.Wings
{
if (player.controlJump && player.wingTime > 0f && player.jump == 0)
{
bool hovering = player.TryingToHoverDown && !player.merman;
if (hovering)
{
player.velocity.Y *= 0.2f;
if (player.velocity.Y > -2f && player.velocity.Y < 2f)
{
// I can't get the player to have zero y velocity (setting it to 0 doesn't work and I tried a lot of numbers)
player.velocity.Y = 0.105f;
}
player.wingTime += 0.75f;
}
if (player.velocity.Y != 0f && !hideVisual)
{
float xOffset = 4f;
@@ -53,7 +41,7 @@ namespace CalamityMod.Items.Accessories.Wings
{
xOffset = -40f;
}
if (!hovering || Main.rand.NextBool(3))
if (!player.TryingToHoverDown || Main.rand.NextBool(3))
{
int idx = Dust.NewDust(new Vector2(player.Center.X + xOffset, player.Center.Y - 15f), 30, 30, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 1.75f);
Main.dust[idx].noGravity = true;
@@ -68,5 +56,16 @@ namespace CalamityMod.Items.Accessories.Wings
}
player.noFallDmg = true;
}
public override void AdditionalFlightMovement(Player player)
{
if (player.TryingToHoverDown && player.controlJump && player.wingTime > 0f && !player.merman)
{
player.wingTime += 0.5f;
player.velocity.Y *= 0.8f;
if (player.velocity.Y > -2f && player.velocity.Y < 1f)
player.velocity.Y = 1E-05f;
}
}
}
}
+16 -2
View File
@@ -195,13 +195,17 @@ namespace CalamityMod.Items
// 160 -> 180 flight time, 7.5 -> 6.25 horizontal speed
stats[(int)VanillaWingID.BatWings].FlyTime = 180;
stats[(int)VanillaWingID.BatWings].AccRunSpeedOverride = 6.25f;
// 1 -> 1.5 acceleration multiplier
stats[(int)VanillaWingID.ButterflyWings].AccRunAccelerationMult = 1.5f;
// 170 -> 240 flight time
stats[(int)VanillaWingID.BoneWings].FlyTime = 240;
// 160 -> 170 flight time, 7.5 -> 9 horizontal speed, 1 -> 2 acceleration multiplier
// 160 -> 170 flight time, 7.5 -> 9 horizontal speed, 1 -> 1.5 acceleration multiplier
stats[(int)VanillaWingID.LeafWings].FlyTime = 170;
stats[(int)VanillaWingID.LeafWings].AccRunSpeedOverride = 9f;
stats[(int)VanillaWingID.LeafWings].AccRunAccelerationMult = 2f;
stats[(int)VanillaWingID.LeafWings].AccRunAccelerationMult = 1.5f;
// (Spectre Wings) 1 -> 2 acceleration multiplier
stats[(int)VanillaWingID.GhostWings].AccRunAccelerationMult = 2f;
// 170 -> 210 flight time
stats[(int)VanillaWingID.BeetleWings].FlyTime = 210;
@@ -1430,6 +1434,12 @@ namespace CalamityMod.Items
if (item.type == ItemID.DemonWings && !player.mount.Active)
player.maxFallSpeed *= 1.3f;
if (item.type == ItemID.BeeWings && !player.mount.Active && !player.controlDown)
{
player.gravity *= 0.6f;
player.maxFallSpeed *= 0.6f;
}
if (item.type == ItemID.FinWings)
player.ignoreWater = true;
@@ -1529,6 +1539,10 @@ namespace CalamityMod.Items
maxAscentMultiplier *= 0.9f;
constantAscend *= 5f;
break;
case ItemID.GhostWings:
maxAscentMultiplier *= 0.904f;
constantAscend *= 5f;
break;
default:
break;
}
+2 -2
View File
@@ -1274,7 +1274,7 @@ namespace CalamityMod.Items
AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.5f, 0.1f);
if (item.type == ItemID.BeeWings)
AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.5f, 0.1f);
AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.5f, 0.1f, "BeeWings");
if (item.type == ItemID.HarpyWings)
AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.5f, 0.1f);
@@ -1289,7 +1289,7 @@ namespace CalamityMod.Items
AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.5f, 0.1f);
if (item.type == ItemID.GhostWings)
AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.66f, 0.1f);
AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.5f, 0.5f);
if (item.type == ItemID.BeetleWings)
AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.66f, 0.1f);
@@ -3,6 +3,7 @@ AureateBooster: {
Tooltip:
'''
{$CommonItemTooltip.FlightAndSlowfall}
{$CommonItemTooltip.PressUpToBooster}
'Mach speed with style!'
'''
}
@@ -1,3 +1,4 @@
BeeWings: Decreases fall speed while not pressing {$Key.DOWN}
BoneWings: Halves flight time when taking a hit
DemonWings: Increases fall speed
FestiveWings: Homing ornaments rain down as you fly