Skip to content
Permalink
Browse files

Do not track face down cards

  • Loading branch information...
Manuel-777 committed May 9, 2019
1 parent 3e1980c commit 953230b4e9a026ab9ceb678ef8e6ed6b25196aef
Showing with 9 additions and 6 deletions.
  1. +6 −4 shared/cards-list.js
  2. +3 −2 window_background/gre-to-client-interpreter.js
@@ -247,11 +247,13 @@ class CardsList {
let colors = new Colors();
this._list.forEach(card => {
let cardData = cardsDb.get(card.id);
let isLand = cardData.type.indexOf("Land") !== -1;
if (isLand && cardData.frame.length < 3) {
colors.addFromArray(cardData.frame);
if (cardData) {
let isLand = cardData.type.indexOf("Land") !== -1;
if (isLand && cardData.frame.length < 3) {
colors.addFromArray(cardData.frame);
}
colors.addFromCost(cardData.cost);
}
colors.addFromCost(cardData.cost);
});

return colors;
@@ -471,7 +471,8 @@ function getOppUsedCards() {
) {
grpId = obj.grpId;
//cardsUsed.push(cardsDb.get(grpId).name+" - "+zone.type);
cardsUsed.push(grpId);
// 3 is the code for "Face down card", apparently
if (grpId !== 3) cardsUsed.push(grpId);
}
} catch (e) {
//
@@ -502,7 +503,7 @@ function getPlayerUsedCards() {
) {
grpId = obj.grpId;
//cardsUsed.push(cardsDb.get(grpId).name+" - "+zone.type);
cardsUsed.push(grpId);
if (grpId !== 3) cardsUsed.push(grpId);
}
} catch (e) {
//

0 comments on commit 953230b

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