-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using HutongGames.PlayMaker; | ||
using HutongGames.PlayMaker.Actions; | ||
using Vasi; | ||
|
||
namespace GodSeekerPlus { | ||
internal static class FastSuperDash { | ||
public static int times = 0; | ||
|
||
public static void Hook() => On.PlayMakerFSM.OnEnable += ModifyFSM; | ||
|
||
public static void UnHook() => On.PlayMakerFSM.OnEnable -= ModifyFSM; | ||
|
||
private static void ModifyFSM(On.PlayMakerFSM.orig_OnEnable orig, PlayMakerFSM self) { | ||
if (self.gameObject.name == "Knight" && self.FsmName == "Superdash") { | ||
FsmState stateWsSpdBuff = FsmUtil.CreateState(self, "GSP Workshop Speed Buff"); | ||
|
||
FsmUtil.AddAction(stateWsSpdBuff, new CheckSceneName() { | ||
sceneName = "GG_Workshop", | ||
notEqualEvent = FsmEvent.Finished | ||
}); | ||
FsmUtil.AddAction(stateWsSpdBuff, new FloatMultiply() { | ||
floatVariable = self.FsmVariables.FindFsmFloat("Current SD Speed"), | ||
multiplyBy = 1.5f | ||
}); | ||
|
||
FsmUtil.ChangeTransition(FsmUtil.GetState(self, "Left"), FsmEvent.Finished.Name, stateWsSpdBuff.Name); | ||
FsmUtil.ChangeTransition(FsmUtil.GetState(self, "Right"), FsmEvent.Finished.Name, stateWsSpdBuff.Name); | ||
|
||
FsmUtil.AddTransition(stateWsSpdBuff, FsmEvent.Finished.Name, "Dash Start"); | ||
|
||
GodSeekerPlus.Instance.Log("Superdash FSM modified"); | ||
} | ||
|
||
orig(self); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters