Skip to content

Commit

Permalink
feat: no nail attack, no nail damage and no spell damage
Browse files Browse the repository at this point in the history
  • Loading branch information
Clazex committed Jan 8, 2022
1 parent fa2d747 commit 06fd596
Show file tree
Hide file tree
Showing 8 changed files with 68 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.15.1</Version>
<Version>0.16.0</Version>
<Description>A Hollow Knight mod to enhance your Godhome experience</Description>
<Authors>Clazex</Authors>
<Copyright>Copyright © 2021 Clazex</Copyright>
Expand Down
3 changes: 3 additions & 0 deletions GodSeekerPlus/Lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"Modules/GreyPrinceEnterShort": "Grey Prince Enter Short",
"Modules/HalveDamage": "Halve Damage",
"Modules/MemorizeBindings": "Memorize Bindings",
"Modules/NoNailAttack": "No Nail Attack",
"Modules/NoNailDamage": "No Nail Damage",
"Modules/NoSpellDamage": "No Spell Damage",
"Modules/P5Health": "P5 Health",
"Modules/UnlockEternalOrdeal": "Unlock Eternal Ordeal",
"Modules/UnlockRadiance": "Unlock Radiance",
Expand Down
3 changes: 3 additions & 0 deletions GodSeekerPlus/Lang/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"Modules/GreyPrinceEnterShort": "灰色王子短入场",
"Modules/HalveDamage": "伤害减半",
"Modules/MemorizeBindings": "记住束缚",
"Modules/NoNailAttack": "禁止骨钉攻击",
"Modules/NoNailDamage": "取消骨钉伤害",
"Modules/NoSpellDamage": "取消法术伤害",
"Modules/P5Health": "五门血量",
"Modules/UnlockEternalOrdeal": "解锁无尽折磨",
"Modules/UnlockRadiance": "解锁辐光",
Expand Down
12 changes: 12 additions & 0 deletions GodSeekerPlus/Modules/Restrictions/NoNailAttack.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace GodSeekerPlus.Modules.Restrictions;

[Category(nameof(Restrictions))]
internal sealed class NoNailAttack : Module {
private protected override void Load() =>
On.HeroController.CanAttack += SuppressAttack;

private protected override void Unload() =>
On.HeroController.CanAttack -= SuppressAttack;

private bool SuppressAttack(On.HeroController.orig_CanAttack orig, HeroController self) => false;
}
18 changes: 18 additions & 0 deletions GodSeekerPlus/Modules/Restrictions/NoNailDamage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace GodSeekerPlus.Modules.Restrictions;

[Category(nameof(Restrictions))]
internal sealed class NoNailDamage : Module {
private protected override void Load() =>
On.HealthManager.TakeDamage += AddHealth;

private protected override void Unload() =>
On.HealthManager.TakeDamage -= AddHealth;

private void AddHealth(On.HealthManager.orig_TakeDamage orig, HealthManager self, HitInstance hitInstance) {
if (hitInstance.AttackType == AttackTypes.Nail) {
self.hp += hitInstance.DamageDealt;
}

orig(self, hitInstance);
}
}
19 changes: 19 additions & 0 deletions GodSeekerPlus/Modules/Restrictions/NoSpellDamage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace GodSeekerPlus.Modules.Restrictions;

[Category(nameof(Restrictions))]
internal sealed class NoSpellDamage : Module {
private protected override void Load() =>
On.HealthManager.TakeDamage += AddHealth;

private protected override void Unload() =>
On.HealthManager.TakeDamage -= AddHealth;

private void AddHealth(On.HealthManager.orig_TakeDamage orig, HealthManager self, HitInstance hitInstance) {
AttackTypes type = hitInstance.AttackType;
if (type == AttackTypes.Spell || type == AttackTypes.SharpShadow) {
self.hp += hitInstance.DamageDealt;
}

orig(self, hitInstance);
}
}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ Compatible with `Hollow Knight` 1.5.
- **Restrictions**:
+ **Force Overcharm**: Force entering the overcharmed state.
+ **Frame Rate Limit**: Create a lag in every in-game frame.
+ **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.

All features can be toggled in-game.

Expand All @@ -54,6 +57,9 @@ All features can be toggled in-game.
+ `GreyPrinceEnterShort` (`Boolean`): Whether to enable the Grey Prince Enter Short feature. Defaults to `true`.
+ `HalveDamage` (`Boolean`): Whether to enable the Halve Damage feature. Defaults to `false`.
+ `MemorizeBindings` (`Boolean`): Whether to enable the Memorize Bindings feature. Defaults to `true`.
+ `NoNailAttack*` (`Boolean`): Whether to enable the No Nail Attack feature. Defaults to `false`.
+ `NoNailDamage*` (`Boolean`): Whether to enable the No Nail Damage feature. Defaults to `false`.
+ `NoSpellDamage*` (`Boolean`): Whether to enable the No Spell Damage feature. Defaults to `false`.
+ `P5Health` (`Boolean`): Whether to enable the P5 Health feature. Defaults to `false`.
+ `UnlockEternalOrdeal` (`Boolean`): Whether to enable the Unlock Eternal Ordeal feature. Defaults to `true`.
+ `UnlockRadiance` (`Boolean`): Whether to enable the Unlock Radiance feature. Defaults to `true`.
Expand Down
6 changes: 6 additions & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
- **限制**
+ **强制护符过载**:强制进入护符过载状态。
+ **帧率限制**:在游戏内的每帧添加卡顿。
+ **禁用骨钉攻击**:禁用普通骨钉攻击。
+ **取消骨钉伤害**:取消骨钉攻击伤害,包括骨钉技艺。
+ **取消法术伤害**:取消法术攻击伤害,包括锋利之影。

所有功能均可在游戏中开启或关闭。

Expand All @@ -54,6 +57,9 @@
+ `GreyPrinceEnterShort` (`Boolean`):是否启用 `灰色王子短入场` 功能。默认为 `true`
+ `HalveDamage` (`Boolean`):是否启用 `伤害减半` 功能。默认为 `false`
+ `MemorizeBindings` (`Boolean`):是否启用 `记住束缚` 功能。默认为 `true`
+ `NoNailAttack*` (`Boolean`):是否启用 `禁用骨钉攻击` 功能。默认为 `false`
+ `NoNailDamage*` (`Boolean`):是否启用 `取消骨钉伤害` 功能。默认为 `false`
+ `NoSpellDamage*` (`Boolean`):是否启用 `取消法术伤害` 功能。默认为 `false`
+ `P5Health` (`Boolean`):是否启用 `五门血量` 功能。默认为 `false`
+ `UnlockEternalOrdeal` (`Boolean`):是否启用 `解锁无尽折磨` 功能。默认为 `true`
+ `UnlockRadiance` (`Boolean`):是否启用 `解锁辐光` 功能。默认为 `true`
Expand Down

0 comments on commit 06fd596

Please sign in to comment.