Skip to content

Commit

Permalink
If player has Dashmaster he can choose if he wants to use regular das…
Browse files Browse the repository at this point in the history
…h or shadow dash by pressing or not pressing shift
  • Loading branch information
kot9pa16lvl committed Mar 17, 2024
1 parent fc38170 commit 89ab91e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CelesteDash/CelesteDash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class CelesteDashMod : Mod
private static float maxDashSpeed;
private static bool isDashJumpExtended;
private static float recoilSpeed;
public static string NO_SHADOW_DASH_BUTTON = "left shift";
public static float BtF(bool x)
{
if (x) { return 1f; }
Expand Down Expand Up @@ -63,6 +64,7 @@ public override void Initialize()
isDashJumpExtended = true;
maxDashSpeed = 0;
recoilSpeed = 20f;
NO_SHADOW_DASH_BUTTON = "left shift";
// put additional initialization logic here

Log("Initialized");
Expand Down Expand Up @@ -229,7 +231,12 @@ private bool CanDash8Dir(On.HeroController.orig_CanDash orig, HeroController sel
}
///TODO: charm 16
maxDashSpeed = HeroControllerR.DASH_SPEED;
if ((HeroControllerR.playerData.GetBool("equippedCharm_16")))

if (Input.GetKey(NO_SHADOW_DASH_BUTTON) && (HeroControllerR.playerData.GetBool("equippedCharm_31"))) // dashmaster allows use regular dash
{
HeroControllerR.shadowDashTimer = 0.001f;
}
else if ((HeroControllerR.playerData.GetBool("equippedCharm_16")) && (HeroControllerR.shadowDashTimer < 0.001f))
{
maxDashSpeed = HeroControllerR.DASH_SPEED_SHARP;
}
Expand Down

0 comments on commit 89ab91e

Please sign in to comment.