diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 32cc20527..907cd4281 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -2682,10 +2682,13 @@ int ATransformer::destroy() _target->addType(*it); } } - //n the case that we removed or added types to a card, so that it retains its original name when the effect is removed. + //in the case that we removed or added types to a card, so that it retains its original name when the effect is removed. + if(_target->model->data->name.size())//tokens don't have a model name. + { _target->name.clear(); _target->setName(_target->model->data->name.c_str()); - } + } + } return 1; } diff --git a/projects/mtg/src/GameStateDuel.cpp b/projects/mtg/src/GameStateDuel.cpp index 54a0b0abd..78c0e790f 100644 --- a/projects/mtg/src/GameStateDuel.cpp +++ b/projects/mtg/src/GameStateDuel.cpp @@ -474,12 +474,12 @@ void GameStateDuel::Update(float dt) { menu = NEW SimpleMenu(DUEL_MENU_GAME_MENU, this, Fonts::MENU_FONT, SCREEN_WIDTH / 2 - 100, 25, game->players[1]->deckName.c_str()); - int cardsinhand = game->players[0]->game->hand->nb_cards; + int cardsinhand = game->currentPlayer->game->hand->nb_cards; //almosthumane - mulligan if ((game->turn < 1) && (cardsinhand != 0) && game->currentGamePhase == Constants::MTG_PHASE_FIRSTMAIN - && game->players[0]->game->inPlay->nb_cards == 0 && game->players[0]->game->graveyard->nb_cards == 0 - && game->players[0]->game->exile->nb_cards == 0) //1st Play Check + && game->currentPlayer->game->inPlay->nb_cards == 0 && game->currentPlayer->game->graveyard->nb_cards == 0 + && game->currentPlayer->game->exile->nb_cards == 0 && game->currentlyActing() == (Player*)game->currentPlayer) //1st Play Check //IF there was no play at the moment automatically mulligan { menu->Add(MENUITEM_MULLIGAN, "Mulligan"); diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index de5859570..053ca641d 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -1778,7 +1778,7 @@ int MTGPersistRule::receiveEvent(WEvent * event) Player * p = game->players[i]; if (e->to == p->game->graveyard) { - MTGCardInstance * copy = p->game->putInZone(e->card, p->game->graveyard, e->card->owner->game->stack); + MTGCardInstance * copy = p->game->putInZone(e->card, p->game->graveyard, e->card->owner->game->temp); if (!copy) { DebugTrace("MTGRULES: couldn't move card for persist");