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:
@@ -2540,7 +2540,7 @@ AACounter::AACounter(GameObserver* observer, int id, MTGCardInstance * source, M
|
||||
|
||||
//specail cases, indestructible creatures which recieve enough counters to kill it are destroyed as a state based effect
|
||||
if(_target->toughness <= 0 && _target->has(Constants::INDESTRUCTIBLE) && toughness < 0)
|
||||
_target->controller()->game->putInGraveyard(_target);
|
||||
_target->toGrave(true); // The indestructible cards can have different destination zone after death.
|
||||
return nb;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -183,7 +183,7 @@ int Damage::resolve()
|
||||
_target->counters->addCounter(-1, -1);
|
||||
}
|
||||
if(_target->toughness <= 0 && _target->has(Constants::INDESTRUCTIBLE))
|
||||
_target->controller()->game->putInGraveyard(_target);
|
||||
_target->toGrave(true); // The indestructible creatures can have different destination zone after death.
|
||||
}
|
||||
else if (target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER && (source->has(Constants::INFECT)||source->has(Constants::POISONDAMAGER)))
|
||||
{
|
||||
|
||||
@@ -927,6 +927,8 @@ void GameObserver::gameStateBasedEffects()
|
||||
{
|
||||
if(card->life < 1 && !card->has(Constants::INDESTRUCTIBLE))
|
||||
card->destroy();//manor gargoyle... recheck
|
||||
if(card->toughness <= 0 && card->has(Constants::INDESTRUCTIBLE))
|
||||
card->toGrave(true);// Fixed a bug when indestructible creatures have toughness = 0 (e.g. March of the Machines with manacost = 0 artifacts).
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user