Added GameRule for forgetting HM moves

CanForgetHM
0 = HM moves can't be forgotten
1 = HM moves can be forgotten
This commit is contained in:
JappaWakka 2023-01-14 21:04:16 +01:00
parent e14e4c660c
commit d0ea913902
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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