Cleanup tabs
This commit is contained in:
@@ -74,7 +74,7 @@ MTGPlayerCards::~MTGPlayerCards()
|
||||
SAFE_DELETE(stack);
|
||||
SAFE_DELETE(removedFromGame);
|
||||
SAFE_DELETE(garbage);
|
||||
SAFE_DELETE(reveal);
|
||||
SAFE_DELETE(reveal);
|
||||
SAFE_DELETE(temp);
|
||||
SAFE_DELETE(playRestrictions);
|
||||
}
|
||||
@@ -92,7 +92,7 @@ void MTGPlayerCards::beforeBeginPhase()
|
||||
stack->beforeBeginPhase();
|
||||
removedFromGame->beforeBeginPhase();
|
||||
garbage->beforeBeginPhase();
|
||||
reveal->beforeBeginPhase();
|
||||
reveal->beforeBeginPhase();
|
||||
temp->beforeBeginPhase();
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ void MTGPlayerCards::setOwner(Player * player)
|
||||
stack->setOwner(player);
|
||||
garbage->setOwner(player);
|
||||
garbageLastTurn->setOwner(player);
|
||||
reveal->setOwner(player);
|
||||
reveal->setOwner(player);
|
||||
temp->setOwner(player);
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ void MTGPlayerCards::init()
|
||||
exile = removedFromGame;
|
||||
garbage = NEW MTGGameZone();
|
||||
garbageLastTurn = garbage;
|
||||
reveal = NEW MTGGameZone();
|
||||
reveal = NEW MTGGameZone();
|
||||
temp = NEW MTGGameZone();
|
||||
|
||||
playRestrictions = NEW PlayRestrictions();
|
||||
@@ -374,12 +374,12 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
|
||||
}
|
||||
|
||||
}
|
||||
//all cards that go from the hand to the graveyard is ALWAYS a discard.
|
||||
if ((to == g->players[0]->game->graveyard || to == g->players[1]->game->graveyard) && (from == g->players[0]->game->hand || from
|
||||
== g->players[1]->game->hand))
|
||||
{
|
||||
card->discarded = true;
|
||||
}
|
||||
//all cards that go from the hand to the graveyard is ALWAYS a discard.
|
||||
if ((to == g->players[0]->game->graveyard || to == g->players[1]->game->graveyard) && (from == g->players[0]->game->hand || from
|
||||
== g->players[1]->game->hand))
|
||||
{
|
||||
card->discarded = true;
|
||||
}
|
||||
|
||||
//When a card is moved from inPlay to inPlay (controller change, for example), it is still the same object
|
||||
if ((to == g->players[0]->game->inPlay || to == g->players[1]->game->inPlay) && (from == g->players[0]->game->inPlay || from
|
||||
@@ -1019,12 +1019,12 @@ MTGGameZone * MTGGameZone::intToZone(int zoneId, Player * p, Player * p2)
|
||||
case STACK:
|
||||
return p->game->stack;
|
||||
|
||||
case MY_REVEAL:
|
||||
return p->game->reveal;
|
||||
case OPPONENT_REVEAL:
|
||||
return p->opponent()->game->reveal;
|
||||
case REVEAL:
|
||||
return p->game->reveal;
|
||||
case MY_REVEAL:
|
||||
return p->game->reveal;
|
||||
case OPPONENT_REVEAL:
|
||||
return p->opponent()->game->reveal;
|
||||
case REVEAL:
|
||||
return p->game->reveal;
|
||||
|
||||
}
|
||||
if (!p2) return NULL;
|
||||
@@ -1048,8 +1048,8 @@ MTGGameZone * MTGGameZone::intToZone(int zoneId, Player * p, Player * p2)
|
||||
case TARGET_CONTROLLER_STACK:
|
||||
return p2->game->stack;
|
||||
|
||||
case TARGET_CONTROLLER_REVEAL:
|
||||
return p2->game->reveal;
|
||||
case TARGET_CONTROLLER_REVEAL:
|
||||
return p2->game->reveal;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
@@ -1149,16 +1149,16 @@ MTGGameZone * MTGGameZone::intToZone(GameObserver *g, int zoneId, MTGCardInstanc
|
||||
return source->playerTarget->game->stack;
|
||||
else return source->controller()->game->stack;
|
||||
|
||||
case TARGET_OWNER_REVEAL:
|
||||
return target->owner->game->reveal;
|
||||
case REVEAL:
|
||||
return target->owner->game->reveal;
|
||||
case OWNER_REVEAL:
|
||||
return target->owner->game->reveal;
|
||||
case TARGETED_PLAYER_REVEAL:
|
||||
if (source->playerTarget)
|
||||
return source->playerTarget->game->reveal;
|
||||
else return source->controller()->game->reveal;
|
||||
case TARGET_OWNER_REVEAL:
|
||||
return target->owner->game->reveal;
|
||||
case REVEAL:
|
||||
return target->owner->game->reveal;
|
||||
case OWNER_REVEAL:
|
||||
return target->owner->game->reveal;
|
||||
case TARGETED_PLAYER_REVEAL:
|
||||
if (source->playerTarget)
|
||||
return source->playerTarget->game->reveal;
|
||||
else return source->controller()->game->reveal;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
@@ -1187,7 +1187,7 @@ int MTGGameZone::zoneStringToId(string zoneName)
|
||||
|
||||
"mystack", "opponentstack", "targetownerstack", "targetcontrollerstack", "ownerstack", "stack","targetedpersonsstack",
|
||||
|
||||
"myreveal", "opponentreveal", "targetownerreveal", "targetcontrollerreveal", "ownerreveal", "reveal","targetedpersonsreveal",
|
||||
"myreveal", "opponentreveal", "targetownerreveal", "targetcontrollerreveal", "ownerreveal", "reveal","targetedpersonsreveal",
|
||||
|
||||
};
|
||||
|
||||
@@ -1210,7 +1210,7 @@ int MTGGameZone::zoneStringToId(string zoneName)
|
||||
|
||||
MY_STACK, OPPONENT_STACK, TARGET_OWNER_STACK, TARGET_CONTROLLER_STACK, OWNER_STACK, STACK,TARGETED_PLAYER_STACK,
|
||||
|
||||
MY_REVEAL, OPPONENT_REVEAL, TARGET_OWNER_REVEAL, TARGET_CONTROLLER_REVEAL, OWNER_REVEAL, REVEAL,TARGETED_PLAYER_REVEAL };
|
||||
MY_REVEAL, OPPONENT_REVEAL, TARGET_OWNER_REVEAL, TARGET_CONTROLLER_REVEAL, OWNER_REVEAL, REVEAL,TARGETED_PLAYER_REVEAL };
|
||||
|
||||
int max = sizeof(values) / sizeof *(values);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user