Erwan
- changed "putInPlay" to return "NULL" if the card cannot be found in the "from" zone. The behavior of the function before that prevented to see that we broke the "alternate" cost feature (see test Vine Dryad) - Fixed some memory leaks introduced in r2922
This commit is contained in:
@@ -1375,6 +1375,11 @@ int MTGPersistRule::receiveEvent(WEvent * event)
|
||||
if (e->to == p->game->graveyard)
|
||||
{
|
||||
MTGCardInstance * copy = p->game->putInZone(e->card, p->game->graveyard, e->card->owner->game->stack);
|
||||
if (!copy)
|
||||
{
|
||||
DebugTrace("MTGRULES: couldn't move card for persist");
|
||||
return 0;
|
||||
}
|
||||
Spell * spell = NEW Spell(copy);
|
||||
spell->resolve();
|
||||
spell->source->counters->addCounter(-1, -1);
|
||||
|
||||
Reference in New Issue
Block a user