From d0ea913902da578a40abf125cfde68e77c6f196c Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Sat, 14 Jan 2023 21:04:16 +0100 Subject: [PATCH] Added GameRule for forgetting HM moves CanForgetHM 0 = HM moves can't be forgotten 1 = HM moves can be forgotten --- P3D/Resources/GameModeManager.vb | 1 + P3D/Screens/Pokemon/LearnAttackScreen.vb | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/P3D/Resources/GameModeManager.vb b/P3D/Resources/GameModeManager.vb index 5b21473c5..8170b3796 100644 --- a/P3D/Resources/GameModeManager.vb +++ b/P3D/Resources/GameModeManager.vb @@ -608,6 +608,7 @@ Public Class GameMode gameRules.Add(New GameRule("OverworldPoison", "0")) gameRules.Add(New GameRule("SavingDisabled", "0")) gameRules.Add(New GameRule("SingleUseTM", "0")) + gameRules.Add(New GameRule("CanForgetHM", "0")) gameMode._gameRules = gameRules diff --git a/P3D/Screens/Pokemon/LearnAttackScreen.vb b/P3D/Screens/Pokemon/LearnAttackScreen.vb index 991f8995e..3ab661fae 100644 --- a/P3D/Screens/Pokemon/LearnAttackScreen.vb +++ b/P3D/Screens/Pokemon/LearnAttackScreen.vb @@ -52,7 +52,11 @@ Me.AttackIndex = CInt(MathHelper.Clamp(Me.AttackIndex, 0, 4)) If AttackIndex < 4 Then - canForget = Not Pokemon.Attacks(AttackIndex).IsHMMove + If CBool(GameModeManager.GetGameRuleValue("CanForgetHM", "0")) = True Then + canForget = True + Else + canForget = Not Pokemon.Attacks(AttackIndex).IsHMMove + End If Else canForget = True End If