Преглед изворни кода

Added threshold to player page sell filter

KeyMasterOfGozer пре 7 месеци
родитељ
комит
18e78143e7
1 измењених фајлова са 18 додато и 1 уклоњено
  1. 18 1
      README.md

+ 18 - 1
README.md

@@ -132,6 +132,23 @@ for (var i = 0; i < cards.length; i++) {
 
 ### javascript to filter Player Page for salable cards
 ```javascript
+sellThreshold = {};
+sellThreshold["2000"] = 10000;
+sellThreshold["350"] = 195;
+sellThreshold["250"] = 126;
+sellThreshold["200"] =  87;
+sellThreshold["150"] = 110;
+sellThreshold["115"] =  80;
+sellThreshold["75"]  =  32;
+sellThreshold["50"]  =  25;
+sellThreshold["40"]  =  32;
+sellThreshold["20"]  =  22;
+sellThreshold["15"]  =  12;
+sellThreshold["10"]  =   8;
+sellThreshold["4"]   =   9;
+sellThreshold["3"]   =   4;
+sellThreshold["2"]   =   4;
+sellThreshold["1"]   =   4;
 clist=[];
 for (var i = 0; i < 153; i++) {clist.push(0);}
 let market = document.createElement('div');
@@ -169,7 +186,7 @@ for (var i = 0; i < cards.length; i++) {
     if (stock<2){
         cards.item(i).style.setProperty('Display','None');
     }
-    if (price<4){
+    if (price<sellThreshold[cardVal.toString()]){
         cards.item(i).style.setProperty('Display','None');
     }
 }