Executable -> http://rapidshare.com/files/377717104/template.rar.html (Fixed shuffle)
Source (GameStateDuel.cpp)->On the Bottom of this post (fixed shuffle)
--------------------------------------------
Finally made it!
The C++ pointers where breaking me
On GameStateDuel.cpp I've changed the "in duel" menu option to present a Mulligan option.
Code: Select all
case DUEL_STATE_MULLIGAN://Almhum
if(menu){
menu->Update(dt);
if (menu->closed)
{
if (game->turn < 1 && game->currentGamePhase == Constants::MTG_PHASE_FIRSTMAIN)
{
int cardsinhand = game->players[0]->game->hand->nb_cards;
for (int i = 0 ; i < cardsinhand; i ++)
game->currentPlayer->game->putInZone(game->currentPlayer->game->hand->cards[0],game->players[0]->game->hand ,game->players[0]->game->library);
game->forceShuffleLibraries();
for (int i = 0; i < (cardsinhand-1); i ++) game->draw();
mGamePhase = DUEL_STATE_PLAY;
}
else mGamePhase = DUEL_STATE_PLAY;
}
}
break;//Almhum
http://www.mediafire.com/file/mdrzwzu5jjt/template.rar
(executable that also as autophaseskip)
Have a nice weekend.
[EDIT ABRA: renamed]