Skip to content
Permalink
Browse files

bugfix overlay mis-tracking cards used (#762)

* bugfix cardsUsed should not include sideboard

* lint

* hack main list of cardsLeft

* bugfix cards-list supports zero quantities
  • Loading branch information
lusbenjamin authored and Manuel-777 committed Nov 27, 2019
1 parent 2401d7a commit 7084a3fd60aca3cd092ef599f957e5ee52604f1e
@@ -15,9 +15,9 @@ class CardsList {
} else if (typeof list[0] === "object") {
this._list = list.map(obj => {
return {
quantity: 1, // TODO remove group lands hack
id: obj, // TODO remove group lands hack
...obj,
quantity: obj.quantity || 1,
id: obj.id || obj,
measurable: true
};
});
@@ -611,6 +611,7 @@ function getPlayerUsedCards() {
const ignoreZones = [
"ZoneType_Limbo",
"ZoneType_Library",
"ZoneType_Sideboard",
"ZoneType_Revealed"
];
if (zone.objectInstanceIds && !ignoreZones.includes(zoneType)) {
@@ -254,7 +254,7 @@ function select_deck(arg) {
} else {
globals.currentDeck = new Deck(arg);
}
console.log("Select deck: ", globals.currentDeck, arg);
// console.log("Select deck: ", globals.currentDeck, arg);
globals.originalDeck = globals.currentDeck.clone();
ipc_send("set_deck", globals.currentDeck.getSave(), IPC_OVERLAY);
}
@@ -496,7 +496,7 @@ export function onLabelClientToMatchServiceMessageTypeClientToGREMessage(
const msgType = entry.label.split("_")[1];
payload = decodePayload(payload, msgType);
payload = normaliseFields(payload);
//console.log("Client To GRE: ", payload);
// console.log("Client To GRE: ", payload);
}

if (payload.submitdeckresp) {

0 comments on commit 7084a3f

Please sign in to comment.
You can’t perform that action at this time.