2015-06-24 05:09:16 +00:00
|
|
|
var cards = require("../../../../../../assets/data/cards");
|
|
|
|
var deck = require("../../../../../../assets/data/deck");
|
|
|
|
|
2015-06-23 08:36:29 +00:00
|
|
|
module.exports = {
|
|
|
|
|
2015-06-24 05:09:16 +00:00
|
|
|
template: require('../views/deck-builder.html'),
|
|
|
|
|
|
|
|
data: function() {
|
|
|
|
return {
|
|
|
|
cards: [],
|
|
|
|
deck: []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
ready: function() {
|
|
|
|
this.cards = $.map(cards, function(n) {
|
|
|
|
if(n.faction == 'Northern Realm' && n.type != 3) return n;
|
|
|
|
});
|
|
|
|
|
|
|
|
$.map(deck, (n, i) => {
|
|
|
|
if(i == 'northern_realm') {
|
|
|
|
for(var m in n) {
|
|
|
|
//console.log(this.cards[m].type);
|
|
|
|
this.deck.push(this.cards[m]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
2015-06-23 08:36:29 +00:00
|
|
|
|
2015-06-24 05:09:16 +00:00
|
|
|
filters: {
|
|
|
|
leader: function(deck) {
|
|
|
|
//return deck.type == 3 ? deck : 'ne';
|
|
|
|
}
|
|
|
|
}
|
2015-06-23 08:36:29 +00:00
|
|
|
};
|