Added Q06 set, improved Android downloader, fixed bug for indestructible creatures that have to go different zone after death (e.g. if they have exiledeath ability), fixed a bug when indestructible creatures have toughness = 0 (e.g. "March of the Machines" with manacost = 0 artifacts).

This commit is contained in:
Vittorio Alfieri
2021-10-20 14:52:15 +02:00
parent fcb073ccd6
commit 3130049c63
8 changed files with 80 additions and 21 deletions
+6 -11
View File
@@ -511,6 +511,9 @@ int MTGCardInstance::totem(bool noregen)
}
int MTGCardInstance::toGrave( bool forced )
{
if(basicAbilities[(int)Constants::INDESTRUCTIBLE] && !forced)
return 0; // Fixed bug for indestructible creatures that have to go different zone after death.
Player * p = controller();
if (basicAbilities[(int)Constants::EXILEDEATH] || basicAbilities[(int)Constants::GAINEDEXILEDEATH] || (basicAbilities[(int)Constants::HASDISTURB] && alternateCostPaid[ManaCost::MANA_PAID_WITH_RETRACE] == 1))
{
@@ -542,17 +545,9 @@ int MTGCardInstance::toGrave( bool forced )
ret->counters->addCounter(1, 1, false);
return 1;
}
if (!basicAbilities[(int)Constants::INDESTRUCTIBLE])
{
p->game->putInZone(this, p->game->inPlay, owner->game->graveyard);
return 1;
}
if (forced)
{
p->game->putInZone(this, p->game->inPlay, owner->game->graveyard);
return 1;
}
return 0;
// Let's put the creature in the default zone after death (graveyard).
p->game->putInZone(this, p->game->inPlay, owner->game->graveyard);
return 1;
}
int MTGCardInstance::destroy()
{