Movesearch: Add defrost and reflectable aliases (#8359)

Added Magic Coat/Magic Bounce since those are intuitive terms to use while searching
This commit is contained in:
PartMan 2021-06-08 21:15:16 +05:30 committed by GitHub
parent 32de43c7ce
commit 46a858f2be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1325,6 +1325,8 @@ function runMovesearch(target: string, cmd: string, canAll: boolean, message: st
if (target === 'gmax') target = 'gmaxmove';
if (target === 'multi' || toID(target) === 'multihit') target = 'multihit';
if (target === 'crit' || toID(target) === 'highcrit') target = 'highcrit';
if (['thaw', 'thaws', 'melt', 'melts', 'defrosts'].includes(target)) target = 'defrost';
if (target === 'bounceable' || toID(target) === 'magiccoat' || toID(target) === 'magicbounce') target = 'reflectable';
if (allFlags.includes(target)) {
if ((orGroup.flags[target] && isNotSearch) || (orGroup.flags[target] === false && !isNotSearch)) {
return {error: `A search cannot both exclude and include '${target}'.`};