Skip to content

Commit

Permalink
Added Sharp shadow charm bonus
Browse files Browse the repository at this point in the history
  • Loading branch information
kot9pa16lvl committed Mar 17, 2024
1 parent b0fe7d2 commit fc38170
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CelesteDash/CelesteDash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ private bool CanDash8Dir(On.HeroController.orig_CanDash orig, HeroController sel
}
///TODO: charm 16
maxDashSpeed = HeroControllerR.DASH_SPEED;
if ((HeroControllerR.playerData.GetBool("equippedCharm_16")))
{
maxDashSpeed = HeroControllerR.DASH_SPEED_SHARP;
}
float dashSpeedx = Math.Max(maxDashSpeed, Math.Abs(HeroControllerR.current_velocity.x));
float dashSpeedy = maxDashSpeed;
if ((dashDir.y < -0.001f)) //&& (maxDashSpeed < Math.Abs(HeroControllerR.current_velocity.x)))
Expand Down Expand Up @@ -257,7 +261,7 @@ private bool CanJumpNoDash(On.HeroController.orig_CanJump orig, HeroController s
lastVel.x = maxDashSpeed * Math.Sign(dashDir.x) * 1.2f;
lastVel.y = 0f;
inHyper = true;
} else if ((dashDir.y < -0.001f) && (Math.Abs(lastVel.x > maxDashSpeed - 0.001f)) /// intended ultra
} else if ((dashDir.y < -0.001f) && (Math.Abs(lastVel.x) > maxDashSpeed - 0.001f)) /// intended ultra
{
lastVel.x = lastVel.x * 1.2f;
lastVel.y = 0f;
Expand Down

0 comments on commit fc38170

Please sign in to comment.