Commit fd8a5f21 authored by nanahira's avatar nanahira

add link deck stat

parent 98c014b6
......@@ -26,9 +26,9 @@ function add_to_deck(deck,id) {
}
function add_to_all_list(LIST,id,use) {
if (!ALL_CARD_DATAS[id]) {
return;
}
if (!ALL_CARD_DATAS[id]) {
return;
}
if (ALL_CARD_DATAS[id].alias) {
id=ALL_CARD_DATAS[id].alias;
}
......@@ -48,7 +48,7 @@ function add_to_all_list(LIST,id,use) {
function read_deck_file(filename) {
console.log("reading "+filename);
var deck_text=fs.readFileSync(config.deckpath+"\\"+filename,{encoding:"ASCII"})
var deck_text=fs.readFileSync(config.deckpath+"/"+filename,{encoding:"ASCII"})
var deck_array=deck_text.split("\n");
var deck_main={};
var deck_side={};
......@@ -123,6 +123,7 @@ function load_database(callback) {
if (result.type & constants.TYPES.TYPE_TOON) {cardTypes.push("卡通");}
if (result.type & constants.TYPES.TYPE_XYZ) {cardTypes.push("超量");}
if (result.type & constants.TYPES.TYPE_PENDULUM) {cardTypes.push("灵摆");}
if (result.type & constants.TYPES.TYPE_LINK) {cardTypes.push("连接");}
card.fulltype=cardTypes.join('|');
if (result.type & constants.TYPES.TYPE_MONSTER) {
......@@ -167,6 +168,9 @@ function output_csv(list,filename) {
var file=fs.openSync(filename,"w");
for (var i in list) {
var card=ALL_CARD_DATAS[i];
if (!card) {
continue;
}
var card_usage=list[i];
console.log("writing "+card.name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment