Skip to content

Commit

Permalink
feat: no dive invincibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Clazex committed Jun 13, 2022
1 parent 0abb2c8 commit f850452
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion GodSeekerPlus/GodSeekerPlus.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyTitle>GodSeekerPlus</AssemblyTitle>
<Version>0.19.9</Version>
<Version>0.20.0</Version>
<Description>A Hollow Knight mod to enhance your Godhome experience</Description>
<Authors>Clazex</Authors>

Expand Down
41 changes: 41 additions & 0 deletions GodSeekerPlus/Modules/Restrictions/NoDiveInvincibility.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
namespace GodSeekerPlus.Modules.Restrictions;

internal sealed class NoDiveInvincibility : Module {
private PlayMakerFSM? spellControl = null;

public NoDiveInvincibility() =>
On.HeroController.Awake += GetSpellControl;

private protected override void Load() {
On.HeroController.Start += ModifySpellControlFSM;

Apply(true);
}

private protected override void Unload() {
On.HeroController.Start -= ModifySpellControlFSM;

Apply(false);
}

private void GetSpellControl(On.HeroController.orig_Awake orig, HeroController self) {
spellControl = self.gameObject.LocateMyFSM("Spell Control");

orig(self);
}

private void ModifySpellControlFSM(On.HeroController.orig_Start orig, HeroController self) {
orig(self);

Apply(ModuleManager.TryGetActiveModule<NoDiveInvincibility>(out _));
}

private void Apply(bool active) {
if (spellControl == null) {
return;
}

spellControl.GetAction<CallMethodProper>("Quake1 Down", 4).Enabled = !active;
spellControl.GetAction<CallMethodProper>("Quake2 Down", 4).Enabled = !active;
}
}
1 change: 1 addition & 0 deletions GodSeekerPlus/Resources/Lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"Modules/InfiniteRadianceClimbing": "Infinite Radiance Climbing",
"Modules/MemorizeBindings": "Memorize Bindings",
"Modules/MorePantheonCaps": "More Pantheon Caps",
"Modules/NoDiveInvincibility": "No Dive Invincibility",
"Modules/NoFuryEffect": "No Fury Effect",
"Modules/NoLowHealthEffect": "No Low Health Effect",
"Modules/NoNailAttack": "No Nail Attack",
Expand Down
1 change: 1 addition & 0 deletions GodSeekerPlus/Resources/Lang/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"Modules/InfiniteRadianceClimbing": "无限辐光爬梯",
"Modules/MemorizeBindings": "记住束缚",
"Modules/MorePantheonCaps": "更多万神殿灯",
"Modules/NoDiveInvincibility": "取消下砸无敌",
"Modules/NoFuryEffect": "禁用亡怒效果",
"Modules/NoLowHealthEffect": "禁用低生命效果",
"Modules/NoNailAttack": "禁止骨钉攻击",
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Compatible with `Hollow Knight` 1.5.

- **Restrictions**:
+ **Create Lag**: Create a lag in every in-game frame.
+ **No Dive Invincibility**: Remove invincibility frames from Desolate Dive and Descending Dark.
+ **No Nail Attack**: Disable normal nail attack.
+ **No Nail Damage**: Remove damage from nail attacks, including nail arts.
+ **No Spell Damage**: Remove damage from spells, including Sharp Shadow.
Expand Down
1 change: 1 addition & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

- **限制**
+ **制造卡顿**:在游戏内的每帧添加卡顿。
+ **取消下砸无敌**:取消荒芜俯冲与黑暗降临的无敌帧。
+ **禁用骨钉攻击**:禁用普通骨钉攻击。
+ **取消骨钉伤害**:取消骨钉攻击伤害,包括骨钉技艺。
+ **取消法术伤害**:取消法术攻击伤害,包括锋利之影。
Expand Down

0 comments on commit f850452

Please sign in to comment.