Window_TripleTriad_CardDetails.prototype.refresh = function (cardId) {
this.contents.clear();
if ($dataTripleTriad.self_tt_cards.includes(cardId) || $dataTripleTriad.all_cards.includes(cardId))
card_name = JSON.parse(this.card_list[cardId])["Image_Player_1"];
else
card_name = this.aux_images['back_card_image'];
this._cardBitmap = new Sprite();
this._cardBitmap.bitmap = ImageManager.loadTripleTriad(card_name);
this.addChild(this._cardBitmap);
this._cardBitmap.x = 200;
this._cardBitmap.y = 220;
this._cardBitmap.scale.x = 1.45;
this._cardBitmap.scale.y = 1.45;
this._cardBitmap.anchor.x = 0.5;
this._cardBitmap.anchor.y = 0.5;
var count = 0;
for (var i = 0; i < $dataTripleTriad.all_cards.length; ++i) {
if ($dataTripleTriad.all_cards[i] == cardId)
count++;
}
var total = parseInt(JSON.parse(this.card_list[cardId])["Power(UP)"]);
total += parseInt(JSON.parse(this.card_list[cardId])["Power(LEFT)"]);
total += parseInt(JSON.parse(this.card_list[cardId])["Power(RIGHT)"]);
total += parseInt(JSON.parse(this.card_list[cardId])["Power(DOWN)"]);
if ($dataTripleTriad.self_tt_cards.includes(cardId) || $dataTripleTriad.all_cards.includes(cardId)) {
this.drawText(this.album_text["CardView"] + " ", 32, 10, this.width, 'left');
this.drawText(this.album_text["TotalOwned"] + " " + count, 350, 42, this.width, 'left');
//this.drawText(this.album_text["TotalPower"] + " " + total, 20, 60, this.width, 'left');
this.drawText(this.album_text["Rarity"] + " " + JSON.parse(this.card_list[cardId])["Rarity"], 350, 82, this.width, 'left');
this.drawText(this.album_text["Price"] + " " + JSON.parse(this.card_list[cardId])["Price"], 350, 122, this.width, 'left');
this.drawTextEx(this.album_text["Description"] + " " + JSON.parse(JSON.parse(this.card_list[cardId])["card_description"]), 350, 162);
}
else {
this.drawText(this.album_text["CardView"] + " ", 32, 10, this.width, 'left');
this.drawText(this.album_text["TotalOwned"] + " " + count, 350, 42, this.width, 'left');
//this.drawText(this.album_text["TotalPower"] + " " + "??", 160, 60, this.width, 'left');
this.drawText(this.album_text["Rarity"] + " " + "??", 350, 82, this.width, 'left');
this.drawText("Price: " + "??", 350, 122, this.width, 'left');
this.drawTextEx(this.album_text["Description"] + " " + "??", 350, 162);
}