Fixed primitives, improved Aftermath casting rule: now the casted card becomes instant or sorcery in the stack according to the casted half, fixed a bug with the previous zone of cards casted using the "putinplay" option of "castcard" keyword.

This commit is contained in:
Vittorio Alfieri
2021-10-14 15:39:58 +02:00
parent 9c2eee7d7e
commit eb35e3589b
4 changed files with 30 additions and 17 deletions
+3 -3
View File
@@ -9872,9 +9872,9 @@ int AACastCard::resolveSpell()
if ((normal || asNormalMadness)||(!_target->hasType(Subtypes::TYPE_INSTANT) && !_target->hasType(Subtypes::TYPE_SORCERY)))
{
if (putinplay && (_target->hasType(Subtypes::TYPE_ARTIFACT)||_target->hasType(Subtypes::TYPE_CREATURE)||_target->hasType(Subtypes::TYPE_ENCHANTMENT)||_target->hasType(Subtypes::TYPE_PLANESWALKER)))
copy = _target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->battlefield, noEvent);
copy = _target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->reveal, noEvent); // Fixed a problem with previous zone of card, it cannot be directly battlefield.
else
copy = _target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->stack, noEvent);
copy = _target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->stack, noEvent);
copy->changeController(source->controller(),true);
if(asNormalMadness)
copy->MadnessPlay = true;
@@ -9882,7 +9882,7 @@ int AACastCard::resolveSpell()
else
{
if (putinplay && (_target->hasType(Subtypes::TYPE_ARTIFACT)||_target->hasType(Subtypes::TYPE_CREATURE)||_target->hasType(Subtypes::TYPE_ENCHANTMENT)||_target->hasType(Subtypes::TYPE_PLANESWALKER)))
copy = _target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->battlefield, noEvent);
copy = _target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->reveal, noEvent); // Fixed a problem with previous zone of card, it cannot be directly battlefield.
else
copy = _target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->stack, noEvent);
copy->changeController(source->controller(),true);
+11 -2
View File
@@ -730,8 +730,17 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
if(shufflelibrary)
copy->owner->game->library->shuffle();//shouldnt we only ever do this if you clicked close on your library gui??????
if(copy->has(Constants::ADVENTURE) && copy->alternateCostPaid[ManaCost::MANA_PAID_WITH_ALTERNATIVE] == 1 && //Added to correctly set the adventure cards type.
(to == g->players[0]->game->stack || to == g->players[1]->game->stack || to == g->players[0]->game->battlefield || to == g->players[1]->game->battlefield)){
if(copy->has(Constants::ADVENTURE) && copy->alternateCostPaid[ManaCost::MANA_PAID_WITH_ALTERNATIVE] == 1 && //Added to correctly set the adventure cards type on stack.
(to == g->players[0]->game->stack || to == g->players[1]->game->stack)){
copy->types.clear();
if(copy->has(Constants::ASFLASH))
copy->types.push_back(Subtypes::TYPE_INSTANT);
else
copy->types.push_back(Subtypes::TYPE_SORCERY);
}
if(copy->has(Constants::HASAFTERMATH) && copy->alternateCostPaid[ManaCost::MANA_PAID_WITH_FLASHBACK] == 1 && //Added to correctly set the aftermath cards type on stack.
(to == g->players[0]->game->stack || to == g->players[1]->game->stack)){
copy->types.clear();
if(copy->has(Constants::ASFLASH))
copy->types.push_back(Subtypes::TYPE_INSTANT);