From: Paul Hänsch Date: Sat, 15 Feb 2020 08:46:53 +0000 (+0100) Subject: support unsetting quest status X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=2dfe049d1c5a406c241106aa493b6f601e2bf2d7;p=flarejs support unsetting quest status --- diff --git a/engine.js b/engine.js index f3481c7..459a9dd 100644 --- a/engine.js +++ b/engine.js @@ -449,8 +449,8 @@ function Controls(hero){ var trigger, item; if (map.triggers[i]) for ( trigger of map.triggers[i].filter( - t => (!t.requires_status) ? true : t.requires_status.find(s => s in qstatus) - ).filter( t => (!t.requires_not_status) ? true : !t.requires_not_status.find(s => s in qstatus) ) + t => (!t.requires_status) ? true : t.requires_status.find(s => qstatus[s]) + ).filter( t => (!t.requires_not_status) ? true : !t.requires_not_status.find(s => qstatus[s]) ) ) { // game status modification if ( trigger.set_status ) for (item of trigger.set_status) {