From 24af4cbf8c76718b1f4cef7ea47ffd41bd5d926a Mon Sep 17 00:00:00 2001 From: idinium96 Date: Wed, 15 Jul 2020 19:51:22 +0800 Subject: [PATCH] fix still selling keys when both keys and ref>=max --- src/classes/MyHandler.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/classes/MyHandler.ts b/src/classes/MyHandler.ts index 020be3f88..e4c5cf8df 100644 --- a/src/classes/MyHandler.ts +++ b/src/classes/MyHandler.ts @@ -1394,15 +1394,15 @@ export = class MyHandler extends Handler { * (currKeys ≤ minKeys OR minKeys ≤ currKeys ≤ maxKeys OR currKeys ≥ maxKeys) */ const isRemoveAutoKeys = - (currReftoScrap >= userMinReftoScrap && - currReftoScrap <= userMaxReftoScrap && + (((currReftoScrap >= userMinReftoScrap && currReftoScrap <= userMaxReftoScrap) || + currReftoScrap >= userMaxReftoScrap) && (currKeys <= userMinKeys || (currKeys >= userMinKeys && currKeys <= userMaxKeys) || currKeys >= userMaxKeys)) !== false; /* - // <·····●····························●·····> (OR) \ + // <·····●····························●·····> \ // Keys --------|----------------------------|----------> ⟩ AND - // ●————————————————————————————● (AND) / + // ●————————————————————————————●·····> / // Refs --------|----------------------------|----------> // min max */