From ddc7e0412ed54d4722ec634cb2a76df5bb483fe3 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Wed, 7 Dec 2016 05:20:22 -0500 Subject: [PATCH] Clarify /learn message for gen 6-7 egg moves --- chat-plugins/datasearch.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/chat-plugins/datasearch.js b/chat-plugins/datasearch.js index f4ffe6b4ef..65917ba6aa 100644 --- a/chat-plugins/datasearch.js +++ b/chat-plugins/datasearch.js @@ -1339,11 +1339,12 @@ function runLearn(target, cmd) { let prevSourceCount = 0; for (let i = 0, len = sources.length; i < len; ++i) { let source = sources[i]; + let hatchAs = ['6E', '7E'].includes(source.substr(0, 2)) ? 'hatched as ' : ''; if (source.substr(0, 2) === prevSourceType) { if (prevSourceCount < 0) { - buffer += ": " + source.substr(2); + buffer += ": " + hatchAs + source.substr(2); } else if (all || prevSourceCount < 3) { - buffer += ", " + source.substr(2); + buffer += ", " + hatchAs + source.substr(2); } else if (prevSourceCount === 3) { buffer += ", ..."; } @@ -1354,7 +1355,7 @@ function runLearn(target, cmd) { prevSourceCount = source.substr(2) ? 0 : -1; buffer += "
  • gen " + source.charAt(0) + " " + sourceNames[source.charAt(1)]; if (prevSourceType === '5E' && template.maleOnlyHidden) buffer += " (cannot have hidden ability)"; - if (source.substr(2)) buffer += ": " + source.substr(2); + if (source.substr(2)) buffer += ": " + hatchAs + source.substr(2); } } if (sourcesBefore) {