- fix issue 153 (Tokens should go to graveyard)
- "token" keyword can now be used in the parser with things such as Creature[-token] for "noncreature token"
- Let's stop using "token" as a type
This commit is contained in:
wagic.the.homebrew@gmail.com
2010-01-03 10:08:36 +00:00
parent 69c5dee979
commit 23fe54ae6f
12 changed files with 110 additions and 7 deletions
+12 -4
View File
@@ -148,12 +148,12 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
}
MTGCardInstance * ret = copy;
if (card->isToken){
/*if (card->isToken){
if (to != g->players[0]->game->inPlay && to != g->players[1]->game->inPlay){
to = garbage;
ret = NULL;
}
}
}*/
to->addCard(copy);
copy->changedZoneRecently = 1.f;
@@ -211,13 +211,21 @@ MTGCardInstance * MTGGameZone::removeCard(MTGCardInstance * card, int createCopy
nb_cards--;
cards.erase(cards.begin()+i);
MTGCardInstance * copy = card;
if (card->isToken) //TODO better than this ?
return card;
//if (card->isToken) //TODO better than this ?
// return card;
//card->lastController = card->controller();
if (createCopy) {
copy = NEW MTGCardInstance(card->model,card->owner->game);
copy->previous = card;
copy->view = card->view;
copy->isToken = card->isToken;
//stupid bug with tokens...
if (card->model == card)
copy->model = copy;
if (card->data == card)
copy->data = copy;
card->next = copy;
}
copy->previousZone = this;