From 140200246e7199c26d13b67a57eadcdf1a3e3ed4 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Sun, 22 Aug 2010 18:23:46 +0000 Subject: [PATCH] tweaked leylines --- projects/mtg/src/MTGRules.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index d87809257..115c909d1 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -14,11 +14,15 @@ int cardsinhand = game->players[0]->game->hand->nb_cards; Player * currentPlayer = game->currentPlayer; if (!player->game->hand->hasCard(card)) return 0; if ((game->turn < 1) && (cardsinhand != 0) && (card->hasType("leyline")) - && game->currentGamePhase == Constants::MTG_PHASE_FIRSTMAIN - && game->players[0]->game->graveyard->nb_cards == 0 - && game->players[0]->game->exile->nb_cards == 0){ - Player * p = game->currentPlayer; - card->owner->game->putInZone(card,p->game->hand,p->game->battlefield); + && game->currentGamePhase == Constants::MTG_PHASE_FIRSTMAIN + && game->players[0]->game->graveyard->nb_cards == 0 + && game->players[0]->game->exile->nb_cards == 0){ + Player * p = game->currentPlayer; + if (card->hasType("leyline")){ + MTGCardInstance * copy = player->game->putInZone(card, player->game->hand, player->game->temp); + Spell * spell = NEW Spell(copy); + spell->resolve(); + delete spell;} return 1;} if (card->hasType("land")){ if (player == currentPlayer && currentPlayer->canPutLandsIntoPlay && (game->currentGamePhase == Constants::MTG_PHASE_FIRSTMAIN || game->currentGamePhase == Constants::MTG_PHASE_SECONDMAIN)){