ignore text in brainwashed too

This commit is contained in:
Daniel 2020-06-22 21:03:05 -04:00
parent d1f43b9c4c
commit e14de59e88
3 changed files with 4 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -103,7 +103,8 @@ export default function search_api(input) {
let truth = false;
negates.forEach((word) => {
truth |= (obj.gsx$ability.toLowerCase().indexOf(word.toLowerCase()) > -1);
if (creature) truth |= (obj.gsx$flavortext.toLowerCase().indexOf(word.toLowerCase()) > -1);
truth |= (obj.gsx$flavortext.toLowerCase().indexOf(word.toLowerCase()) > -1);
if (creature) truth |= (obj.gsx$brainwashed.toLowerCase().indexOf(word.toLowerCase()) > -1);
})
return !truth;
}