Skip to content

Commit

Permalink
feat: unlock eternal ordeal
Browse files Browse the repository at this point in the history
  • Loading branch information
Clazex committed Oct 26, 2021
1 parent 6f67116 commit e9f9d24
Show file tree
Hide file tree
Showing 6 changed files with 35 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.7.3</Version>
<Version>0.8.0</Version>
<Description>A Hollow Knight mod to enhance your Godhome experience</Description>
<Authors>Clazex</Authors>
<Copyright>Copyright © 2021 Clazex</Copyright>
Expand Down
1 change: 1 addition & 0 deletions GodSeekerPlus/Lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"FrameRateLimit": "Frame Rate Limit",
"HalveDamage": "Halve Damage",
"MemorizeBindings": "Memorize Bindings",
"UnlockEternalOrdeal": "Unlock Eternal Ordeal",
"UnlockRadiance": "Unlock Radiance"
}
1 change: 1 addition & 0 deletions GodSeekerPlus/Lang/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"FrameRateLimit": "帧率限制",
"HalveDamage": "伤害减半",
"MemorizeBindings": "记住束缚",
"UnlockEternalOrdeal": "解锁无尽折磨",
"UnlockRadiance": "解锁辐光"
}
28 changes: 28 additions & 0 deletions GodSeekerPlus/Modules/UnlockEternalOrdeal.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System.Collections.Generic;
using Modding;
using GodSeekerPlus.Util;
using Logger = GodSeekerPlus.Util.Logger;

namespace GodSeekerPlus.Modules {
[Module(toggleable = true, defaultEnabled = true)]
internal sealed class UnlockEternalOrdeal : Module {
private protected override void Load() => ModHooks.AfterSavegameLoadHook += SetOrdealUnlocked;

private protected override void Unload() => ModHooks.AfterSavegameLoadHook -= SetOrdealUnlocked;

private void SetOrdealUnlocked(SaveGameData data) {
IEnumerable<PersistentBoolData> items = data
.sceneData
.persistentBoolItems
.Filter(item => item.sceneName == "GG_Workshop" && item.id == "Breakable Wall_Silhouette");

if (!items.Any() || items.Filter(item => !item.activated).Any()) {
data.sceneData.persistentBoolItems.Set("GG_Workshop", "Breakable Wall_Silhouette", true);
data.sceneData.persistentBoolItems.Set("GG_Workshop", "Zote_Break_wall", true);
data.playerData.zoteStatueWallBroken = true;

Logger.LogDebug("Eternal Ordeal unlocked");
}
}
}
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Compatible with `Hollow Knight` 1.5.
- **Frame Rate Limit**\*: Create a lag in every in-game frame.
- **Halve Damage**\*: Halve all the damage taken.
- **Memorize Bindings**\*: Memorize the Bindings selected last time, like difficulties in the Hall of Gods.
- **Unlock Eternal Ordeal**\*: Auto unlock the Eternal Ordeal.
- **Unlock Radiance**\*: Auto unlock the Radiance in Hall of Gods when in God Seeker mode.

Features marked with an `*` can be toggled in-game.
Expand All @@ -26,6 +27,7 @@ Features marked with an `*` can be toggled in-game.
+ `FrameRateLimit` (`Boolean`): Whether to enable the Frame Rate Limit feature. Defaults to `false`.
+ `HalveDamage` (`Boolean`): Whether to enable the Halve Damage feature. Defaults to `false`.
+ `MemorizeBindings` (`Boolean`): Whether to enable the Memorize Bindings feature. Defaults to `true`.
+ `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`.
- `fastSuperDashSpeedMultiplier` (`Float`): Fast Super Dash speed multiplier. Ranges from `1` to `2`, defaults to `1.5`.
- `frameRateLimitMultiplier` (`Integer`): Frame rate limit time span multiplier. Final lag time is 10ms multiplied by this value. Note that setting this to `0` does not mean zero lag. Ranges from `0` to `10`, defaults to `5`.
Expand Down
2 changes: 2 additions & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- **帧率限制**\*:在游戏内的每帧添加卡顿。
- **伤害减半**\*: 将受到的所有伤害减半。
- **记住束缚**\*:记住上次选择的束缚,效果与诸神堂中的难度选择一样。
- **解锁无尽折磨**\*: 自动解锁无尽折磨。
- **解锁辐光**\*: 在寻神者模式中,自动在诸神堂解锁辐光。

`*` 的功能可在游戏中开启或关闭。
Expand All @@ -26,6 +27,7 @@
+ `FrameRateLimit` (`Boolean`):是否启用 `帧率限制` 功能。默认为 `false`
+ `HalveDamage` (`Boolean`):是否启用 `伤害减半` 功能。默认为 `false`
+ `MemorizeBindings` (`Boolean`):是否启用 `记住束缚` 功能。默认为 `true`
+ `UnlockEternalOrdeal` (`Boolean`):是否启用 `解锁无尽折磨` 功能。默认为 `true`
+ `UnlockRadiance` (`Boolean`):是否启用 `解锁辐光` 功能。默认为 `true`
- `fastSuperDashSpeedMultiplier` (`Float`):快速超冲速度倍率。范围从 `1``2`,默认为 `1.5`
- `frameRateLimitMultiplier` (`Integer`):帧率限制卡顿时间倍率。最终卡顿时间是 10ms 乘以这个值。注意将其设置为 `0` 并不意味着零卡顿。范围从 `0``10`,默认为 `5`
Expand Down

0 comments on commit e9f9d24

Please sign in to comment.