New set Fate Reforged
Moderators: North, BetaSteward, noxx, jeffwadsworth, JayDi, TheElk801, LevelX, CCGHQ Admins
Re: New set Fate Reforged
by LevelX » 29 Dec 2014, 16:55
You can use this script (with Firefox or Opera) to get the spoiler text from http://www.mtgsalvation.com/spoilers/146-fate-reforged
- Code: Select all
(function(){
var x = '';
function printCard(card){
var text = '';
text += card.name + '|Fate Reforged|';
text += (card.number ? card.number : '') + '|';
text += card.rarity + '|';
text += card.cost + '|';
text += card.type + '|';
text += (card.pt ? card.pt.split('/').join("|") : '|') + '|';
text += card.abilities + '|';
return text;
}
$.each($('div.t-spoiler-wrapper'), function(index, value) {
var $value = $(value);
var card = {};
card.name = $value.find('div.t-spoiler').attr('id').replace(/Æ/g,"AE");
var findResult = $value.find('span.t-spoiler-artist').text();
if(findResult.length > 0){
var parts = findResult.split('#');
card.number = parts[1].split('/')[0].trim();
}
var findResult = $value.find('span.t-spoiler-rarity').find('span:first').attr('class');
if (findResult.substr(findResult.length - 8) == 'uncommon') {
card.rarity = 'U';
} else if (findResult.substr(findResult.length - 6) == 'common') {
card.rarity = 'C';
} else if (findResult.substr(findResult.length - 4) == 'rare') {
card.rarity = 'R';
} else if (findResult.substr(findResult.length - 6) == 'mythic') {
card.rarity = 'M';
} else if (findResult.substr(findResult.length - 4) == 'land') {
card.rarity = 'L';
} else {
card.rarity = '?' + findResult;
}
var findCosts = $value.find('ul.t-spoiler-mana').find('span').text();
card.cost = '';
$.each(findCosts , function (i, rowValue) {
card.cost += '{' + rowValue + '}';
});
card.type = $value.find('span.t-spoiler-type:first').text();
card.pt = $value.find('span.t-spoiler-stat').text().replace(/\*/g,"0");
var abilities = $value.find('div.t-spoiler-ability');
abilities.find('span').replaceWith(function() { return '{' + this.innerHTML + '}' ; });
card.abilities = '';
$.each(abilities.find('p'), function (i, rowValue) {
if (i > 0) {
card.abilities += '$';
}
// rowValue.find('span').replaceWith(function() { return '{' + this.innerHTML + '}' ; });
//text = rowValue.innerHTML.replace(/(\r\n|\n|\r)/gm,"");
card.abilities += rowValue.innerHTML.replace(/(\r\n|\n|\r)/gm,"").replace(/(<em>)/g,"<i>").replace(/(<\/em>)/g,"</i>");
});
card.abilities = card.abilities.replace(/Æ/g,"AE").replace(/[\$]+/g,"$");
x += printCard(card) + '\n';
});
console.log(x);
})();
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
Re: New set Fate Reforged
by LevelX » 30 Dec 2014, 16:19
I'm going next to cards with the new "Manifest" keyword.
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
-
emerald000 - Posts: 92
- Joined: 07 Jul 2014, 16:55
- Has thanked: 1 time
- Been thanked: 9 times
Re: New set Fate Reforged
by emerald000 » 14 Jan 2015, 04:10
Working on blue cards now.
(PS: The set finally arrived on Gatherer.)
(PS: The set finally arrived on Gatherer.)
-
emerald000 - Posts: 92
- Joined: 07 Jul 2014, 16:55
- Has thanked: 1 time
- Been thanked: 9 times
Re: New set Fate Reforged
by LevelX » 14 Jan 2015, 05:57
Added the set to the card tracker.
Until Friday I'll be busy with other things.
Until Friday I'll be busy with other things.
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
Re: New set Fate Reforged
by fireshoes » 15 Jan 2015, 01:34
Any chance we can do an update before then to give people some playtime with the new set before the prerelease?
Re: New set Fate Reforged
by LevelX » 15 Jan 2015, 07:55
I can do a update this evening (probably before restart at 19:00 CET).
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests