first you are not allowed to mulligen the opponents hand.

second persist was using the stack on its returning effect, this is incorrect as per MTG rules for persist, the card is supposed to go from the grave directly to inplay(grave -> temp -> inplay, in our case).

third, tokens models don't have names, so i make it check now for a name size on the model before clearing and resetting in tranformer.
This commit is contained in:
omegablast2002@yahoo.com
2011-05-16 18:36:47 +00:00
parent 60e9736ef3
commit 39420a911f
3 changed files with 9 additions and 6 deletions

View File

@@ -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;
}

View File

@@ -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");

View File

@@ -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");