Cleanup
This commit is contained in:
@@ -1136,27 +1136,6 @@ public:
|
||||
return count;
|
||||
}
|
||||
|
||||
/*int countManaProducedby(int color, Player * player)
|
||||
{
|
||||
int count = 0;
|
||||
for (int i = 0; i < player->game->battlefield->nb_cards; i++)
|
||||
{
|
||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceC && (color == Constants::MTG_COLOR_ARTIFACT || color == Constants::MTG_COLOR_WASTE))
|
||||
count += 1;
|
||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceG && color == Constants::MTG_COLOR_GREEN)
|
||||
count += 1;
|
||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceU && color == Constants::MTG_COLOR_BLUE)
|
||||
count += 1;
|
||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceR && color == Constants::MTG_COLOR_RED)
|
||||
count += 1;
|
||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceB && color == Constants::MTG_COLOR_BLACK)
|
||||
count += 1;
|
||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceW && color == Constants::MTG_COLOR_WHITE)
|
||||
count += 1;
|
||||
}
|
||||
return count;
|
||||
}*/
|
||||
|
||||
WParsedInt(int value = 0)
|
||||
{
|
||||
intValue = value;
|
||||
@@ -2066,7 +2045,6 @@ class AACopier: public ActivatedAbility
|
||||
{
|
||||
public:
|
||||
bool isactivated;
|
||||
//vector<MTGAbility *> currentAbilities;
|
||||
MTGAbility * andAbility;
|
||||
AACopier(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target = NULL, ManaCost * _cost = NULL);
|
||||
int resolve();
|
||||
|
||||
@@ -1610,7 +1610,7 @@ int AACopier::resolve()
|
||||
if(source->isACopier)
|
||||
{
|
||||
source->GrantedAndAbility = andAbility;
|
||||
//AbilityFactory af(game);
|
||||
|
||||
for(unsigned int i = 0;i < source->cardsAbilities.size();i++)
|
||||
{
|
||||
MTGAbility * a = dynamic_cast<MTGAbility *>(source->cardsAbilities[i]);
|
||||
@@ -1620,7 +1620,6 @@ int AACopier::resolve()
|
||||
source->cardsAbilities.clear();
|
||||
source->magicText = _target->magicText;
|
||||
|
||||
//af.getAbilities(¤tAbilities, NULL, source);
|
||||
for (size_t i = 0; i < source->cardsAbilitiesFilter.size(); ++i)
|
||||
{
|
||||
MTGAbility * a = source->cardsAbilitiesFilter[i];
|
||||
|
||||
@@ -710,28 +710,6 @@ void GameObserver::gameStateBasedEffects()
|
||||
card->myPair->myPair = NULL;
|
||||
card->myPair = NULL;
|
||||
}
|
||||
///set basic land mana objects canproduce
|
||||
/*for (size_t gg = 0; gg < mLayers->actionLayer()->manaObjects.size(); gg++)
|
||||
{
|
||||
MTGAbility * aa = ((MTGAbility *) mLayers->actionLayer()->manaObjects[gg]);
|
||||
//AManaProducer * amp = dynamic_cast<AManaProducer*> (aa);
|
||||
if(aa != NULL)
|
||||
{
|
||||
if (dynamic_cast<AManaProducer*> (aa) && (dynamic_cast<AManaProducer*> (aa))->source->isLand() && (dynamic_cast<AManaProducer*> (aa))->source == card)
|
||||
{
|
||||
if (card->hasType("forest") && ((AManaProducer*)aa)->output->hasColor(Constants::MTG_COLOR_GREEN))
|
||||
card->canproduceG = 1;
|
||||
if (card->hasType("island") && ((AManaProducer*)aa)->output->hasColor(Constants::MTG_COLOR_BLUE))
|
||||
card->canproduceU = 1;
|
||||
if (card->hasType("mountain") && ((AManaProducer*)aa)->output->hasColor(Constants::MTG_COLOR_RED))
|
||||
card->canproduceR = 1;
|
||||
if (card->hasType("swamp") && ((AManaProducer*)aa)->output->hasColor(Constants::MTG_COLOR_BLACK))
|
||||
card->canproduceB = 1;
|
||||
if (card->hasType("plains") && ((AManaProducer*)aa)->output->hasColor(Constants::MTG_COLOR_WHITE))
|
||||
card->canproduceW = 1;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
///clear imprints
|
||||
if(isInPlay(card) && card->imprintedCards.size())
|
||||
{
|
||||
|
||||
@@ -151,15 +151,6 @@ void MTGCardInstance::copy(MTGCardInstance * card)
|
||||
cardsAbilitiesFilter.push_back(a);
|
||||
}
|
||||
}
|
||||
//
|
||||
/*if(!isPhased)
|
||||
{
|
||||
Spell * spell = NEW Spell(observer, this);
|
||||
observer = card->observer;
|
||||
AbilityFactory af(observer);
|
||||
af.addAbilities(observer->mLayers->actionLayer()->getMaxId(), spell);
|
||||
delete spell;
|
||||
}*/
|
||||
|
||||
if(observer->players[1]->playMode == Player::MODE_TEST_SUITE)
|
||||
mtgid = backupid; // there must be a way to get the token id...
|
||||
|
||||
Reference in New Issue
Block a user