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
+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);