Skip to content

Commit

Permalink
fix: zero damage mistakenly overwritten
Browse files Browse the repository at this point in the history
  • Loading branch information
Clazex committed Apr 10, 2022
1 parent 8bc4d4c commit 84895b9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions GodSeekerPlus/Modules/BossChallenge/P5Health.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ private protected override void Unload() {

private int OverrideLevel() => 0;

private int FixDamage(ref int hazardType, int damage) => BossSceneController.IsBossScene
? ReflectionHelper.GetField<BossSceneController, int>(BossSceneController.Instance, "bossLevel") switch {
1 => damage * 2,
private int FixDamage(ref int hazardType, int damage) => damage switch {
int i when i <= 0 => i,
int i when BossSceneController.IsBossScene is false => i,
int i => ReflectionHelper.GetField<BossSceneController, int>(BossSceneController.Instance, "bossLevel") switch {
1 => i * 2,
2 => 9999,
_ => damage,
_ => i,
}
: damage;
};
}

0 comments on commit 84895b9

Please sign in to comment.