adds support for darksteel colossus, gravebane zombie

This commit is contained in:
Anthony Calosa
2015-09-04 16:47:11 +08:00
parent 5175f439a0
commit 11a9766ba0
5 changed files with 61 additions and 42 deletions
+3 -1
View File
@@ -135,7 +135,9 @@ const char* Constants::MTGBasicAbilities[] = {
"canplayfromgraveyard",
"tokenizer",//parallel lives,
"mygraveexiler",
"oppgraveexiler"
"oppgraveexiler",
"librarydeath",
"shufflelibrarydeath"
};
map<string,int> Constants::MTGBasicAbilitiesMap;
+14
View File
@@ -321,6 +321,17 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
return card; //Error check
int doCopy = 1;
bool shufflelibrary = card->basicAbilities[(int)Constants::SHUFFLELIBRARYDEATH];
//Darksteel Colossus, Legacy Weapon ... top priority since we replace destination directly automatically...
for(int i = 0; i < 2; ++i)
{
if ((to == g->players[i]->game->graveyard) && (
card->basicAbilities[(int)Constants::LIBRARYDEATH]||
card->basicAbilities[(int)Constants::SHUFFLELIBRARYDEATH]))
{
to = g->players[i]->game->library;
}
}
//Leyline of the Void, Yawgmoth's Agenda... effect...
for(int i = 0; i < 2; ++i)
{
@@ -392,6 +403,9 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
}
if(!asCopy)
{
if(shufflelibrary)
copy->owner->game->library->shuffle();
WEvent * e = NEW WEventZoneChange(copy, from, to);
g->receiveEvent(e);
}