From 5ca597d44bc608b51aa88642c3d17278ea46546e Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 25 Nov 2018 19:46:32 -0800 Subject: [PATCH] Add height scalar classification --- PKHeX.Core/PKM/PB7.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/PKHeX.Core/PKM/PB7.cs b/PKHeX.Core/PKM/PB7.cs index 7660c5103..8cdaccafc 100644 --- a/PKHeX.Core/PKM/PB7.cs +++ b/PKHeX.Core/PKM/PB7.cs @@ -739,5 +739,18 @@ namespace PKHeX.Core ResetHeight(); ResetWeight(); } + + public static int GetHeightRating(int heightScalar) + { + if (heightScalar < 0x10) + return 0; // 1/16 = XS + if (heightScalar < 0x30u) + return 1; // 2/16 = S + if (heightScalar < 0xD0u) + return 2; // average (10/16) + if (heightScalar < 0xF0u) + return 3; // 2/16 = L + return 4; // 1/16 = XL + } } } \ No newline at end of file