Commit ad32a4cf authored by mercury233's avatar mercury233

update link markers

parent 2d1de130
......@@ -211,7 +211,9 @@
"TYPE_FLIP": 2097152,
"TYPE_TOON": 4194304,
"TYPE_XYZ": 8388608,
"TYPE_PENDULUM": 16777216
"TYPE_PENDULUM": 16777216,
"TYPE_SPSUMMON": 33554432,
"TYPE_LINK": 67108864
},
"RACES": {
"RACE_WARRIOR": 1,
......@@ -237,7 +239,8 @@
"RACE_PSYCHO": 1048576,
"RACE_DEVINE": 2097152,
"RACE_CREATORGOD": 4194304,
"RACE_PHANTOMDRAGON": 8388608
"RACE_WYRM": 8388608,
"RACE_CYBERS": 16777216
},
"ATTRIBUTES": {
"ATTRIBUTE_EARTH": 1,
......@@ -248,6 +251,16 @@
"ATTRIBUTE_DARK": 32,
"ATTRIBUTE_DEVINE": 64
},
"LINK_MARKERS": {
"LINK_MARKER_BOTTOM_LEFT": 1,
"LINK_MARKER_BOTTOM": 2,
"LINK_MARKER_BOTTOM_RIGHT": 4,
"LINK_MARKER_LEFT": 8,
"LINK_MARKER_RIGHT": 32,
"LINK_MARKER_TOP_LEFT": 64,
"LINK_MARKER_TOP": 128,
"LINK_MARKER_TOP_RIGHT": 256
},
"COLORS": {
"LIGHTBLUE": 8,
"RED": 11,
......
......@@ -87,6 +87,8 @@ var loadDb = function(db_file) {
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_SPSUMMON) {cardTypes.push("特殊召唤");}
if (result.type & constants.TYPES.TYPE_LINK) {cardTypes.push("连接");}
cardText+="["+ cardTypes.join('|') +"]";
if (result.type & constants.TYPES.TYPE_MONSTER) {
......@@ -114,7 +116,8 @@ var loadDb = function(db_file) {
if (result.race & constants.RACES.RACE_PSYCHO) {cardRace="念动力";}
if (result.race & constants.RACES.RACE_DEVINE) {cardRace="幻神兽";}
if (result.race & constants.RACES.RACE_CREATORGOD) {cardRace="创造神";}
if (result.race & constants.RACES.RACE_PHANTOMDRAGON) {cardRace="幻龙";}
if (result.race & constants.RACES.RACE_WYRM) {cardRace="幻龙";}
if (result.race & constants.RACES.RACE_CYBERS) {cardRace="电子界";}
cardText+=" "+ cardRace;
var cardAttr="";
......@@ -139,9 +142,32 @@ var loadDb = function(db_file) {
cardLScale=parseInt(levelHex.slice(-8,-6), 16);
cardRScale=parseInt(levelHex.slice(-6,-4), 16);
}
cardText+="[" + ((result.type & constants.TYPES.TYPE_XYZ) ? "" : "") + cardLevel + "]";
if (!result.type & constants.TYPES.TYPE_LINK) {
cardText+="[" + ((result.type & constants.TYPES.TYPE_XYZ) ? "" : "") + cardLevel + "]";
cardText+=" " + (result.atk < 0 ? "?" : result.atk) + "/" + (result.def < 0 ? "?" : result.def);
}
else {
cardText+="[LINK-" + cardLevel + "]";
cardText += " " + (result.atk < 0 ? "?" : result.atk) + "/- ";
if (result.def & constants.LINK_MARKERS.LINK_MARKER_TOP_LEFT)
cardText += "[↖]";
if (result.def & constants.LINK_MARKERS.LINK_MARKER_TOP)
cardText += "[↑]";
if (result.def & constants.LINK_MARKERS.LINK_MARKER_TOP_RIGHT)
cardText += "[↗]";
if (result.def & constants.LINK_MARKERS.LINK_MARKER_LEFT)
cardText += "[←]";
if (result.def & constants.LINK_MARKERS.LINK_MARKER_RIGHT)
cardText += "[→]";
if (result.def & constants.LINK_MARKERS.LINK_MARKER_BOTTOM_LEFT)
cardText += "[↙]";
if (result.def & constants.LINK_MARKERS.LINK_MARKER_BOTTOM)
cardText += "[↓]";
if (result.def & constants.LINK_MARKERS.LINK_MARKER_BOTTOM_RIGHT)
cardText += "[↘]";
}
if (cardLScale) {
cardText+=" " + cardLScale + "/" +cardRScale;
......
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