-
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
6 changed files
with
54 additions
and
3 deletions.
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
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
47 changes: 47 additions & 0 deletions
47
GodSeekerPlus/Modules/BossChallenge/InfiniteGrimmPufferfish.cs
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,47 @@ | ||
namespace GodSeekerPlus.Modules.BossChallenge; | ||
|
||
[Category(nameof(BossChallenge))] | ||
[ToggleableLevel(ToggleableLevel.ChangeScene)] | ||
internal sealed class InfiniteGrimmPufferfish : Module { | ||
private protected override void Load() => | ||
On.PlayMakerFSM.Start += ModifyFSM; | ||
|
||
private protected override void Unload() => | ||
On.PlayMakerFSM.Start -= ModifyFSM; | ||
|
||
private void ModifyFSM(On.PlayMakerFSM.orig_Start orig, PlayMakerFSM self) { | ||
orig(self); | ||
|
||
if (BossSequenceController.IsInSequence) { | ||
return; | ||
} | ||
|
||
if (self is { | ||
gameObject: { | ||
scene.name: "GG_Grimm", | ||
name: "Grimm Boss" | ||
}, | ||
FsmName: "Control" | ||
}) { | ||
ModifyGrimmFSM(self); | ||
|
||
Logger.LogDebug("Grimm FSM modified"); | ||
} else if (self is { | ||
gameObject: { | ||
scene.name: "GG_Grimm_Nightmare", | ||
name: "Nightmare Grimm Boss" | ||
}, | ||
FsmName: "Control" | ||
}) { | ||
ModifyNKGFSM(self); | ||
|
||
Logger.LogDebug("NKG FSM modified"); | ||
} | ||
} | ||
|
||
private static void ModifyGrimmFSM(PlayMakerFSM fsm) => | ||
fsm.ChangeTransition("Out Pause", FsmEvent.Finished.Name, "Balloon Pos"); | ||
|
||
private static void ModifyNKGFSM(PlayMakerFSM fsm) => | ||
fsm.ChangeTransition("Out Pause", FsmEvent.Finished.Name, "Balloon Pos"); | ||
} |
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