From 4d0ff2a197c6604bff2fb41a5f31f61a3b2c757a Mon Sep 17 00:00:00 2001 From: Kaphotics Date: Sat, 16 Apr 2016 11:36:01 -0700 Subject: [PATCH] Add move source indication to verbose output Indicates the Valid legality of moves (level up, relearn pool, etc). --- Legality/Analysis.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Legality/Analysis.cs b/Legality/Analysis.cs index 60863d6cf..b4169fb96 100644 --- a/Legality/Analysis.cs +++ b/Legality/Analysis.cs @@ -88,6 +88,17 @@ private string getVerboseLegalityReport() { string r = getLegalityReport() + Environment.NewLine; r += "===" + Environment.NewLine + Environment.NewLine; + int rl = r.Length; + + for (int i = 0; i < 4; i++) + if (vMoves[i].Valid) + r += $"{vMoves[i].Judgement} Move {i + 1}: {vMoves[i].Comment}" + Environment.NewLine; + for (int i = 0; i < 4; i++) + if (vRelearn[i].Valid) + r += $"{vRelearn[i].Judgement} Relearn Move {i + 1}: {vRelearn[i].Comment}" + Environment.NewLine; + + if (rl != r.Length) // move info added, break for next section + r += Environment.NewLine; var chks = Checks; r += chks.Where(chk => chk.Valid && chk.Comment != "Valid").OrderBy(chk => chk.Judgement) // Fishy sorted to top